RSS BBCode

Mod BBCode Database
BBCodes that need some file editing or extra files
There is no support here! Only Read Access!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

RSS BBCode

Post by Stoker »

RSS BBCode

With the RSS BBCode You can insert RSS feeds in the topics in Your phpBB3 forum.
You can also put a RSS feed on the forum page.
Image

How to do the modifications:
Get Your own Google AJAX Feed API here: http://code.google.com/apis/ajaxfeeds/signup.html
Download the 2 files mentoined in Step 2: here: http://www.dynamicdrive.com/dynamicinde ... player.htm
(gfeedfetcher.js and indicator.gif)
Upload both files to Your root folder.

Prosilver:

Open styles/prosilver/template/overall_header.html
Find:

Code: Select all

</head>
Before add:

Code: Select all

<script type="text/javascript" src="http://www.google.com/jsapi?key=Your Google API Here">
</script>                                                                                                                                                           
<script type="text/javascript" src="gfeedfetcher.js">
/***********************************************
* gAjax RSS Feeds Displayer- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
Attention!! Find this: Your Google API Here in the above code and insert Your Google API key instead.

Open styles/prosilver/theme/colours.css
At the bottom, on a newline, add:

Code: Select all

.labelfield{ /*CSS for label field in general*/
color: #AD2C2C;
font-size: 90%;
}

.datefield{ /*CSS for date field in general*/
color: #828282;
font-size: 90%;
}

#example1 a{ /*CSS specific to demo 3*/
text-decoration: underline;
font-weight: bold;
}

#example1 p{ /*CSS specific to demo 3*/
margin-bottom: 2px;
}

code{ /*CSS for insructions*/
color: red;
}

Subsilver2:

Open styles/subsilver2/template/overall_header.html
Find:

Code: Select all

</head>
Before add:

Code: Select all

<script type="text/javascript" src="http://www.google.com/jsapi?key=Your Google API Here">
</script>                                                                                                                                                           
<script type="text/javascript" src="gfeedfetcher.js">
/***********************************************
* gAjax RSS Feeds Displayer- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
Attention!! Find this: Your Google API Here in the above code and insert Your Google API key instead.

Open styles/subsilver2/theme/stylesheet.css
Scroll down to the bottom and ad this code:

Code: Select all

.labelfield{ /*CSS for label field in general*/
color: #AD2C2C;
font-size: 90%;
}

.datefield{ /*CSS for date field in general*/
color: #828282;
font-size: 90%;
}

#example1 a{ /*CSS specific to demo 3*/
text-decoration: underline;
font-weight: bold;
}

#example1 p{ /*CSS specific to demo 3*/
margin-bottom: 2px;
}

code{ /*CSS for insructions*/
color: red;
}
Save and upload both files. Refresh templates and themes.

BBCode
Go to ACP and create the RSS BBCode.

BBCode:

Code: Select all

[rss]{IDENTIFIER},{URL1},{NUMBER}[/rss]
HTML Code:

Code: Select all

<span style="font-size: 125%; line-height: 116%;"><span style="font-weight: bold;">{TEXT} News</span></span><br />
<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("{IDENTIFIER}", "{URL1}") //Specify "label"
socialfeed.displayoptions("label datetime snippet")
socialfeed.setentrycontainer("div")
socialfeed.filterfeed({NUMBER}, "date")
socialfeed.init() //Always call this last
</script>
Helpline:

Code: Select all

RSS:  [rss]Name of RSS,RSS Url,Number of entries[/rss]
Example:

Code: Select all

[rss]CNN,http://rss.cnn.com/rss/cnn_latest.rss,10[/rss]
Demo:
rss.png
(BBCode not installled, demo not available)

Remember!
You can only use one RSS per page.

Tested in Firefox, IE7 and Opera8

Addon:

If You also want to show RSS news on Your forum index, follow this install instructions:

Open styles/prosilver/template/index_body.html
Find:

Code: Select all

<!-- INCLUDE forumlist_body.html -->
After add:

Code: Select all

<div class="forabg">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
                  <dt>RSS News</dt>
                                             </dl>
				</li>
			</ul>
			<ul class="topiclist forums">
			<li>
<div class="content" style="width: auto; height: auto; padding: 10px;">

<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("USATODAY", "http://rssfeeds.usatoday.com/usatoday-NewsTopStories")
socialfeed.addFeed("CNN", "http://rss.cnn.com/rss/cnn_latest.rss")
socialfeed.addFeed("ABC", "http://feeds.feedburner.com/AbcNews_TopStories")
socialfeed.displayoptions("label datetime snippet")
socialfeed.setentrycontainer("p")
socialfeed.filterfeed(15, "date")
socialfeed.init()
</script>
</div></li></ul>
		<span class="corners-bottom"><span></span></span></div></div>
Open styles/subsilver2/template/index_body.html
Find:

Code: Select all

<!-- INCLUDE forumlist_body.html -->
After add:

Code: Select all

<br clear="all" />
<table class="tablebg" width="100%" cellspacing="1">
   <tr>
      <th>RSS Nyheder</th>
   </tr>
   <tr>
      <td class="row1">
                <div style="width: auto; height: auto; padding: 10px;">

<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("USATODAY", "http://rssfeeds.usatoday.com/usatoday-NewsTopStories")
socialfeed.addFeed("CNN", "http://rss.cnn.com/rss/cnn_latest.rss")
socialfeed.addFeed("ABC", "http://feeds.feedburner.com/AbcNews_TopStories")
socialfeed.displayoptions("label datetime snippet")
socialfeed.setentrycontainer("p")
socialfeed.filterfeed(10, "date")
socialfeed.init() //Always call this last

</script>
</div>
                </td>
   </tr>
   </table>
<br clear="all" />
Upload files and refresh templates.

Authors words

The gfeedfetcher.js script has a built in Alert function.
I find it quite annoying and unnecassary.
The thing is that You get a popup if the feed contains errors. You have to click OK before You can do anything.
You dont need a blocking popup to see if there is a feed error which often is a single entry. The rest of the feed is shown anyway.
To removes this alert do this.
Open gfeedfetcher.js script
Find ad delete:

Code: Select all

if (thisfeed=="") //if error has occured fetching feed
      alert("Google Feed API Error: "+result.error.message)

Explanation

How to configure the script?
This:

Code: Select all

socialfeed.addFeed("USATODAY", "http://rssfeeds.usatoday.com/usatoday-NewsTopStories")
tells the name and link to the feed
This:

Code: Select all

socialfeed.displayoptions("label datetime snippet")
Label tells where the feed is from. Datetime tells which date the entry is created and snippet is the text.
This:

Code: Select all

socialfeed.filterfeed(10, "date")
tells how many entrys is shown and how they are sorted.

Visit Dynamic Drive for more info.
Board rules! No PM support
User avatar
asrock
BBCoder II
BBCoder II
Posts: 26
Joined: 23 Mar 2010, 16:26

Re: RSS BBCode

Post by asrock »

Quick question folks... for this Mod to work correctly on my own forum, do I need to allow guests option for my forum? In other words I have Guests in my ACP set as No Access so would I need to enable that so the Mod / RSS can grab the forum post updates / new posts and stuff?
Image
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 851
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: RSS BBCode

Post by Steve »

asrock » 25 Mar 2010, 23:33 wrote:Quick question folks... for this Mod to work correctly on my own forum, do I need to allow guests option for my forum? In other words I have Guests in my ACP set as No Access so would I need to enable that so the Mod / RSS can grab the forum post updates / new posts and stuff?
There is no settings in the ACP for this mod bbcode. So the answer NO. ;)
what version of phpBB3 are you using ?
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: RSS BBCode

Post by cisco007 »

great thing this mod, i have been looking for it for a while, I integrated it into the simpleportal mod! DEMO:
http://layerbabuena.org/portal.php
User avatar
asrock
BBCoder II
BBCoder II
Posts: 26
Joined: 23 Mar 2010, 16:26

Re: RSS BBCode

Post by asrock »

vectra-mods » 26 Mar 2010, 00:46 wrote:
asrock » 25 Mar 2010, 23:33 wrote:Quick question folks... for this Mod to work correctly on my own forum, do I need to allow guests option for my forum? In other words I have Guests in my ACP set as No Access so would I need to enable that so the Mod / RSS can grab the forum post updates / new posts and stuff?
There is no settings in the ACP for this mod bbcode. So the answer NO. ;)
what version of phpBB3 are you using ?
I'm using 3.0.7-PL1.
Image
Mess
BBCoder II
BBCoder II
Posts: 16
Joined: 30 Mar 2010, 09:36

Re: RSS BBCode

Post by Mess »

cisco007 » 26 Mar 2010, 01:15 wrote:great thing this mod, i have been looking for it for a while, I integrated it into the simpleportal mod! DEMO:
http://layerbabuena.org/portal.php
Hi cisco007,
Would you mind sharing the code you added to achieve the results you got? It looks great, except it seems the news has the wrong labels.
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: RSS BBCode

Post by cisco007 »

I created a html file named feeds.html and inserted it on my simpleportal_body.html with this <!-- INCLUDE feeds.html --> where I wanted it!

these are the contents!

Code: Select all

<script type="text/javascript" src="http://www.google.com/jsapi?key=your API key here!">
</script>
<script type="text/javascript" src="path/to/your/gfeedfetcher.js"></script>
<script type="text/javascript" src="path/to/your/gajaxticker.js">

/***********************************************
* gAjax RSS Ticker- (c) Dynamic Drive (www.dynamicdrive.com)
* Requires "gfeedfetcher.js" class
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
<div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
         <ul class="topiclist">
            <li class="header">
               <dl class="icon">
                  <dt>RSS News</dt>
                                             </dl>
            </li>
         </ul>
         <ul class="topiclist forums">
         <li>
<div class="content" style="width: auto; height: auto; padding: 10px;">
<script type="text/javascript">

var socialfeed=new gfeedrssticker("example2", "example2class", 5000, "")
socialfeed.addFeed("your tag here", "link to your feed here") //Specify "label" plus URL to RSS feed
//socialfeed.addFeed("") //Specify "label" plus URL to RSS feed
socialfeed.addFeed("your tag here", "link to your feed here") //Specify "label" plus URL to RSS feed
socialfeed.displayoptions("label datetime snippet") //show the specified additional fields
socialfeed.setentrycontainer("p") //Display each entry as a DIV
socialfeed.filterfeed(20, "label") //Show 15 entries, sort by label
socialfeed.entries_per_page(5)
socialfeed.init() //Always call this last

</script>
</div></li></ul>
      <span class="corners-bottom"><span></span></span></div></div>
Mess
BBCoder II
BBCoder II
Posts: 16
Joined: 30 Mar 2010, 09:36

Re: RSS BBCode

Post by Mess »

Thanks mate, Ill play with it tomorrow. :)
Mess
BBCoder II
BBCoder II
Posts: 16
Joined: 30 Mar 2010, 09:36

Re: RSS BBCode

Post by Mess »

Dear Stoker,
Could you please provide the bbcode for these 3 also. :D

http://www.dynamicdrive.com/dynamicinde ... roller.htm

I have been trying all day, but I just can't get it to show. Yours is working as intended. But these I just can't get to show anything.
Last edited by Mess on 01 Sep 2010, 13:39, edited 1 time in total.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: RSS BBCode

Post by Stoker »

Sorry, I dont have much time at the moment.
Board rules! No PM support
Locked