Not signed in (Sign In)

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

    • CommentAuthornatebot
    • CommentTimeJun 23rd 2007
     
    NOTE this tip is from version 2Beta
    If you wish to use html, such as an anchor tag to make a link in your captions, be aware that the TITLE and ALT attributes of your gallery pictures may become malformed.

    For example, if your caption is "<a href="http://www.pigsonparade.org/">Pigs on Parade</a>" the caption seems to render correctly BUT the TITLE and ALT attributes of the gallery image is rendered as:
    <img class="photos-large" src="http://www.yoursite.com/gallery/thumbs/lrg-155-silverhog.jpg" title="<a href=\"http://www.pigsonparade.org/\">Pigs on Parade</a>" alt="<a href=\"http://www.pigsonparade.org/\">Pigs on Parade</a>" />

    OPTION ONE: is to simply use a single quote (') in your html: <a href='http://www.prisonparade.org/'>Pigs on Parade</a> -- though I think technically this violates Web Standards...
    OPTION TWO: is to add STRIP_TAGS to the one line in gallery.php to strip tags from the rendering of the TITLE and ALT attributes

    To do this search gallery.php for
    $imgtag = '<img class="photos-large" src="'.$thumburl.'" title="'.$row["caption"].'" alt="'.$row["caption"].'" />';
    and replace it with
    $imgtag = '<img class="photos-large" src="'.$thumburl.'" title="'.strip_tags($row["caption"]).'" alt="'.strip_tags($row["caption"]).'" />';
    • CommentAuthornatebot
    • CommentTimeJun 23rd 2007
     
    Also, if you do OPTION TWO above you'll want to do a search and replace of 'admin/plog-manage.php'

    To do this search plog-manage.php for
    $imgtag = '<img class="photos" src="'.$thumbpath.'" title="'.$row["caption"].'" alt="'.$row["caption"].'" />';

    and replace it with
    $imgtag = '<img class="photos" src="'.$thumbpath.'" title="'.strip_tags($row["caption"]).'" alt="'.strip_tags($row["caption"]).'" />';