TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 582
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 264
  • Total: 264

RSS Block Code

Started by Sledge, April 17, 2009, 10:45:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sledge

I have a quick question. I'm trying to modify the rss block code so that it shows a horizontal rule between each link. I've got a rss feed for news, but they are all jammed together. It's hard to see where one link ends and another starts. Does anyone know where the code is tucked away for the rss block?

Thanks

http://www.thepoliticalcapital.com

IchBin

You'll most likely have to use a third party script to customize the RSS feed. I don't think TP does anything like what you're looking for. TPModules.php in the Sources/ directory is what file you're looking for.

Zetan

I personally use RSS to Java:

http://itde.vccs.edu/rss2js/build.php

You can customise it somewhat, it uses bullet points. I haven't found one better yet, though I would be interested in one that I could host on my own site. I don't think that one will be around for a long time, so an alternative would be good.

Renegd98


Sledge

#4
I use Magpie for the news feeds in the Ajax tabs at the top of the forum. It's very customizable and works well for what I use it for. The right sidebar is using the built in rss block. I suppose I can use Magpie for the right panel as well. I was just hoping I could add a hr tag to the built in TP feed parser.

*edit*

Did it. Works great. Thanks for the file location Itchbin.

Renegd98

Please share you code changes to help others who may want to make the change.

Sledge

#6
Certainly!

To add a horizontal rule between your titles in the TP 1.0.6b2 built in RSS block do the following:

In your forum sources directory, open TPmodules.php.
Find the following code:

<div class="rss_title">';
printf("<a href='%s'>%s</a>", trim($link),htmlspecialchars(trim($title)));
echo '
</div>';


After the anchor tag (/a), add the hr tag.
Your code will look like this:

<div class="rss_title">';
printf("<a href='%s'>%s</a><hr />", trim($link),htmlspecialchars(trim($title)));
echo '
</div>';


Check the right sidebar of my forum to see the result:

http://www.thepoliticalcapital.com

[edited] Single tags should be formed
, not
-Zetan

G6Cad

Very nice sledge  :up:   Thanks for sharing  :)

IchBin

Ah... misunderstood what you were asking. Glad you figured it out though. lol

This website is proudly hosted on Crocweb Cloud Website Hosting.