Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#205 2012-01-05 21:33:30

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: [Archived] bit_rss

I’m still using bit_rss 0.3 (I guess I never figured out the simplepie thing—it’s been a while and I don’t remember) but anyway I was wondering if there was a way to get it to parse html when it displays a feed… for example, on my front page here: http://opalcat.com if you scroll down to “Recently Updated Gallery Items:” you will see the captions for the images show <br /> tags and "&quot;" and stuff… which looks really messy :( (you can also see it on the page for that here)

Any ideas?

Last edited by OpalCat (2012-01-05 21:35:47)



WebKat

Offline

#206 2012-01-05 23:37:08

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: [Archived] bit_rss

I’ve not used the plugin but based on the initial forum post it looks like you could set encode_html to 0. Since that’s the default though you either have it set to 1, true or yes or it stopped working.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#207 2012-01-05 23:47:44

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: [Archived] bit_rss

I tried adding encode_html=“0” and that didn’t make a difference. Then I tried encode_html=“1” just to see if it would change anything and it looked exactly the same.



WebKat

Offline

#208 2012-01-05 23:56:13

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: [Archived] bit_rss

I can’t get to the plugin so it’s tough to help without looking at the code. I suppose you coulde “decode” the encoded html as a last resort using rah_function

<txp:rah_function call="html_entity_decode">
YOUR BIT_RSS CODE THATS RESULTING IN ENCODED HTML GOES HERE
</txp:rah_function>

Not Tested

Since you control the content from the rss feed this should be safe. If you were parsing a feed from somewhere else you’d want to be more careful.

Or maybe aks_rss can replace bit_rss? It’s based on bit_rss and looks like it’s still supported by the developer.

Last edited by MattD (2012-01-06 00:09:03)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#209 2012-01-06 00:10:13

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: [Archived] bit_rss

Thanks for those options, I’ll look at both of them.



WebKat

Offline

#210 2012-01-06 00:16:16

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: [Archived] bit_rss

One last idea. If you add strip_html and add br to it’s list of tags to strip does the br go away?

strip_html('base, blink, body, doctype, embed, font, form, frame, frameset, html, iframe, input, marquee, meta, noscript, object, param, script, style, br')

My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#211 2012-01-06 01:09:03

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: [Archived] bit_rss

The rah_function code is working right now. Ultimately I’d like to upgrade to the newer rss plugin, but I need some hand-holding for that (I posted in that thread).



WebKat

Offline

#212 2012-01-18 18:25:43

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: [Archived] bit_rss

I’m still planning on eventually getting moved over to aks_rss, but in the meantime I was wondering if it’s possible to format this feed the way I want to… here is the raw feed: http://fff.fathom.org/forums/external.php?type=rss2

You’ll notice that there are things like <dc:creator>sangfroid</dc:creator> in it, which is the username of the person who created that post. I’d like to include that in my feed on my page… Can I? Is it possible? Here is my current form:

        <div class="line_spacing"><span class="forum_title">"<txp:permlink><txp:title /></txp:permlink>"</span>, <span class="small"><em>latest post <txp:posted format="%m/%d/%Y" /> at <txp:posted format="%l:%M %P" /></em></span> <span class="smallcaps"> ~    
 <txp:permlink>Read Thread</txp:permlink> &rarr;</span><br /></div>

Which results in entries like this: "Paper or Plastic?", latest post 01/07/2012 at 04:17 PM ~ Read Thread →

I’d like them to be more like this: "Paper or Plastic?", latest post 01/07/2012 at 04:17 PM by [name] ~ Read Thread →

Is this possible, and if so, how?



WebKat

Offline

#213 2012-01-20 21:38:52

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: [Archived] bit_rss

I have another problem… I want to include the url to each of the individual items in the rss feed on the print.css stylesheet so that people can still see where they go to… here is my form:

    <h3><txp:permlink><txp:title /></txp:permlink></h3>
    <blockquote>
        <p><txp:rss_auto_excerpt words="75" showlinkwithexcerpt="0" /></p>
        <p align="right" class="smallcaps"><em>~ <txp:posted /></em><br><span class="noprint"><txp:permlink>Go To Entry</txp:permlink> &rarr;</span></p>
<p align="left" class="print_only" style="font-size:.7em;"><txp:permlink /></p>
    </blockquote>

The problem is that it displays the same url for each entry in the feed, rather than giving the url for each one. Also, it’s giving a url as if it were on my website (my server/domain) when the feed is coming from another site. The same permlink tag is linking to the correct url, so why isn’t it displaying the correct url? I’m so confused!

You can see it at http://opalcat.com in the “latest journal entry” section—look at where it says “Go To Entry →” on the screen, then do a print preview—it replaces that with the url. But if you look at the next journal entry, it gives the same url, etc etc etc.

For example, right now the first item in the “Most Recent Journal/Blog Entries:” goes to http://opalcat.livejournal.com/2294130.html (with the <txp:permlink> tag) yet the displayed url when I do a print preview, using <txp:permlink /> is http://opalcat.com//late-late-for-a-veryimportant-date-well-work-anyway …obviously NOT the same link and also not viable. What’s going on here?
What am I doing wrong?

Last edited by WebKat (2012-01-20 23:45:46)



WebKat

Offline

Board footer

Powered by FluxBB