View Single Post

  #9 (permalink)  
Old 12-03-2008, 02:25 PM
satimis satimis is offline
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 02:31 PM.
Reply With Quote