[generator] Adding an image between comment links

Jan 13, 2003 11:18

Prerequisites:
Comment link customization
Remote loading of images
NOTE: For a similar tutorial for the Default, Punquin, Notepad, Refried Paper, Clean and Simple, Disjointed and Magazine system styles please see this post; for the Tabular Indent system style, see this post.

One of the ways to make your comment links unique is to add an image in between them. You can do this by adding a small code to your comment link overrides.

To make an image appear in between the comment links on your most recent entries view, you can add an
tag to the comment link override. Your image should be a valid format (.jpg, .gif, .png, etc.) and hosted on some website that allows remote loading. An image tag is formatted like this:



where http://www.example.com/username/image.jpg would need to be replaced with an actual image URL.

To put the image in between links when an entry has comments, add the image tag in the LASTN_TALK_READLINK variable. All together it looks like this:

LASTN_TALK_READLINK<=
%%messagecount%% thought%%mc-plural-s%%
http://www.example.com/username/image.jpg">
<=LASTN_TALK_READLINK
LASTN_TALK_LINKS<=

%%readlink%% share your thoughts

<=LASTN_TALK_LINKS

Here's what you'd get:

3 thoughts
share your thoughts

If you use this method, the image will only appear if there are comments to an entry. You can make the image appear regardless of whether or not there are comments by adding the image tag to the LASTN_TALK_LINKS variable instead. That would look like this:

LASTN_TALK_READLINK<=
%%messagecount%% thought%%mc-plural-s%%
<=LASTN_TALK_READLINK
LASTN_TALK_LINKS<=

%%readlink%%
http://www.example.com/username/image.jpg"> share your thoughts

<=LASTN_TALK_LINKS

So if there were no comments to an entry, your links would look like this:


share your thoughts

Links:
Comment link customization FAQ
Remote loading of images FAQ

contributed by thewildrose

- generator, comment links, images between comment links

Previous post Next post
Up