That fixed the problem for me. Now it outputs nicely for html. Take a look at the first entry here:
http://www.cmssandbox.com/MODx095/index.php?id=57
Would it be possible to have it output the text, but html decoded as SimplePie and FireFox do:
Instead of making a clickable link called "Google" like the above example shows, it outputs:
<a href="
http://www.google.com">Google</a>
Maybe make this a parameter? I think the first option should be the default. Also, would it be possible to make certain text found in feeds automatically clickable? Like when parsing the <content> element on the Google Calendar feed, it would convert instances "www.blah.com" and "
http://www.blah.com" into clickable links?
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
One last question. I am still having trouble with the &sortElements parameter. What would the parameter look like if I wanted to sort a Google Calender feed by its start time?
&sortElements=`ENTRY(GD:WHEN|STARTTIME DESC)` is what I was trying. Although it doesn’t seem to work as the sorting doesn’t change if I change from ASC to DESC and vice versa.
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
Brian,
One quick thing I noticed while integrating this into GoogleEvents. If the method getData is called directly the config parameter &cachType is ignored and the cache file is created and used on successive calls. Not a big deal, just makes testing a little more difficult.
@Kyle,
I could add an option to disable caching altogether but figured setting the cacheTime to 1 second would suffice. Currently cacheType only controls whether the rendered output or just the parsed XML data is cached. I’m more than happy to add the option to disable it altogether would be beneficial...
Ah, sorry... I didn’t read the docs on what cacheType was, I thought it turned off the caching. I can just set the time to 1 like you said, that is easy enough.
Thanks,
Kyle