WordPress.org

Forums

[Plugin: WP-SimpleViewer] How to include html tags in caption and write to xml file? (6 posts)

  1. johnnyrd
    Member
    Posted 5 years ago #

    Hi,

    If I try to include html tags that Simple Viewer supports (e.g.
    ) in captions the characters are written to the gallery xml file as ascii characters and therefore not interpreted correctly by the simplie viewer flash file.

    e.g.

    <image>
    <filename>GJ8Z6025.jpg</filename>
    <caption><![CDATA[1
    test]]></caption>
    </image>

    If I edit the caption in the gallery xml file manually to:
    e.g.

    <image>
    <filename>GJ8Z6025.jpg</filename>
    <caption><![CDATA[1
    test]]></caption>
    </image>

    The simple viewer flash file interprets it fine.

    Could someone please point me in the right direction as to what i need to edit to stop php formating html tags to ascii...?

  2. fuggi
    Member
    Posted 5 years ago #

    When I compare the code provided above, I cannot find any difference? Can you check if it has not been copied correctly?

  3. johnnyrd
    Member
    Posted 5 years ago #

    For example in the admin interface I type in the caption:

    Title
    2008
    Canvas
    100 x 100
    $700
    In Stock.

    In the xml the plugin writes:

    <image>
    <filename>GJ8Z6025.jpg</filename>
    <caption><![CDATA[Title
    2008
    Canvas
    100 x 100
    $700
    In Stock.]]></caption>
    </image>

    The above ascii charecters are outputted in the flash file as Title
    2008
    Canvas
    100 x 100
    $700
    In Stock.

    If I edit the xml file manually to the below, everything works fine.
    <image>
    <filename>GJ8Z6025.jpg</filename>
    <caption><![CDATA[Title
    2008
    Canvas
    100 x 100
    $700
    In Stock.]]></caption>
    </image>

    So I need it edit the plugin to stop writing html tags as ascii characters...

  4. johnnyrd
    Member
    Posted 5 years ago #

    Hi, sorry the above didnt show because the browser rendered the ascii tags to html tags automatically, please look at the following pastebin for my post:

    http://pastebin.org/43369

  5. fuggi
    Member
    Posted 4 years ago #

    Now I see...up to now html tags are not working - I will have to look into that if I can fix it...

  6. johnnyrd
    Member
    Posted 4 years ago #

    Thanks, it would be awesome if you could add the option for multiple variables to a photo through the admin interface. This could be achievable through writing to the gallery xml file and dividing each variable with a
    tag as I have done manually.

Topic Closed

This topic has been closed to new replies.

About this Topic