This is a discussion on About RSS feed integration within the Coding Help forums, part of the Webmaster Help category; Originally Posted by ghost for the scroller you will need to remove the right side feeds remove these two lines ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Quote:
$ cat /var/www/index.php Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"https://www.satimis.com/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<center>
<script language="JavaScript1.2">
//Specify the marquee's width (in pixels)
var marqueewidth="600px"
//Specify the marquee's height
var marqueeheight="50px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#DEFDD9"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
var marqueecontent='<nobr><h><tags style="word-spacing:25px;"><strong>Tokyo NewYork Paris HongKong London Sydney Soeul Frankfurt SanFrancisco Singapore Taiwan Shanghai KualaLupur Mexico Jakata</strong></tags></h></nobr>'
////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee
function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
cross_marquee.style.border='.0625ex solid red';
cross_marquee.style.top=parseInt(marqueeheight)/2-cross_marquee.offsetHeight/2+'px';
cross_marquee.style.border='none';
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate
function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}
if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';border:blue dotted 2px;overflow:hidden">')
//write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" lefft=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
</center>
<br>
<br>
<title>Common Tests</center></title>
<style>
h { font-size: 25px; font-family: sans-serif; font-style: italic; color: rgb(0, 100, 0); }
</style>
</head>
<br>
<body background="greece_w.jpg">
<H1><FONT SIZE="+4"><FONT COLOR="red"><center><I>Common Test</I></center></FONT></FONT></H1>
<br>
<br>
<p>
<center><img src="WELCOME2.gif" height="44" width=150"></center>
</p>
<br>
<br>
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
<?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">';
?>
</div>
</div>
........
........
How to get my own marquee displayed under the topic "Commone Test"? Now it is on top of the title. Thanks B.R. satimis |
| ||||
| Quote:
I tried your new_test.txt. The whole webpage is scrolling NOT only the news line. I'll come back if I discover the solution. Anyway thanks for your help. B.R. satimis |
| ||||
| Hi ghost, Problem solved as follow; Use "Cross Browser marquee II" Dynamic Drive DHTML Scripts- Cross Browser marquee II With your php script to replace: Code: Your scroller contents Code: foreach ($rss_right as $url) ShowOneRSS($url); echo '</td></tr></table>'; Increase the width of the marquee container then done. About font size of news, <h7>/<h8>/<h9> makes not much difference. How to further decrease the font size? The same method can't apply on "Cross Browser marquee". I'm now searching the solution to run multiple marguee on same page. B.R. satimis |
| |||||
| I see my mistake should have removed these two , a slip of the mouse echo '</td><td width="50%" valign="top">'; foreach ($rss_right as $url) ShowOneRSS($url); and left this one echo '</td></tr></table>'; Last edited by ghost; 13-03-2008 at 10:39 AM. Reason: correction |
| ||||
| Quote:
How to modify the php script removing rss_right, putting the URL (Independent.ie - Hurling RSS Feed) on rss-left. Remark: This time there will be no rss_left/right. TIA B.R. satimis |
| ||||
| It works. Thanks. Before reading your posting. I tried it myself w/o success. The difference I made were; 1) $rss_left = array( Code: $rss = array( 2) foreach ($rss_left as $url) ShowOneRSS($url); Code: foreach ($rss as $url) ShowOneRSS($url); In my consideration there is only one column. I don't need "_left" But failed. Why? How to add an additional blank/white column between each channel? Thanks. Quote:
Edit: How to increase the space btw columns B.R. satimis Last edited by satimis; 13-03-2008 at 06:04 PM. |
| |||||
| The news feed is contained in a ul so you could set a bottom padding for the ul with css , you will need to style up your scroller to blend in to your page design anyway. when are we going to see this in the site review forum ?? |
| Tags |
| feed, integration, rss |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rss feed or newsletter | Busarus | Webmaster Discussion | 4 | 02-03-2007 10:29 PM |
| Need RSS Feed Help | Gavin | Blogs & Blogging | 4 | 12-02-2007 02:31 PM |
| 1 Bag of RSS feed: 100% RDA of internet. Warning: may contain nut traces. | gary.b | General Chat | 15 | 29-01-2007 11: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 |
| ||||||||
| | ![]() | |||||||