SimpleSi Posted September 3, 2011 Posted September 3, 2011 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
Steve21 Posted September 3, 2011 Posted September 3, 2011 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
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 Thanks for the code I've cut and pasted into what I think are the right places within my code but only go a bit of success Calendar 2 Week Scrolling View Can you guess which bit (js/php/css) I've mucked up Simon
Steve21 Posted September 3, 2011 Posted September 3, 2011 Is it just supposed to be showing above the calender? Easier if I make a copy and play Steve
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 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
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 I just tried using index.php with my RSS feed and got this Untitled Document
Steve21 Posted September 3, 2011 Posted September 3, 2011 Simple answer is you're trying to load 2 scripts into same place If that makes sense? Steve
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 Simple answer is you're trying to load 2 scripts into same place 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
Steve21 Posted September 3, 2011 Posted September 3, 2011 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 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
Steve21 Posted September 3, 2011 Posted September 3, 2011 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 ) I'll try to change the scripts so they work independantly of eachother if you prefer. Steve
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 This isn't going well I've pasted in the new code into my index.php $html.= '</pre><li>'.$item->title.' ' .$item->description. '< but all I get is a faster scrolling title Untitled Document Si
Steve21 Posted September 3, 2011 Posted September 3, 2011 Explained that part 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
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 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
Steve21 Posted September 3, 2011 Posted September 3, 2011 Want me to quickly log on pc and drop you a link to pre-parses php file? Saves trying to decode it Steve
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 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
SimpleSi Posted September 3, 2011 Author Posted September 3, 2011 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
Steve21 Posted September 3, 2011 Posted September 3, 2011 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
SimpleSi Posted September 4, 2011 Author Posted September 4, 2011 Finally got things going after a nights rest and working out how to resolve mootools/jquery conflicts Calendar 2 Week Scrolling View Thanks again for all the help Si
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now