display an external RSS feed
hi there!
I've been playing with the great Vanilla lately, and I was wondering what's the best way to display an external rss feed in the left menu bar... I thought I can simply integrate a Feed2JS ( http://jade.mcli.dist.maricopa.edu/feed/ ) thingie, but I really don't know how to make it work (where can I paste the javascript code?).
suggestions anyone?
0
This discussion has been closed.
Comments
I dont have much more time to explain but give it a read and have a go and i'm sure someone will be willing to help you if you get stuck.
$MyVariable = "this is a string of characters.";
In order to have the javascript included in the page, you've got to put it in quotes and insert it using the Panel's AddString method.
If you place a string in quotes, you've got to remember to escape any quotes within that string. For example:
$MySentence = "Bobby told Susic, \"But I love you, baby!\"";
In that example, I escaped the quotes around But I love you, baby! by placing a \ in front of the quote.
That's all you really need to know about creating a string in php. So, put your javascript into a string (make sure that any quotes within that javascript are escaped) and add it to the panel.
Alternately, you could put all of your javascript into a file and then just add a link to that file (again, as a string).
Here's an example extension where I will add something to the panel that alerts some javascript:
Here is what my array looks like:
var $Feeds = array('http://beansusy.org/?rss=1§ion=article','http://wordpress.org/development/rss');
What's wrong?
Same issue as thebludrop.
It's almost as though it just does not load at all.