Not signed in (Sign In)

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

Please sign in or apply for membership to remove the ads
    • CommentAuthorkvnkvn
    • CommentTimeApr 3rd 2008
     
    Hello,

    I am having trouble getting plogger to work on my site.

    Please see:
    http://www.realtruthtv.com/pictures2.php

    This seems fine,

    But, click an album and I lose the whole site, but plogger is still working.

    I need help getting this resolved.

    Thanks,

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 4th 2008 edited
     
    kevin,

    It looks like you are using the "Cruft-free URLs" using mod_rewrite, correct? I believe it has to do with the fact that the mod_rewrite rule written to your .htaccess file translates the urls based off of "index.php". To fix this, try opening your .htaccess file (located in the main folder of plogger) and you should see the following:

    # BEGIN Plogger

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /gallery
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^.*$ - [S=2]
    RewriteRule feed/$ plog-rss.php?path=%{REQUEST_URI} [L]
    RewriteRule ^.*$ index.php?path=%{REQUEST_URI} [L]
    </IfModule>
    # END Plogger

    now edit the 3rd line from the bottom to read:

    # BEGIN Plogger

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /gallery
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^.*$ - [S=2]
    RewriteRule feed/$ plog-rss.php?path=%{REQUEST_URI} [L]
    RewriteRule ^.*$ pictures2.php?path=%{REQUEST_URI} [L]
    </IfModule>
    # END Plogger

    Try it out. Hopefully that works for you!
    • CommentAuthorkvnkvn
    • CommentTimeApr 4th 2008
     
    Thank you for your response.

    I can not find a Htaccess file.

    I do not have a plogger folder, except in the lib folder.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 4th 2008 edited
     
    Kevin,

    It should be in your root folder (the way it looks from your setup). Should be same location as 'pictures2.php', 'index.html', and 'index.php'.
    • CommentAuthorkvnkvn
    • CommentTimeApr 5th 2008
     
    I still cant find that file.

    It is not in my root folder.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 6th 2008
     
    Try this then, kevin.

    Open 'admin/plog-admin-functions.php' and search for 'function configure_mod_rewrite' and you should find the following code for the first part of the function:
    function configure_mod_rewrite($enable = false) {
    $cfg = "";
    $placeholder_start = "# BEGIN Plogger";
    $placeholder_end = "# END Plogger";
    $thisfile = "/admin/" . basename(__FILE__);
    $adm = strpos($_SERVER["PHP_SELF"],"/admin");
    $rewritebase = substr($_SERVER["PHP_SELF"],0,$adm);
    if ($enable) {
    $cfg .= "\n";
    if (empty($rewritebase))
    {
    $rewritebase = "/";
    };
    $cfg .= "<IfModule mod_rewrite.c>\n";
    $cfg .= "RewriteEngine on\n";
    $cfg .= "RewriteBase $rewritebase\n";
    $cfg .= "RewriteCond %{REQUEST_FILENAME} -d [OR]\n";
    $cfg .= "RewriteCond %{REQUEST_FILENAME} -f\n";
    $cfg .= "RewriteRule ^.*$ - [S=2]\n";
    $cfg .= "RewriteRule feed/$ plog-rss.php?path=%{REQUEST_URI} [L]\n";
    $cfg .= "RewriteRule ^.*$ index.php?path=%{REQUEST_URI} [L]\n";
    $cfg .= "</IfModule>\n";
    };


    Then change the line:
    $cfg .= "RewriteRule ^.*$ index.php?path=%{REQUEST_URI} [L]\n";
    to:
    $cfg .= "RewriteRule ^.*$ pictures2.php?path=%{REQUEST_URI} [L]\n";

    Finally, do the following:
    1. Log in to the plogger admin
    2. Click the Options tab
    3. Uncheck "Generate Cruft-Free URLs" & click "Update Options"
    4. Re-check "Generate Cruft-Free URLs" & and click "Update Options" again

    This should have re-written the rule to your .htaccess file using 'pictures2.php' instead of 'index.php' and your album *should* be displaying correctly. If not, change the line in the functions back again and we'll try something else.
    • CommentAuthorkvnkvn
    • CommentTimeApr 6th 2008
     
    Okay,

    We are getting there.

    Now I can go into a collection, but when I click an album, I lose my css, and site is messed up. Close but no cigar.

    I really do appreciate the help though. I feel confident we are near a solution.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 6th 2008 edited
     
    Great! Now all you have to do is add an absolute URL to your CSS link (instead of a relative link).

    Currently, it looks like you have:
    <link href="style.css" rel="stylesheet" type="text/css" />and you should change it to:
    <link href="http://www.realtruthtv.com/style.css" rel="stylesheet" type="text/css" />or even:
    <link href="/style.css" rel="stylesheet" type="text/css" />should work.

    I think this should be located in the head tags of your "pictures2.php" file. If you change that, it should bring in the correct CSS code for all levels (collection, album, picture, etc.).
    • CommentAuthorkvnkvn
    • CommentTimeApr 7th 2008
     
    Oh, so close,

    Another level worked, but it still gets crazy when I look into an album and I lose my top banner for the page. Closer than last time, Progress has me pleased. Thanks again.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 7th 2008
     
    Kevin,

    It looks like the CSS is working on all levels for me. However, on a "picture" level, the image is too large that it breaks your layout. I would open up Plogger admin, go to Options, check the "Generate Intermediate Pictures?", and make the "Intermediate Picture Width (pixels):" about 400-600 (pixels). Then your layout should still stay the same down to the picture level. If you still want to give the users access to your full size images, make sure the "Allow Full Picture Access:" is checked and then users can click on the smaller image and the full image will be opened.

    Great that you got it working!
    • CommentAuthorkvnkvn
    • CommentTimeApr 7th 2008
     
    I think you might want to strangle me after this one.

    Couple things.

    1. When I click on collections, it takes me to my home page.

    2. Notice the top banner
    -- level 1 collections still there
    -- level 2 still there
    -- level 3 disappears
    -- level 4 disappears

    3. Seach function is not working correctly, it also takes me to my home page.

    Thanks again for your help.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 7th 2008
     
    Not a problem at all, Kevin!

    Posted By: kvnkvn1. When I click on collections, it takes me to my home page.

    Open 'plog-functions.php' and go to the first function, generate_breadcrumb:
    function generate_breadcrumb(){
    global $config;

    $id = $GLOBALS["plogger_id"];

    switch ($GLOBALS['plogger_level']) {
    case 'collection':
    $row = get_collection_by_id($id);

    $breadcrumbs = ' <a accesskey="/" href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> &raquo; <b>' . SmartStripSlashes($row["name"]) . '</b>';
    if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' &raquo; ' . plog_tr('Slideshow');

    break;
    try changing: $breadcrumbs = ' <a accesskey="/" href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> &raquo; <b>' . SmartStripSlashes($row["name"]) . '</b>';to: $breadcrumbs = ' <a accesskey="/" href="'.$_SERVER['PHP_SELF'].'">' . plog_tr('Collections') . '</a> &raquo; <b>' . SmartStripSlashes($row["name"]) . '</b>';That should take care of that.

    Posted By: kvnkvn2. Notice the top banner
    -- level 1 collections still there
    -- level 2 still there
    -- level 3 disappears
    -- level 4 disappears
    In your 'pictures2.php' file, change:<img src="images/banners/EHR%20Banner%20Fox%20Sports%20720%2090.jpg" width="728" height="90" />to:<img src="/images/banners/EHR%20Banner%20Fox%20Sports%20720%2090.jpg" width="728" height="90" />or:<img src="http://www.realtruthtv.com/images/banners/EHR%20Banner%20Fox%20Sports%20720%2090.jpg" width="728" height="90" />#2 is knocked out!

    Posted By: kvnkvn3. Seach function is not working correctly, it also takes me to my home page.
    Again in 'plog-functions.php' find the function, generate_search_box:function generate_search_box(){
    global $config;

    $output = '
    <form action="'.$config["baseurl"].'" method="get">
    <div>
    <input type="hidden" name="level" value="search" />
    <input type="text" name="searchterms" />
    <input class="submit" type="submit" value="' . plog_tr('Search') .'" />
    </div>
    </form>';

    return $output;
    }
    try changing: <form action="'.$config["baseurl"].'" method="get">to: <form action="'.$_SERVER['PHP_SELF'].'" method="get">Boom, that should do it!
    • CommentAuthorkvnkvn
    • CommentTimeApr 7th 2008
     
    Bye - Gully, I see the light at the end of the tunnel.

    1. Kinda Worked
    2. Worded
    3. Worked

    When I click collections

    Level 1 takes me back to pictures2.php
    Level 2 takes me back to pictures2.php
    Level 3 takes me back to the home page still
    Level 4 takes me back to the home page still

    Thanks again,

    It's cool you take this much time to help someone.
    We are making progress.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 8th 2008
     
    Posted By: kvnkvnBye - Gully, I see the light at the end of the tunnel.

    1. Kinda Worked
    bleh, I forgot to mention the other cases. In 'plog-functions.php' under generate_breadcrumbs:
    case 'album':
    $row = get_album_by_id($id);

    $album_name = SmartStripSlashes($row["name"]);
    $album_link = generate_url("album",$row["id"]);

    $row = get_collection_by_id($row["parent_id"]);

    $collection_link = '<a accesskey="/" href="' . generate_url("collection",$row["id"]) . '">' . $row["name"] . '</a>';

    if ($GLOBALS['plogger_mode'] == "slideshow") {
    $breadcrumbs = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . '<a href="'.$album_link.'">'.$album_name.'</a> &raquo; ' . ' <b>' . plog_tr('Slideshow') . '</b>';
    } else {
    $breadcrumbs = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . '<b>'.$album_name.'</b>';
    }

    break;
    change both locations of: $breadcrumbs = ' <a href="'.$config["baseurl"].'">[. . .]to: $breadcrumbs = ' <a href="'.$_SERVER['PHP_SELF'].'">[. . .]

    Then find (in the same function):
    case 'picture':
    $row = get_picture_by_id($id);
    $picture_name = get_caption_filename($row);

    $row = get_album_by_id($row["parent_album"]);

    $album_link = '<a accesskey="/" href="' . generate_url("album",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';

    $row = get_collection_by_id($row["parent_id"]);

    $collection_link = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> ' . ' &raquo; ' . '<a href="' . generate_url("collection",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';

    $breadcrumbs = $collection_link . ' &raquo; ' . $album_link . ' &raquo; ' . '<span id="image_name"><b>' . $picture_name.'</b></span>';

    if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' &raquo; ' . plog_tr('Slideshow');

    break;
    change: $collection_link = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> ' . ' &raquo; ' . '<a href="' . generate_url("collection",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';to: $collection_link = ' <a href="'.$_SERVER['PHP_SELF'].'">' . plog_tr('Collections') . '</a> ' . ' &raquo; ' . '<a href="' . generate_url("collection",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';
    • CommentAuthorkvnkvn
    • CommentTimeApr 8th 2008
     
    I have done it now.

    Nothing will come up.

    This is the error I got
    Parse error: parse error, unexpected T_STRING in /hsphere/local/home/kvnkvn/realtruthtv.com/plog-functions.php on line 32

    I managed to erase the file that did work.

    So now, pictures2.php will show nothing.

    On that line 32, where you told me to change both locations, one of the lines (#32) is a different color in Dreamweaver.

    Oh man, what have I done.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 8th 2008
     
    don't panic, kevin! :P It should be easily fixable.

    Can you post the code from your 'plog-functions.php' file from case 'album' to case 'search' (including case 'picture')? I can take a look. It's probably just that a quote or period was accidentally erased. If line #32 is a different color in Dreamweaver, it probably means that in that line, or the one you changed before, a single or double quote is missing (so it's not "closed").
    • CommentAuthorkvnkvn
    • CommentTimeApr 8th 2008
     
    case 'album':
    $row = get_album_by_id($id);

    $album_name = SmartStripSlashes($row["name"]);
    $album_link = generate_url("album",$row["id"]);

    $row = get_collection_by_id($row["parent_id"]);

    $collection_link = '<a accesskey="/" href="' . generate_url("collection",$row["id"]) . '">' . $row["name"] . '</a>';

    if ($GLOBALS['plogger_mode'] == "slideshow") {

    $breadcrumbs = ' <a href="'.$_SERVER['PHP_SELF'].'">[. . .]
    } else {

    $breadcrumbs = ' <a href="'.$_SERVER['PHP_SELF'].'">[. . .]
    }

    break;
    case 'picture':
    $row = get_picture_by_id($id);
    $picture_name = SmartStripSlashes(basename($row["path"]));

    $row = get_album_by_id($row["parent_album"]);

    $album_link = '<a accesskey="/" href="' . generate_url("album",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';

    $row = get_collection_by_id($row["parent_id"]);

    $collection_link = ' <a href="'.$_SERVER['PHP_SELF'].'">' . plog_tr('Collections') . '</a> ' . ' &raquo; ' . '<a href="' . generate_url("collection",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';

    $breadcrumbs = $collection_link . ' &raquo; ' . $album_link . ' &raquo; ' . '<span id="image_name"><b>' . $picture_name.'</b></span>';

    if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' &raquo; Slideshow';


    break;
    case 'search':
    $breadcrumbs = 'You searched for <b>'.htmlspecialchars($_GET["searchterms"]).'</b>.';
    break;
    default:
    $breadcrumbs = ' <b>Collections</b>';
    break;
    }

    return '<div id="breadcrumb_links">'.$breadcrumbs.'</div>';
    }
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 8th 2008 edited
     
    Oh! The [. . .] in my above post for the $breadcrumbs was to show that there was more code there. All I wanted you to do is replace $config["baseurl"] with $_SERVER['PHP_SELF']. So those code lines should read:
    if ($GLOBALS['plogger_mode'] == "slideshow") {
    $breadcrumbs = ' <a href="'.$_SERVER['PHP_SELF'].'">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . '<a href="'.$album_link.'">'.$album_name.'</a> &raquo; ' . ' <b>' . plog_tr('Slideshow') . '</b>';
    } else {
    $breadcrumbs = ' <a href="'.$_SERVER['PHP_SELF'].'">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . '<b>'.$album_name.'</b>';
    }

    Sorry for the confusion!
    • CommentAuthorkvnkvn
    • CommentTimeApr 8th 2008
     
    Yes!!

    That seems to work!!!

    Let me ask you this, I might be getting greedy here.

    3 Things.

    1. In regards to comments, how come they are centered, I would like them to be left aligned.

    2. How can I turn of full size pics, I hit the checkbox in admin, but it turns off my other pics as well.

    3. Is there a way to turn the save as off, so no downloads can take place?

    Thanks,

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 8th 2008 edited
     
    Short answers (I'll answer more later).

    1. Yes this can be done.
    - Looking at your site, it doesn't look like you have comments on. Are you talking about the captions/descriptions?
    2. You should be able to.
    - Before you uncheck this box, make sure you view all of your albums (so the thumbnails and intermediate pictures are created in the thumbs folder), then you can turn it off and people should still be allowed to see your thumbnails and intermediate sized pictures.
    3. Kind of, but not really
    - See this excellent article by James Huggins -> http://www.jamesshuggins.com/h/web1/how_do_i_stop_downloading.htm
    • CommentAuthorkvnkvn
    • CommentTimeApr 8th 2008
     
    1. As for the comments, I have those off until I resolved the issue.

    -------

    Another bump in the road. "The road never travels smooth"(singing)

    Now, when I am in the photo gallery, everything works inside that, but when I click one of my links from level 3 on it takes me to the collection instead of the correct page.

    Kevin
    •  
      CommentAuthorsidtheduck
    • CommentTimeApr 8th 2008
     
    1. Can you turn them on so I can see what you mean? I really think this should be easily doable through your CSS file or the theme file (although it looks like you are centering all of the Plogger stuff within a centered div). Just add text-align: left; to the CSS of the parts you want to the left.

    Regarding your other links, it would be better to use absolute paths on them as well (not relative, sub-paths).

    So, in 'pictures2.php' you need to add "/" slashes to the beginning of your link hrefs like so:
    <p align="right"><a href="/index.html" class="footer">Home</a></p>
    [. . .]
    <tr>
    <td class="buttonp"><a href="/video.htm" class="button">Video Area</a></td>
    </tr>
    <tr>
    <td class="buttonp" style="padding-top:15px;"><a href="/pictures.htm" class="button">Picture Area</a></td>
    </tr>
    <tr>
    <td class="buttonp" style="padding-top:17px;"><a href="/inthecommunity.htm" class="button">In The Community</a></td>
    </tr>
    <tr>
    <td class="buttonp" style="padding-top:19px;"><a href="/businessspotlight.htm" class="button">Business Spotlight </a></td>
    </tr>
    <tr>
    <td class="buttonp" style="padding-top:19px;"><a href="/about.htm" class="button">About The Site</a></td>
    </tr>
    <tr>
    <td class="buttonp" style="padding-top:16px;"><a href="/contact.htm" class="button">Contact us </a></td>
    </tr>
    <tr>
    <td class="buttonp" style="padding-top:17px;"><a href="/advertise.htm" class="button">Advertise With Us</a></td>
    </tr>

    and in the footer too:
    <p><a href="/index.html" class="footer">Home</a> | <a href="/video.htm" class="footer">Video
    Area</a> | <a href="/pictures.htm" class="footer">Picture Area</a>
    | <a href="/inthecommunity.htm" class="footer">In The Community</a>
    | <a href="/businessspotlight.htm" class="footer">Business Spotlight</a>
    | <a href="/about.htm" class="footer">About The Site</a> | <a href="/contact.htm" class="footer">Contact
    Us</a> | <a href="/advertise.htm" class="footer">Advertise With Us</a>
    </p>