Not signed in (Sign In)

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

    • CommentAuthornd341
    • CommentTimeOct 21st 2006
     
    Is there an easy way to add the caption truncation from Plogger 2.1 back into Beta 3 (I'm using the latest from SVN)?

    I tried to combine the following two things, but didn't succeed:

    from beta 3:

    function plogger_get_picture_caption() {
    if (!empty($GLOBALS["current_picture"]["caption"]))
    return htmlentities(SmartStripSlashes($GLOBALS["current_picture"]["caption"]));
    else
    return " ";
    }

    from 2.1:

    function plogger_get_picture_caption() {
    if (!empty($GLOBALS["current_picture"]["caption"]))
    return htmlentities(SmartStripSlashes($GLOBALS["current_picture"]["caption"]));
    else
    return " ";
    }


    I just discovered Plogger a week ago. It's still not finished but already the best out of all scripts I tried. It's like Gallery without all the heavy load of extra functions one rarely needs.
    • CommentAuthornd341
    • CommentTimeOct 23rd 2006
     
    I just made a fool out of myself by copying the same lines twice.

    What I meant is this function from Plogger 2.1 (gallery.php):

    $filename = basename($row["path"]);
    if (strlen($filename) > $config["truncate"] && $config["truncate"] != 0)
    $filename = substr($filename, 0, $config["truncate"])."...";
    $output .= $filename;


    Is it easy to add the truncation above to the caption output in beta 3 below?
    I tried to combine those but failed...

    function plogger_get_picture_caption() {
    if (!empty($GLOBALS["current_picture"]["caption"]))
    return htmlentities(SmartStripSlashes($GLOBALS["current_picture"]["caption"]));
    else
    return " ";
    }