BBCode for hosted RSS

New BBCodes, tips and tricks, hacks and MODs for the BBCode system

Re: BBCode for hosted RSS

Postby jackane24 » 18 Feb 2008, 21:14

Stoker wrote:MOD Name: BBCode for hosted RSS
MOD Authors: BBCode created by Stoker & script from DynamicDrive
Demo: Stokers Playground
Description: This BBcode gives You the opportunity to ad RSS Feeds to Your forum.
There is a various way to do this and the styling can be customized.

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.


I've put these both in the following directory - /root/

Open styles/prosilver/theme/colours.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;
}


Done this.

Save and upload both files. Purge cache.


Upload both files? How do I upload? Have I done this already by dragging and dropping?

Go to ACP and create the RSS BBCode.

BBCode:
Code: Select all
[rss]{TEXT},{URL1}[/rss]


HTML Code:
Code: Select all
<p style="text-align: right">» <a href="javascript:socialfeed.init()">Update</a> «</p>

<script type="text/javascript" src="http://www.google.com/jsapi?key=Put Your API key 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>
<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("{TEXT}", "{URL1}") //Specify "label"
socialfeed.displayoptions("label datetime snippet") //show the specified additional fields
socialfeed.setentrycontainer("p") //Display each entry as a DIV
socialfeed.filterfeed(20, "date") //Show 6 entries, sort by label
socialfeed.init() //Always call this last

</script>


I've done this.

Stoker wrote:
Monique wrote:All I see after trying to use it is >>Update<< with a hyperlink I don't know this means:

Step 1: Insert the following code into the HEAD section of your page:

Do I put the code from google into the index.php at the top of the page? I think that where I have gone wrong is with this step of the process. But I don't understand what to edit, etc.

Thanks


Please give me a link to a thread using this BBCode.
If You dont want to post it in public, You can just send it by PM

It is a BBCode and can only be used in a post.

If You want it on the forum index page, open prosilver index_body.html and find this:
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>Mixed News for Forumindex</dt>
                                              </dl>
            </li>
         </ul>
                        <ul class="topiclist forums">
         <li>
<div style="width: auto; height: auto; padding: 10px;">
<p style="text-align: right">» <a href="javascript:socialfeed.init()">Update</a> «</p>

<script type="text/javascript" src="http://www.google.com/jsapi?key=Put Your API key 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>
<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("USATODAY", "http://rssfeeds.usatoday.com/usatoday-NewsTopStories") //Specify "label" plus URL to RSS feed
socialfeed.addFeed("CNN", "http://rss.cnn.com/rss/cnn_latest.rss") //Specify "label" plus URL to RSS feed
socialfeed.addFeed("ABC", "http://feeds.feedburner.com/AbcNews_TopStories") //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, "date") //Show 6 entries, sort by label
socialfeed.init() //Always call this last

</script>
</div><span></span></li>
         </ul>
<span class="corners-bottom"><span></span></span></div></div>


I've also done this, but nothing is working.

A google feed doesn't really bother me. I'm after a Sporting Life feed - http://www.sportinglife.com/rss/general.xml

Somebody help me please!!! :)
jackane24
Cadet I
Cadet I
 
Posts: 11
Joined: 18 Feb 2008, 21:06
Gender: Male


Re: BBCode for hosted RSS

Postby Stoker » 19 Feb 2008, 01:04

Did You remember this:
Get Your own Google AJAX Feed API here: http://code.google.com/apis/ajaxfeeds/signup.html

The key should be inserted here:
<script type="text/javascript" src="http://www.google.com/jsapi?key=Put Your API key here">
Stoker
Stoker    
Borg Drone
Borg Drone
 
Posts: 401
Joined: 24 Nov 2007, 11:05
Location: Denmark
Favorite Team: Highslide JS
Gender: Male
phpBB Knowledge: 4

Re: BBCode for hosted RSS

Postby Monique » 19 Feb 2008, 12:24

Sorry Stoker I got sick and haven't been on here for a few days. I got it to work thanks so much :D
"If one advances confidently in the direction of his dreams,and endeavors
to live the life he has imagined, he will meet with a success unexpected in common hours."
- H.D. Thoreau
User avatar
Monique    
Ensign
Ensign
 
Posts: 68
Joined: 08 Feb 2008, 19:41
Location: Hollywood, CA (Holodeck)
Favorite Team: CLEVELAND BROWNS
Gender: Female

Re: BBCode for hosted RSS

Postby Monique » 19 Feb 2008, 12:26

jackane24 wrote:
Stoker wrote:MOD Name: BBCode for hosted RSS
MOD Authors: BBCode created by Stoker & script from DynamicDrive
Demo: Stokers Playground
Description: This BBcode gives You the opportunity to ad RSS Feeds to Your forum.
There is a various way to do this and the styling can be customized.

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.


I've put these both in the following directory - /root/

Open styles/prosilver/theme/colours.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;
}


Done this.

Save and upload both files. Purge cache.


Upload both files? How do I upload? Have I done this already by dragging and dropping?

Go to ACP and create the RSS BBCode.

BBCode:
Code: Select all
[rss]{TEXT},{URL1}[/rss]


HTML Code:
Code: Select all
<p style="text-align: right">» <a href="javascript:socialfeed.init()">Update</a> «</p>

<script type="text/javascript" src="http://www.google.com/jsapi?key=Put Your API key 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>
<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("{TEXT}", "{URL1}") //Specify "label"
socialfeed.displayoptions("label datetime snippet") //show the specified additional fields
socialfeed.setentrycontainer("p") //Display each entry as a DIV
socialfeed.filterfeed(20, "date") //Show 6 entries, sort by label
socialfeed.init() //Always call this last

</script>


I've done this.

Stoker wrote:
Monique wrote:All I see after trying to use it is >>Update<< with a hyperlink I don't know this means:

Step 1: Insert the following code into the HEAD section of your page:

Do I put the code from google into the index.php at the top of the page? I think that where I have gone wrong is with this step of the process. But I don't understand what to edit, etc.

Thanks


Please give me a link to a thread using this BBCode.
If You dont want to post it in public, You can just send it by PM

It is a BBCode and can only be used in a post.

If You want it on the forum index page, open prosilver index_body.html and find this:
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>Mixed News for Forumindex</dt>
                                              </dl>
            </li>
         </ul>
                        <ul class="topiclist forums">
         <li>
<div style="width: auto; height: auto; padding: 10px;">
<p style="text-align: right">» <a href="javascript:socialfeed.init()">Update</a> «</p>

<script type="text/javascript" src="http://www.google.com/jsapi?key=Put Your API key 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>
<script type="text/javascript">
var socialfeed=new gfeedfetcher("example1", "example1class", "_new")
socialfeed.addFeed("USATODAY", "http://rssfeeds.usatoday.com/usatoday-NewsTopStories") //Specify "label" plus URL to RSS feed
socialfeed.addFeed("CNN", "http://rss.cnn.com/rss/cnn_latest.rss") //Specify "label" plus URL to RSS feed
socialfeed.addFeed("ABC", "http://feeds.feedburner.com/AbcNews_TopStories") //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, "date") //Show 6 entries, sort by label
socialfeed.init() //Always call this last

</script>
</div><span></span></li>
         </ul>
<span class="corners-bottom"><span></span></span></div></div>


I've also done this, but nothing is working.

A google feed doesn't really bother me. I'm after a Sporting Life feed - http://www.sportinglife.com/rss/general.xml

Somebody help me please!!! :)


Also make sure that you download the two files from website Stoker listed in the very first post and upload them to your root folder
"If one advances confidently in the direction of his dreams,and endeavors
to live the life he has imagined, he will meet with a success unexpected in common hours."
- H.D. Thoreau
User avatar
Monique    
Ensign
Ensign
 
Posts: 68
Joined: 08 Feb 2008, 19:41
Location: Hollywood, CA (Holodeck)
Favorite Team: CLEVELAND BROWNS
Gender: Female

Re: BBCode for hosted RSS

Postby Stoker » 19 Feb 2008, 12:54

Monique wrote:Sorry Stoker I got sick and haven't been on here for a few days. I got it to work thanks so much :D


Glad to hear :)
Stoker
Stoker    
Borg Drone
Borg Drone
 
Posts: 401
Joined: 24 Nov 2007, 11:05
Location: Denmark
Favorite Team: Highslide JS
Gender: Male
phpBB Knowledge: 4

Re: BBCode for hosted RSS

Postby Hippie459MN » 21 Apr 2008, 06:02

WoW! I wish I would have found this sooner. I love it. Just what I am looking for for now. Thank you. :good:

One small thing, Is there a way to change the size of the text from the RSS Feed? I have tried changing the % of the text size in the CSS file and no go and also placing font size BBCode around the feed and nothing.

Example: http://www.hippie459mn.com/forum/viewto ... f=81&t=243

Thank you.
User avatar
Hippie459MN    
Supporter
Supporter
 
Posts: 205
Joined: 08 Feb 2008, 09:40
Location: Minnesota, USA
Favorite Team: Your moms team
Gender: Male
phpBB Knowledge: 6

Re: BBCode for hosted RSS

Postby Stoker » 21 Apr 2008, 06:34

Hippie459MN wrote:WoW! I wish I would have found this sooner. I love it. Just what I am looking for for now. Thank you. :good:

One small thing, Is there a way to change the size of the text from the RSS Feed? I have tried changing the % of the text size in the CSS file and no go and also placing font size BBCode around the feed and nothing.

Example: http://www.hippie459mn.com/forum/viewto ... f=81&t=243

Thank you.


Yes. You can find this line in the HTML:
Code: Select all
socialfeed.setentrycontainer("p") //Display each entry as a DIV

And replace it with this:
Code: Select all
socialfeed.setentrycontainer("div") //Display each entry as a DIV
Stoker
Stoker    
Borg Drone
Borg Drone
 
Posts: 401
Joined: 24 Nov 2007, 11:05
Location: Denmark
Favorite Team: Highslide JS
Gender: Male
phpBB Knowledge: 4

Re: BBCode for hosted RSS

Postby Hippie459MN » 21 Apr 2008, 06:41

That did it. :good:

Thank you. Image
User avatar
Hippie459MN    
Supporter
Supporter
 
Posts: 205
Joined: 08 Feb 2008, 09:40
Location: Minnesota, USA
Favorite Team: Your moms team
Gender: Male
phpBB Knowledge: 6

Re: BBCode for hosted RSS

Postby cafe hotelier » 21 Mar 2010, 22:41

Hi all,

This is a great addition, I have followed the instruction provided and it works fine, or at least I thought it did.

I have now been running RSS feeds from various news websites, 3 different ones. updated the template with the Rss feed address in the indexbody.php file

So everything is working fine, the only thing is the updating doesn't seem to be automatic, and there is a mix up on the name of the news provider.

For instance I have 3 news website I drive content from,
Ehotelier
China Hospitality News
Caterersearch

Now the funny thing is if the link is for Ehotelier, it says China Hospitality News on the index page....

How do I fix this?

Best regards

Cafe Hotelier http://www.cafehotelier.com
cafe hotelier    
Crewman
Crewman
 
Posts: 1
Joined: 21 Mar 2010, 22:31
Gender: Male
phpBB Knowledge: 2

Previous

Return to BBCode System

Who is online

Users browsing this forum: No registered users and 3 guests