Not signed in (Sign In)

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

  1.  
    It seems that under certain circumstances, that the function
    plogger_get_source_picture_url() : Line 1964 plog-functions.php

    Will return a basepath with the filename that plogger is embedded into attached appended to the end of the string. I modified the function to prevent this :

    function plogger_get_source_picture_url() {
    global $config;
    if(!is_dir($config["baseurl"])){
    return substr($config["baseurl"],0,strrpos($config["baseurl"],"/")).'/images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]);
    }
    else {
    return (!empty($config['allow_fullpic'])) ? $config["baseurl"].'images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";
    }
    }

    I dont really have the time to dig into the circumstances causing this at the moment, however if I get a chance to do any research into it ill post my findings here.
    Thankful People: infamous_iv
  2.  
    Also, an integration note. In firefox, if you include the gallery inside of a container div, the display div can overlap and display outside those bounds. In order to resize the container div along with the gallery's div, I used the following code after the close of the container :

    <script type="text/javascript" lang="JavaScript">
    for (var i = 0; i < document.getElementById('gallery_container').childNodes.length; i++) {
    if(document.getElementById('gallery_container').offsetHeight < document.getElementById('gallery_container').childNodes[i].offsetHeight) {
    document.getElementById('gallery_container').style.height = document.getElementById('gallery_container').childNodes[i].offsetHeight + 10;
    }
    }
    </script>
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 7th 2008
     
    Hi silent_ninja1 -

    Thanks for letting us know about these issues! I believe that they have been fixed in the latest SVN version, which hasn't been released yet.

    If you are would like to use the version with the implemented bug fixes for Beta 3.0 from the SVN trunk, please download using this link to revision 549.
  3.  
    Hey guys -

    I also had the same problem where it was returning a path with http://www.mywebsite/images.phpimages/ where /images.phpimages/ is not a valid directory thus resulting in a 404 error.

    Silent Ninja.. your code worked perfect however I believe that most people who install Plogger and use the default option actually have there images in http://www.mywebsite.com/plogger/images/collection_name/collection/

    If you are experiencing this problem and you do have your pictures stored as I have stated above, SilentNinjas code can be modified as follows to correct the error:

    function plogger_get_source_picture_url() {
    global $config;
    if(!is_dir($config["baseurl"])){
    return substr($config["baseurl"],0,strrpos($config["baseurl"],"/")).'/plogger/images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]);
    }
    else {
    return (!empty($config['allow_fullpic'])) ? $config["baseurl"].'plogger/images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";
    }
    }

    thanks for your help SN and kim.. hope this helps some of you guys. if you need any help feel free to contact me at brian [dot] web [at] cella [dot] cc
    • CommentAuthorbevw
    • CommentTimeAug 8th 2008
     
    This hasn't worked for me...
    I get a wrong pathname and no photo in FireFox. In IE I get the pathname with the placeholder (wrong word?) for the missing photo.

    See my thread on PHP upgrade.

    - Bev
  4.  
    bevw -

    what you need to do is change the portion of the code to the path to your images in your gallery directory.. see below:

    function plogger_get_source_picture_url() {
    global $config;
    if(!is_dir($config["baseurl"])){
    return substr($config["baseurl"],0,strrpos($config["baseurl"],"/")).'/yourgallerydir/images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]);
    }
    else {
    return (!empty($config['allow_fullpic'])) ? $config["baseurl"].'yourgallerydir/images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";
    }
    }

    let me know if you need help.. i'll try to work with you
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 8th 2008 edited
     
    bevw, infamous_iv, SiLeNt_NiNjA1 (and anyone else who is having issues with full picture links), check out this discussion to fix the problem you are having -> http://www.plogger.org/forum/discussion/1949/
    • CommentAuthorbevw
    • CommentTimeAug 8th 2008
     
    Hi again,
    I tried several times with the new code, adding my gallery directory name ("catalogue") but the output is still always wrong. Here's what I get:

    <img class="photos-large" src="/catalogue/index.phpimages/browse_by_item/armoires___wardrobes/3-ef242-miniwardrobe.jpg" title="Mini Wardrobe" alt="Mini Wardrobe" />

    The "baseurl" is dumping more than it should? Infamous, I've e-mailed you my site url. Thanks for your help.

    Bev
    • CommentAuthorbevw
    • CommentTimeAug 8th 2008
     
    Hi guys,

    Okay I tried the code from this thread and the one Sid pointed me to. No go for either one. Currently in the config file I'm using:

    function plogger_get_source_picture_url() {
    global $config;
    return (!empty($config['allow_fullpic'])) ? $config["gallery_url"].'images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";
    }

    and the output is:
    <img class="photos-large" src="/catalogue/index.phpimages/browse_by_item/armoires___wardrobes/3-ef242-miniwardrobe.jpg" title="Mini Wardrobe" alt="Mini Wardrobe" />

    Still wrong. Ugh.
    - Bev
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 8th 2008 edited
     
    Hi bevw,

    This is the incorrect code from $config['baseurl'] -> /catalogue/index.php

    $config['gallery_url'] should be whatever you have entered under the "Gallery URL" input box in your Admin -> Options (so I'm guessing it's not "/catalogue/index.php").

    Just looking at your pages now, it looks like the full image path is being outputted before the actual image tag:
    http://www.mennonitefurnituregallery.com/catalogue/images/browse_by_item/armoires___wardrobes/3-ef242-miniwardrobe.jpg

    ETA: So it looks like you have intermediate images turned off. Look for the following code under the generate_thumb() function (should be starting around line 482 of plog-functions.php):
    if (1 == $thumb_config['disabled']) {
    return $config['baseurl'] . '/images/' . $path;
    }


    and change it to:
    if (1 == $thumb_config['disabled']) {
    return $config['gallery_url'] . '/images/' . $path;
    }


    Sorry about that, I was looking at the updated SVN Plogger code and had already updated that function. Once I looked at the beta 3.0 code, I could see that code is most likely the issue.
    • CommentAuthorbevw
    • CommentTimeAug 9th 2008
     
    YAYEEEE! Sid, this last change worked. Thank you again to everyone who helped me with this problem- Infamous4 and SilentNinja

    Sid, do ever get tired of the words of gratitude and praise that pile up around your feet?

    - Bev