RSS BBCode
Posted: 09 Mar 2010, 21:35
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.
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:
Before add: 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:
Subsilver2:
Open styles/subsilver2/template/overall_header.html
Find:
Before add: 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:
Save and upload both files. Refresh templates and themes.
BBCode
Go to ACP and create the RSS BBCode.
BBCode:
HTML Code:
Helpline:
Example:
Demo:
(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:
After add:
Open styles/subsilver2/template/index_body.html
Find:
After add:
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:
Explanation
How to configure the script?
This: tells the name and link to the feed
This: Label tells where the feed is from. Datetime tells which date the entry is created and snippet is the text.
This: tells how many entrys is shown and how they are sorted.
Visit Dynamic Drive for more info.
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.
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>
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>
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>
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>
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;
}
BBCode
Go to ACP and create the RSS BBCode.
BBCode:
Code: Select all
[rss]{IDENTIFIER},{URL1},{NUMBER}[/rss]
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>
Code: Select all
RSS: [rss]Name of RSS,RSS Url,Number of entries[/rss]
Code: Select all
[rss]CNN,http://rss.cnn.com/rss/cnn_latest.rss,10[/rss]
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 -->
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>
Find:
Code: Select all
<!-- INCLUDE forumlist_body.html -->
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" />
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")
This:
Code: Select all
socialfeed.displayoptions("label datetime snippet")
This:
Code: Select all
socialfeed.filterfeed(10, "date")
Visit Dynamic Drive for more info.