rssReader help

8 views
Skip to first unread message

Sridhar

unread,
Jan 30, 2008, 5:43:50 PM1/30/08
to TiddlyWiki
I have installed rssReader plugin from Bidix.
<<rssReader noDesc URL>> works fine locally, but prints "no rss found"
error message when viewed over http
<<rssReader noDesc proxy.php?url=URL>> works fine over http, but
prints some code and help messages when viewed locally.

How can I add some if condition in a tiddler to be able to view the
page properly all the time?
something like
if(readOnly) <<rssReader noDesc proxy.php?url=URL>>
else <<rssReader noDesc URL>>

Any pointers?

-Sridhar

Eric Shulman

unread,
Jan 30, 2008, 6:00:51 PM1/30/08
to TiddlyWiki
> How can I add some if condition in a tiddler to be able to view the
> page properly all the time?
> something like
> if(readOnly) <<rssReader noDesc proxy.php?url=URL>>
> else

There are several ways to do this. One method is to use an inline
script.

First, install
http://www.TiddlyTools.com/#InlineJavascriptPlugin

Then, put the following in your tiddler content:

<script>
if (document.location.protocol="http:")
return "<<rssReader noDesc proxy.php?url=URL>>"
else
return "<<rssReader noDesc URL>>"
</script>

Whatever text is returned by the script is automatically "wikified",
causing the appropriate macro to be rendered, based on the current
document location.

Note: checking 'readOnly' can't be used to *reliably* identify when
your document is online, since this setting can be changed in
[[AdvancedOptions]]: clear the "Hide editing features over HTTP"
checkbox and reload the document... it will no longer be in 'readOnly'
mode.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
Reply all
Reply to author
Forward
0 new messages