Not signed in (Sign In)

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

    • CommentAuthorphpnovice
    • CommentTimeMay 12th 2009
     
    I am using Plogger 1.0b3, upgraded to trunk r-594. I have a few questions if there is anyone who can help me.


    1. I need to use a php include to insert an html file into one of my templates, because it is accessed by multiple websites in addition to my gallery.

    The code I am attempting to use is

    <?php include("http://www.url.com/file.html"); ?>
    but it is not inserting the file. How should I format this so that it will work correctly with Plogger?


    2. In Plogger 1.0b3, I made a change to the php functions, found in another thread here, which changed the filename to the caption in the rewrite URLs.

    http://www.url.com/collection/album/filename/ changed to http://www.url.com/collection/album/caption/
    I noticed there are differences to the newer version. Is it still possible to do this in trunk r-594 and later, and if so, how?


    3. Is there a hack to change the links in the generated RSS feed to the rewrite URLs, rather than the default ones generated by the Plogger script?


    4. Is there a hack to force the breadcrumb to not display or remain hidden on the front page of the gallery, but keep the code for it in the header.php file?


    5. Is there a way to force Plogger to refresh or regenerate all the thumbnail images? Specifically, without changing the thumbnail file names? I manually updated some of my images through FTP, but of course, the corresponding thumbnails did not change. I tried setting the thumbnail image size to something else and back in the admin panel, but that did not work. After I tried that, the thumbnails actually would not return to the smaller size I wanted, and I had to download them to my computer and manually edit and reupload them. My install does not seem to consistently refresh the thumbnails if I update the Options with a new image size.

    I am not using square thumbnails and have not tried toggling that option back and forth, because I did not want to get stuck with them.


    Thanks in advance.
    •  
      CommentAuthorsidtheduck
    • CommentTimeMay 12th 2009
     
    Hi phpnovice! I'll try my best to answer your questions.

    Posted By: phpnovice1. I need to use a php include to insert an html file into one of my templates, because it is accessed by multiple websites in addition to my gallery.
    The code I am attempting to use is
    <?php include("http://www.url.com/file.html"); ?>
    Most likely, your server does not allow "URL wrappers", that is, it does not let you include remote files that are called using a URL instead of a server path. What you need is to include the server path instead of the URL which is different on every server, but most often is something like:
    <?php include('/home/yoursite.com/www/file.html'); ?>
    or:
    <?php include('/home/username/public_html/file.html'); ?>
    where 'www' or 'public_html' is the web root folder (the place where you upload your index.php or index.html for the first page on your site).

    Posted By: phpnovice2. In Plogger 1.0b3, I made a change to the php functions, found in another thread here, which changed the filename to the caption in the rewrite URLs.
    http://www.url.com/collection/album/filename/ changed to http://www.url.com/collection/album/caption/
    This should already be included in r-594. If you have a caption, it should display that, otherwise it falls back on the filename using the function get_picture_caption().

    Posted By: phpnovice3. Is there a hack to change the links in the generated RSS feed to the rewrite URLs, rather than the default ones generated by the Plogger script?
    This can be done, but first I need to know if you are using the index.php that came with Plogger or if you are including Plogger within another file on your site and, if so, let me know what the URL of that file is.

    Posted By: phpnovice4. Is there a hack to force the breadcrumb to not display or remain hidden on the front page of the gallery, but keep the code for it in the header.php file?
    So you want the actual breadcrumb code to appear in the source code, but not display? You could either comment this out in your theme file or change your CSS to display: none; for the breadcrumb div tag.

    Posted By: phpnovice5. Is there a way to force Plogger to refresh or regenerate all the thumbnail images? Specifically, without changing the thumbnail file names? I manually updated some of my images through FTP, but of course, the corresponding thumbnails did not change. I tried setting the thumbnail image size to something else and back in the admin panel, but that did not work. After I tried that, the thumbnails actually would not return to the smaller size I wanted, and I had to download them to my computer and manually edit and reupload them. My install does not seem to consistently refresh the thumbnails if I update the Options with a new image size.
    That is odd. I just tested on my server installation of r-594 and it worked like a charm. I uploaded the new image and saved over the old one. Then I went to Admin -> Options and changed the size of Small Thumbnails and Intermediate Thumbnails, saved the options, then changed them back and saved. Then I refreshed the front-end gallery and both the small and intermediate thumbnails were re-generated (which is what the script is supposed to do). Do you have a link to your gallery?
    Thankful People: phpnovice
    • CommentAuthorphpnovice
    • CommentTimeMay 12th 2009 edited
     
    I appreciate the speedy reply!

    The include works now, I was able to fix that using the file path like your examples.

    Posted By: phpnoviceThis should already be included in r-594. If you have a caption, it should display that, otherwise it falls back on the filename using the function get_picture_caption().

    The breadcrumbs display the caption. The rewrite URL displays the file name, minus extension. I would like the rewrite URL to display the caption.

    Is this is a bug in my specific install? I can upgrade to a newer version.

    Posted By: phpnoviceThis can be done, but first I need to know if you are using the index.php that came with Plogger or if you are including Plogger within another file on your site and, if so, let me know what the URL of that file is.

    I am using Plogger as a stand alone installation on its own website. I have not altered the index.php.

    Posted By: phpnoviceSo you want the actual breadcrumb code to appear in the source code, but not display? You could either comment this out in your theme file or change your CSS to display: none; for the breadcrumb div tag.

    Ideally, I would like the breadcrumb to display on the collection, album, and photo pages, but not the front page of the site where there is nothing to navigate, i.e. the top level.

    I know I could move the breadcrumb code out of header.php and into the collection.php, album.php, and picture.php pages individually, but I was hoping to avoid that.

    Posted By: phpnoviceThat is odd. I just tested on my server installation of r-594 and it worked like a charm. I uploaded the new image and saved over the old one. Then I went to Admin -> Options and changed the size of Small Thumbnails and Intermediate Thumbnails, saved the options, then changed them back and saved. Then I refreshed the front-end gallery and both the small and intermediate thumbnails were re-generated (which is what the script is supposed to do). Do you have a link to your gallery?

    Does this board have a private message function? I would rather not link to my gallery since it is still under a lot of construction.

    However, I can tell you that changing the thumbnail size seemed to work properly when I had only a few total images uploaded. It was the first thing I tried.

    Now that I have over 200 images, it appears to no longer be working. I thought it needed more time but they weren't refreshed after waiting overnight.
    •  
      CommentAuthorsidtheduck
    • CommentTimeMay 15th 2009 edited
     
    Posted By: phpnoviceThebreadcrumbsdisplay the caption. Therewrite URLdisplays the file name, minus extension. I would like the rewrite URL to display the caption.
    Sorry, I misread your post. You should only have to do step #2 in this post -> http://www.plogger.org/forum/discussion/2125/cruftfree-urls/#Item_6

    Posted By: phpnoviceI am using Plogger as a stand alone installation on its own website. I have not altered the index.php.
    Open plog-rss.php and you should see this code (around line 92):
    //$pagelink = $config["address"].plogger_get_picture_url();
    // XXX: Below won't look nice with mod_rewrite, but plogger_get_picture_url
    // returns wrong filename, needs to be fixed - still needs to be fixed as this does not always work as wanted either
    $pagelink = $config['gallery_url'].'?level=picture&amp;id='.plogger_get_picture_id();

    change it to read:
    // remove plog-rss from the end, if present .. is there a better way to determine the full url?
    $is_rss = strpos($config['baseurl'], 'plog-rss.php');
    if ($is_rss !== false) {
    $config['baseurl'] = substr($config['baseurl'], 0, $is_rss);
    }
    $pagelink = plogger_get_picture_url();

    and I think you should be good.

    Posted By: phpnoviceIdeally, I would like the breadcrumb to display on the collection, album, and photo pages, butnotthe front page of the site where there is nothing to navigate, i.e. the top level.
    Around the HTML code that you want to do this to (i.e. the breadcrumbs) add the following information (most likely in header.php in your theme folder):
    <?php if ($GLOBALS['plogger_level'] != 'collections') { ?>

    -- HTML code --

    <?php } ?>


    Posted By: phpnoviceDoes this board have a private message function? I would rather not link to my gallery since it is still under a lot of construction.
    You can use the "Whisper" function to add a specific person or comma separated list in the "Whisper your comments" box on your reply. Only this person and administrators / moderators will be able to view it. Or you can email me at sidtheduck SPLAT gmail DOT com
    Thankful People: phpnovice
    • CommentAuthorphpnovice
    • CommentTimeMay 15th 2009
     
    I was able to follow your instructions and got the RSS feed and breadcrumbs set up like I had in mind -- thank you so much!

    The post you linked to is the one I used to change the URLs in 1.0b3. I could easily be missing something, but it looks like generate_url() changed in the trunk r-594 version.

    I had bookmarked that thread but found I couldn't duplicate the modification after I upgraded.
    • CommentAuthorphpnovice
    • CommentTimeMay 16th 2009 edited
     
    I finally tried toggling the "square thumbnails" option back and forth and was able to get my thumbnails to refresh.
    • CommentAuthorphpnovice
    • CommentTimeAug 10th 2010 edited
     
    Posted By: sidtheduck
    Posted By: phpnoviceThebreadcrumbsdisplay the caption. Therewrite URLdisplays the file name, minus extension. I would like the rewrite URL to display the caption.
    Sorry, I misread your post. You should only have to do step #2 in this post ->http://www.plogger.org/forum/discussion/2125/cruftfree-urls/#Item_6

    I have upgraded to Plogger 1.0-RC1, downloaded from the front page of the site.

    Has the code indicated at the link ever been updated for this latest version?

    Thank you.