ADDON: Shortened Image Notes
Just finished a new addon requested here.
What the addon does, is it checks the length of the image notes for the current viewed image. If the notes comprise of more than 300 characters, the text is shortened and "..." is added to the end. A link is displayed to "Read More". You can edit the "300" figure to whatever you want in the addon file itself, it's described in the file comments.
Usage requires two tags.
The first is the tag for the read more link. This tag is <READ_MORE>. You can add html before, and after this using variables in the addon file itself. It's a better idea to do this than to add the extra HTML in your image_template file, because this way will ensure that the HTML only appears when the tag itself appears. As default there's a <br /> tag prefixed, and nothing suffixed.
The second tag is a HTML anchor which should be added to your image_template file, it marks the beginning of the notes, so should be added above <IMAGE_NOTES>. The tag looks like:
Something to bear in mind is that none of your markup will show in the shortened version. So that there are no tags left open, i strip all of the HTML. To make things a little prettier i substitute the paragraph tags with line breaks, and leave them in. Seeing as they close themselves, no problems with unopened tags . Well.. Unless the 300 character split ends up in the middle of a line break tag..
This addon hasn't been fully tested, It almost certainly won't work if you're using the clean image notes tag. If you want it to work with that, email me.
Let me know if this addon works for you!
Download version 0.8 here!
Last edited by tinyblob; 11-21-2005 at 01:15 PM.