Issue: I would like to place some live feeds from other sites into topics on my board, but doHTML does not execute the javascript. How can I do it?Method: Convert the chosen feed to javascript, then use Loth's
Javascript in Posts method to make the doHTML tags execute the code in a post.
You must have doHTML enabled for your usergroup and for the forum you are posting the code in. Assuming you have done that, there are two things you need to do to post a live feed in a topic.
First, you need a current site that will generate the RSS javascript code.
Here is one that doesn't require a link back and allows you to customize the look of the feed:
http://itde.vccs.edu/rss2js/build.phpYou can use the generator to choose how your feed will appear, title links only, add descriptions and specify length of them, time stamps, etc., and even format the colors and styles of the feed. Once you have configured your feed, get the code. You will be placing it between doHTML tags in your post, but not in the normal way.
You can find other RSS code generators by doing a google search for "RSS to javascript"
The other thing you need to know is how to make javascript execute in a post. You will have to split the opening script tag wherever it occurs by splitting the word "script" with an additional set of doHTML tags. This will allow the script to execute. (You do not need to do this with the closing script tag.) A word to the wise: The fact that you can do this is one of the things that makes it dangerous to give HTML permissions to any of your member groups, because if they know about this, they could run malicious scripts on your board. [Many thanks to Loth, who taught me this technique.]
Example:
PREVIEW:
Preview of script installed in portalNote: if you would like instructions on having the feeds display in the portal as in the preview above, please see this topic:
RSS Feeds in PortalYou can also install the feed code anywhere else on your board that will support javascript, such as forum rules, wrappers, or image macros. Importing RSS feeds is a good way to always keep fresh content on your board.