+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
Web Development Thread, Scrolling RSS feed code in Coding and Web Development; I need to add a horizonatal scrolling "marque" type RSS Feed to a simple HTML/PHP/Javascript hard coded 1 page site ...
  1. #1

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168

    Scrolling RSS feed code

    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

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    Quote Originally Posted by SimpleSi View Post
    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

  3. #3

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    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

  4. #4

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    Is it just supposed to be showing above the calender? Easier if I make a copy and play

    Steve

  5. #5

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    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

  6. #6

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    I just tried using index.php with my RSS feed and got this

    Untitled Document

  7. #7

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    Simple answer is you're trying to load 2 scripts into same place :P If that makes sense?

    Steve

  8. #8

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    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

  9. #9

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    Quote Originally Posted by SimpleSi View Post
    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

  10. #10

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    All you need to do is change:

    Code:
    $html.= '<li><a href="'.$item->link.'" title="'.$item->title.'">'.$item->title.'</a></li>';
    to:
    Code:
     $html.= '<li><a href="'.$item->link.'" title="'.$item->title.'">'.$item->title.'</a> '   .$item->description.   '</li>';
    And it'll show both Title and Description (aka content)

    (Note currently your first RSS has <p> 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

  11. #11

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    This isn't going well

    I've pasted in the new code into my index.php
    Code:
    $html.= '<li><a href="'.$item->link.'" title="'.$item->title.'">'.$item->title.'</a> '   .$item->description.   '</li>';
    but all I get is a faster scrolling title

    Untitled Document


    Si

  12. #12

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    Explained that part it's as you got <p> 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

  13. #13

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    Sorry - I didn't see that you'd PMd me back

    As you can see - I've removed the <p> 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

  14. #14

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,705
    Thank Post
    335
    Thanked 517 Times in 485 Posts
    Rep Power
    180
    Want me to quickly log on pc and drop you a link to pre-parses php file? Saves trying to decode it

    Steve

  15. #15

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    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

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. A worthy RSS feed
    By GrumbleDook in forum General Chat
    Replies: 0
    Last Post: 31st January 2008, 08:57 PM
  2. MS Download Centre RSS Feed.
    By Geoff in forum Links
    Replies: 0
    Last Post: 29th May 2007, 03:53 PM
  3. Random RSS Feed
    By russdev in forum Comments and Suggestions
    Replies: 4
    Last Post: 21st March 2006, 10:22 AM
  4. RSS feed creation.
    By Kyle in forum How do you do....it?
    Replies: 7
    Last Post: 18th January 2006, 08:05 AM
  5. Slashdot RSS feed removed
    By Dos_Box in forum General EduGeek News/Announcements
    Replies: 9
    Last Post: 16th December 2005, 12:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •