Previous Thread
Next Thread
Print Thread
Rate Thread
#283094 01/15/2005 9:03 PM
Joined: Mar 2004
Posts: 26
Junior Member
Junior Member
Offline
Joined: Mar 2004
Posts: 26
How would it be possible to include an RSS news feed (or any other file) into part of my forum? All I can see that can be modified from within the control panel is the header and the footer of the forum. Ideally I would want to insert a nicely formatted RSS news feed where the arrow indicates (using this forum as an example!)
Check the picture.
[]http://img2.imagevenue.com/loc43/th_6c5_forum.jpg[/]
Thanks

Sponsored Links
Luca #283095 01/15/2005 11:11 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Hi Chuck,

1) You'll need an XML parser script. I attached one that I customized a wee bit for threads (plus I added an option for maximum number of items to show, and support for multiple feeds), although I'm sure that you'll want to tweak some of the CSS classes and HTML to suit your own needs. Plus you need to define the RSS feed URL in there too.

So just customize and upload to your threads folder (and obviously rename it to rss.php).

2) Ok now in templates/postlist.tmpl,

Add this...

Code
include ("rss.php"); <br />


Just below this (it's at the very beginning):

Code
<? //UBBTREMARK


Now yours should look something like mine ;-)

http://www.mameworld.info/ubbthreads/postlist3.php?Cat=&Board=loonybin
Attachments
124589-rss.txt (0 Bytes, 43 downloads)

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
but remember that the include command isnt allowed on most rent server for security behavor. It may work or not

If you run IIP as portal you can use a pal box for displaying a newsfeed. there are 2 or more examples in the modification index. Works well on my site.

To create your own feeds from your board to your user its very easy. Set up in the control panel the proper feed and add in include/header-insert.php the following (example):

Code
<link rel="alternate" type="application/rss+xml" title="last 10 News" href="/ubbthreads/ContentIslands/2_rss20.xml" />


Browsers like Firefox now shows in the lower right corner a feed icon if the feed is enabled. Pretty easy.

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]Zarzal said:
but remember that the include command isnt allowed on most rent server for security behavor. It may work or not
[/]

Just to clarify, are you referring to the entire command or just remote-file includes?

Also, Threads and IIP both use includes so obviously they would have that functionality enabled if using this forum software in the first place (?)

Or am I missing something?

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Now excuse me while I bump myself up to Code Monkey

Sponsored Links
Joined: Mar 2004
Posts: 26
Junior Member
Junior Member
Offline
Joined: Mar 2004
Posts: 26
Thanks for your help!
It is very useful.
I have one more question, and please forgive me because my programming is quite weak. I would like to display this news feed in only one of the forums that I have, not in every forum. Would some sort of 'if' statement be required here - if so what variable would it need to test?

Luca #283100 01/17/2005 8:43 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Yeah just wrap this around the include like so...

if ($Board == "keyword_of_board") {
include ("rss.php");
}


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)