Not signed in (Sign In)

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

    • CommentAuthorsolemnchaos
    • CommentTimeMar 12th 2006 edited
     
    this is a relatively easy way to remove extensions (.jpg, .png, etc...) from the filenames displayed in the breadcrumbs, albums, and searches. This won't remove them from the url or address bar (that's much more complicated). It also won't work well if you have extra "."'s in your filenames. Back up your gallery.php before making changes. I haven't run into any problems using this method, but use at your own risk.
    To see it working:
    http://www.solemnchaos.com/gallery/
    --------------------------
    (1)open gallery.php and add this function somewhere (I added it to the end of the gallery.php file):


    function strip_ext($fext)
    {
    return substr($fext, 0, strrpos($fext, '.'));
    }


    (2)then search for:

    $filename = basename($row["path"]);

    it should appear twice (approx. line 334 and line 428). After each occurrence, add this line:

    $filename = strip_ext($filename);


    (3)finally add this line at approx. line number 757 (between the line that starts with "$collection_link =", and the line that starts with "$breadcrumbs =", it's in the generate_breadcrumbs function under the "case 'picture':" section):

    $picture_name = strip_ext($picture_name);

    ---------------------------------------

    hope this helps.

    Brandt
    • CommentAuthorDAN900
    • CommentTimeJun 28th 2006
     
    Sweet! just what i needed
  1.  
    Damn iam lucky i took a backup ;)
    sorry didnt workout for me. :(