Irish SEO,  Marketing & Webmaster Discussion

 

About RSS feed integration

This is a discussion on About RSS feed integration within the Coding Help forums, part of the Webmaster Help category; Hi folks, I'm prepared publishing RSS feed from other websites w/o modified but have no idea how to start. On ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-03-2008, 03:12 PM
Coder
 
Join Date: Jun 2007
Posts: 36
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
satimis will become famous soon enough
Default About RSS feed integration

Hi folks,


I'm prepared publishing RSS feed from other websites w/o modified but have no idea how to start. On Internet browsing I discovered some websites mentioning "sign the contract and you'll have news publishing on your website in 5 minutes". I hesitate whether it would be so easy. Just signing the contract and providing them email address and my website URL then I'm done.


I built my website on HTML, CSS and Javascript. I have text scroller/marquee running on the website built on javascript modified on Cross Browser marquee;
Dynamic Drive DHTML Scripts- Cross Browser marquee

and Cross Browser marquee II;
Dynamic Drive DHTML Scripts- Cross Browser marquee II


I don't know whether I can make use of them to run news. If YES, can you advise how to integrate them to the RSS feed websites? TIA


B.R.
satimis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 10-03-2008, 04:47 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 160
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default Rss feeds

Not quite clear what you want to do here ,
If you want to set up an Rss feed on your site.
have a look at this post http://www.irishwebmasterforum.com/c...rss-feeds.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-03-2008, 01:33 AM
Coder
 
Join Date: Jun 2007
Posts: 36
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
satimis will become famous soon enough
Default

Quote:
Originally Posted by ghost View Post
Not quite clear what you want to do here ,
If you want to set up an Rss feed on your site.
have a look at this post http://www.irishwebmasterforum.com/c...rss-feeds.html
Hi ghost,


Thanks for your URL.


Actually I'm confused. What I need is to integrate RSS feed news to my website which is hoisted on my own server, so that visitors while browsing my website can read news on their PCs. I have been googling a couple days reading many articles on Internet. But the more I read more confused I'm. I don't know whether I need an aggregator only. I'm not prepared to modify the feed news nor to add news to the feed.


If the feeds include vedio clips can the visitors display vedio on their PCs?


I have scoller/text marquee running on my website. The same is modified on;

Cross Browser marquee
Cross Browser marquee II

Dynamic Drive DHTML Scripts- Cross Browser marquee
Dynamic Drive DHTML Scripts- Cross Browser marquee II


They are written in javascript. Whether I can make use of them. If YES, then HOW? TIA


B.R.
satimis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 12-03-2008, 02:25 AM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 160
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default last rss

I use the lastRSS download it from Last RSS - PHP RSS parser/reader the zip contains one file lastRSS.php upload this unchanged to your php enabled server.now go to the page you want to display feeds on and place the following code where you want to display the feed.

Code:
<?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>
save your page with a .php extension you should now have feeds
modify the above code to suit your needs i mean feeds .

JS marquee cant help you there ,

fire away with the above let us know how you get on.
Mick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 12-03-2008, 02:53 AM
Coder
 
Join Date: Jun 2007
Posts: 36
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
satimis will become famous soon enough
Default

Quote:
Originally Posted by ghost View Post
I use the lastRSS download it from Last RSS - PHP RSS parser/reader the zip contains one file lastRSS.php upload this unchanged to your php enabled server.now go to the page you want to display feeds on and place the following code where you want to display the feed.

Code:
<?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>
save your page with a .php extension you should now have feeds
modify the above code to suit your needs i mean feeds .

JS marquee cant help you there ,

fire away with the above let us know how you get on.
Mick
Thanks for your advice.


On which directory shall I install "ast RSS-PHP RSS parser"? On /var/www/my_webpage.index.html ? I'm running Ubuntu 7.04 server amd64. This is a test. I have only a single page my_webpage.index.html


On where shall I copy your code? <body>your code</body>? If saving the webpage as .php NOT .html can visitor evokes it on browsing my site? Thanks


B.R.
satimis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-03-2008, 10:53 AM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 160
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default

Quote:
Originally Posted by satimis View Post
On which directory shall I install "ast RSS-PHP RSS
You dont need to install this to use lastRSS

Quote:
Originally Posted by satimis View Post
where shall I copy your code? <body>your code</body>?
yes you can place it in the the between the body tags
Quote:
Originally Posted by satimis View Post
saving the webpage as .php NOT .html
For the purpose of your test save the page as index.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 12-03-2008, 11:51 AM
Coder
 
Join Date: Jun 2007
Posts: 36
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
satimis will become famous soon enough
Default

Quote:
Originally Posted by ghost View Post
You dont need to install this to use lastRSS


yes you can place it in the the between the body tags

For the purpose of your test save the page as index.php
Performed following test.

Download "lastRSS.zip" (Last RSS-PHP RSS parser/reader) on;
Last RSS - PHP RSS parser/reader

unzip the package

$ sudo mv lastRSS.php /var/www/

$ sudo nano /var/www/index.html
typing your php script on <body> </body>

and saving the file as "index.php"

$ ls /var/www/ | grep index
index.php


On a workstation brower

It displays following news line on the webpage;Thanks


Havd following questions;

1)
The news lines are static. How to make the news lines scrolling on a box?

2)
Can I add another RSS feed? I.E. 2 feeds on the same webpage?

3)
OR if 2) above is impossible, then how to change the feed?


TIA


B.R.
satimis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 12-03-2008, 12:34 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 160
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default RSS Revisited

Quote:
Originally Posted by satimis View Post
Can I add another RSS feed? I.E. 2 feeds on the same webpage?
You can add a comma seperated list of feeds at this point note no comma after the last one
Code:
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
'http://www.freshfolder.com/rss.php',
'http://www.kinomol.cz/rss.php'
Quote:
Originally Posted by satimis View Post
OR if 2) above is impossible, then how to change the feed?
Code:
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
you can also edit your list from here
Quote:
Originally Posted by satimis View Post
The news lines are static. How to make the news lines scrolling on a box?
for the scroller you will need to remove the right side feeds remove these two lines from the php code
Code:
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
now set up your JS in the page header
and in the body set up your marquee
Code:
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
place your php code here
</div>
</div>
probebley not the best Solution out there but its a start
Mick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 12-03-2008, 01:25 PM
Coder
 
Join Date: Jun 2007
Posts: 36
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
satimis will become famous soon enough
Default

Quote:
Originally Posted by ghost View Post
You can add a comma seperated list of feeds at this point note no comma after the last one
Code:
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
'http://www.freshfolder.com/rss.php',
'http://www.kinomol.cz/rss.php'
It works. Thanks. But the last URL doesn't work, no such "rss.php" file.


Quote:
Code:
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
you can also edit your list from here
It also works


Quote:
for the scroller you will need to remove the right side feeds remove these two lines from the php code
Code:
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
now set up your JS in the page header
and in the body set up your marquee
Code:
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
place your php code here
</div>
</div>
probebley not the best Solution out there but its a start
It doesn't work.

No marquee container/box displayed and no text scrolling.

All texts below this script are pushed to the right, leaving half page on the left of the webpage empty.

Script
Code:
<?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo '<h2><a href="'.$rs['link'].'">'.$rs['title']."</a></h2>\n";
echo $rs['description']."<br>\n";
echo "<ul>\n";
foreach ($rs['items'] as $item) {
echo '<li><a href="'.$item['link'].'" title="'.$item['description'].'">'.$item['title'].'</a></li>';
}
if ($rs['items_count'] <= 0) { echo "<li>Sorry, no items found in the RSS file :-(</li>"; }
echo "</ul>\n";
}
}
// ===
// include lastRSS
include "lastRSS.php";
// List of RSS URLs
$rss_left = array(
'http://www.rte.ie/rss/gaa.xml',
'http://www.freshfolder.com/rss.php'
);
$rss_right = array(
'http://www.independent.ie/sport/hurling/rss'
);
// Create lastRSS object
$rss = new lastRSS;
// Set cache dir, cache interval and character encoding
$rss->cache_dir = 'cache';
$rss->cache_time = 14000; // (4hrs)
$rss->cp = '';
$rss->items_limit = 5;
// Show all rss files
echo '<table class="rss_section" cellpadding="5" border="0"><tr><td width="50%" valign="top">';
foreach ($rss_left as $url) ShowOneRSS($url);
echo '</td><td width="50%" valign="top">';
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
?>

Edit:

Would my existing marquee cause the problem?


B.R.
satimis

Last edited by satimis; 12-03-2008 at 01:31 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 12-03-2008, 01:54 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 160
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default

for the scroller you will need to remove the right side feeds remove these two lines from the php code
Code:
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
Place the js code in the <head> HERE </head>of your doc
Remove the above 2 lines of code its near the bottom of the PHP script.
in the <body> Put
Code:
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
place the complete php script here
</div>
</div>
Just ran it on my own localhost and it works fine
needs a bit of CSS to spruce it up a bit

OK
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
feed, integration, rss

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
rss feed or newsletter Busarus Webmaster Discussion 4 02-03-2007 09:29 PM
Need RSS Feed Help Gavin Blogs & Blogging 4 12-02-2007 01:31 PM
1 Bag of RSS feed: 100% RDA of internet. Warning: may contain nut traces. gary.b General Chat 15 29-01-2007 10:03 PM
incorporating phpadsnew into an rss feed Busarus Coding Help 10 23-10-2006 06:04 PM
rss feed louie General Chat 0 29-04-2006 08:18 PM


All times are GMT +1. The time now is 05:06 PM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger