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; Originally Posted by ghost for the scroller you will need to remove the right side feeds remove these two lines ...


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
  #11 (permalink)  
Old 12-03-2008, 04:05 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
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
Sorry, still fail

$ 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>
........
........
No marquee container. All texts below are pushed to the right leaving half page empty.


How to get my own marquee displayed under the topic "Commone Test"? Now it is on top of the title. 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
  #12 (permalink)  
Old 12-03-2008, 04:43 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 167
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default

sorry satimis
bit of confusion here
you are working with Cross Browser marquee
and I am on Cross Browser marquee II I just assumed II was a newer version.
I will attach the code for the one I tested the file is a .txt you need to change this to .php to use it .

I an unable right now to get the other one working maybe someone with some js expertise might have a look at it.
Attached Files
File Type: txt news_test.txt (3.4 KB, 5 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 13-03-2008, 02:47 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
sorry satimis
bit of confusion here
you are working with Cross Browser marquee
and I am on Cross Browser marquee II I just assumed II was a newer version.
I will attach the code for the one I tested the file is a .txt you need to change this to .php to use it .

I an unable right now to get the other one working maybe someone with some js expertise might have a look at it.
Hi ghost,


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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 13-03-2008, 06:26 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 Solved

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
Must retain the last 2 lines
Code:
foreach ($rss_right as $url) ShowOneRSS($url);
echo '</td></tr></table>';
Otherwise the whole website will scroll.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 13-03-2008, 10:28 AM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 167
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ghost will become famous soon enough
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 13-03-2008, 03:46 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
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>';
Your advice works. Thanks. But the rss_right URL disappears.


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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17 (permalink)  
Old 13-03-2008, 04:28 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 167
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
Your advice works. Thanks. But the rss_right URL disappears.
I took the right one out so you could have one column feed for the scroller

so here is two more again you will need to change the .txt to .php
First is a one column
Second is a two column
Attached Files
File Type: txt rss_1col.txt (1.1 KB, 1 views)
File Type: txt rss_2col.txt (1.2 KB, 2 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18 (permalink)  
Old 13-03-2008, 06:01 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
First is a one column
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(
w/o "_left"

2)
foreach ($rss_left as $url) ShowOneRSS($url);
Code:
foreach ($rss as $url) ShowOneRSS($url);
also w/o "_left"


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:
Second is a two column
The script works w/o problem.


Edit: How to increase the space btw columns


B.R.
satimis

Last edited by satimis; 13-03-2008 at 06:04 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
  #19 (permalink)  
Old 13-03-2008, 06:34 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 167
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
But failed. Why?
the variable $rss is already in use in the script so if you reassigne the variable the script fails , you could have used $rss_anything so long as you change both instances of $rss_left
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20 (permalink)  
Old 13-03-2008, 06:50 PM
ghost's Avatar
Wannabe Geek
 
Join Date: Dec 2007
Location: Ennis
Posts: 167
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
How to increase the space btw columns
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 ??
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 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


Sponsored links

Paid On Results


All times are GMT +1. The time now is 01:26 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

Search Engine Friendly URLs by vBSEO 3.2.0