Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormarvine28
    • CommentTimeAug 29th 2008
     
    Hello everyone,

    I'll try to explain my problem, I installed plogger on two different sites but I want the two scripts shows the same gallery. I changed the information connection to the database of the second site for those of the first site. The titles of images appear well but the images do not appear, I want know what file I must change in the second script to displays the images of the first.

    In the table `plogger_pictures` the path which is displaying the images are named: "collection/album/name_of_the_file.jpg" . I guess I just like to add in a file script: http://www.mywebsite.com/ploggerfolder/images/ and the images of the first site will appear on the second site.

    Thank you for help for the help
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 29th 2008
     
    marvine28,

    Did you want the ability to use the admin section from both installations? Or are you just trying to use different themes for separate locations? Is this on two different sites (http://www.siteone.com + http://www.sitetwo.com) or different pages within the same site?
    • CommentAuthormarvine28
    • CommentTimeAug 30th 2008
     
    thank you for the answer

    I have 2 sites, Site #1 is in french: http://www.lactu.net/photos-people/

    and i'm making the second site, the english version : http://www.150news.com/celebrity-pictures/index.php

    The two sites use the same database, because it will be the same images on the two sites, but I dont know how to display images on the second site because I do not want to upload all the images twice
    • CommentAuthormarvine28
    • CommentTimeSep 5th 2008
     
    up, i really need help please.

    Thanks
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 5th 2008
     
    marvine28,

    The best I could come up with for a solution is the following code. It's not perfect, but should do *most* of the job. You will have to add this to the secondary installation of Plogger (you won't be able to use the admin section of the secondary installation since you cannot remotely alter folder / file paths). The primary installation should not have this additional code.

    Open plog-functions.php and find the following code (under the generate_thumb() function):
    // for relative paths assume that they are relative to images directory,
    // otherwise just use the given pat
    if (file_exists($path)) {
    $source_file_name = $path;
    } else {
    $source_file_name = $config['basedir'] . 'images/' . SmartStripSlashes($path);
    }

    and edit it to read:
    // for relative paths assume that they are relative to images directory,
    // otherwise just use the given pat
    $file_header = @get_headers($config['gallery_url'].'images/'.$path);
    if ($file_header[0] == 'HTTP/1.1 200 OK') {
    $base_filename = sanitize_filename(basename($path));
    $prefix = $thumb_config['filename_prefix'] . $prefix . "-";
    $thumburl = $config['gallery_url'].'thumbs/'.$prefix.$base_filename;
    return $thumburl;
    } else if (file_exists($path)) {
    $source_file_name = $path;
    } else {
    $source_file_name = $config['basedir'] . 'images/' . SmartStripSlashes($path);
    }


    The only issue is if the thumbnail or intermediate image are not created (the image or thumbnail will not show up similar to your current issue) or if you have changed the sizes in the admin section (this code will not update sizes until accessed / updated from the primary installation). Good luck!
    • CommentAuthormarvine28
    • CommentTimeSep 5th 2008
     
    Thank you very much sidtheduck

    you're almost my God

    As you have said there is a problem for the intermediate images, there must be a way to set the width of images directly into the PHP file plog-functions.php ex: 450 for 450 pixels ???

    You can see 2 warnings at the bottom of this page: http://www.150news.com/celebrity-pictures/index.php?level=picture&id=1215

    And i have another problem: I do not know why but there are a few images that does not appear and they appear on my first script like on this page: http://www.150news.com/celebrity-pictures/index.php?level=album&id=18

    Thanks alot
    •  
      CommentAuthorsidtheduck
    • CommentTimeSep 5th 2008
     
    marvine28,

    Posted By: marvine28As you have said there is a problem for the intermediate images, there must be a way to set the width of images directly into the PHP file plog-functions.php ex: 450 for 450 pixels ???

    Open 'plog-admin-functions.php' and change the following code (found under the add_picture() function):
    $thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_SMALL);
    #$thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_LARGE);

    to:
    $thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_SMALL);
    $thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_LARGE);

    That should generate a small and intermediate picture every time you upload or import an image.

    Posted By: marvine28You can see 2 warnings at the bottom of this page:http://www.150news.com/celebrity-pictures/index.php?level=picture&id=1215
    Do you need the EXIF information? If not, just remove it from the theme because it's trying to find the image information using a local path (instead of the remote path and the remote path would possibly throw an error as well).

    Posted By: marvine28And i have another problem: I do not know why but there are a few images that does not appear and they appear on my first script like on this page:http://www.150news.com/celebrity-pictures/index.php?level=album&id=18
    I don't know why the images aren't returning correctly, but for some reason they are not generating a 200 header. You can try altering the code I gave you above to:
    if ($file_header[0] != 'HTTP/1.1 404 Not Found') {