Jump to content

Recommended Posts

Posted

I need to add a horizonatal scrolling "marque" type RSS Feed to a simple HTML/PHP/Javascript hard coded 1 page site but can't seem to find some easy use code.

 

Anyone got something I can use?

 

The code already contains jquery so that or plain javascript would be best

 

Ta

 

Simon

Posted
The code already contains jquery so that or plain javascript would be best

 

 

If it's any use I can show a pretty nice easy to use example I play around with sometimes, and been using to test few programs. It runs off PHP5/JS

 

 

example: Untitled Document

 

Literally it's just changing one line for RSS feed, and you'd ofc need to put the div inside your main page (rather than test page etc)

 

Any use?

 

 

The world's only free and accessible RSS news ticker (PHP and JavaScript), widget, javascript, php, accessibility, css, xhtml, Steven York.com

 

Steve

Posted

I've pm'd you the RSS feed - can you see if it works for you?

 

Its obvilously finding the feed (as it gets the title) and from Firebug in FF it seems to be picking up the CSS so I'd think it must be some mistake by me in the js/php :(

 

Si

Posted
Simple answer is you're trying to load 2 scripts into same place :p If that makes sense?

Not really :)

 

And that doesn't explain why the simple index.php version doesn't fully work properly then (it only displays the article title and not the article contents?)

 

Si

Posted
Not really :)

 

And that doesn't explain why the simple index.php version doesn't fully work properly then (it only displays the article title and not the article contents?)

 

Si

 

Because that's what it's told to show :D You can choose what you want showing, by default it's just title. Can change it to show full content if you want.

 

Check PM.

 

Steve

Posted

All you need to do is change:

 

$html.= '</pre><li>'.$item->title.'<

to:

 $html.= '</pre><li>'.$item->title.' '   .$item->description.   '<

 

And it'll show both Title and Description (aka content)

 

(Note currently your first RSS has

in it, so it might display weirdly, as it'll literally parse the content of the description :D)

 

I'll try to change the scripts so they work independantly of eachother if you prefer.

 

Steve

Posted

Explained that part :D it's as you got

tags in your rss post it parses it when it's loaded into the script. If you remove those it works as normal

 

Check out the link in pm (example working with edugeek)

 

Steve

Posted

Sorry :( - I didn't see that you'd PMd me back :(

 

As you can see - I've removed the

in the index.php code and it now looks OK (except for the speed :) )

 

I'll look at the main code and see if I can spot your changes and merge them into my code :)

 

What a way to spend a saturday night - really appreciate the help :)

 

Si

Posted
Want me to quickly log on pc and drop you a link to pre-parses php file?

You've lost me again - you need to go slowly with me :)

 

Si

PS I'm trying to understand the "nearest script" concept - I can program in JS but how it actually works/parsed is a mystery to me :)

Posted

PS the only reason I'm going down this route to get an RSS feed displayed is due to the unreliability of Xibo 1.2 and I thought it would be easy to just stick some simple js in my own page and throw Xibo out completely.

 

I got that wrong :)

 

Si

Posted

New PM has link to source.

 

What I mean is having multiple scripts in same file needs some way of distinguishing which script is referenced by a function call

 

If that makes sense

?

 

Will try to explain better tomorrow

 

Steve

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...