TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 582
  • Total: 582

Advanced RSS Feed

Started by URPG, August 07, 2006, 06:59:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cholo

Anyone have a demo of this on their site i can check out? Thanks. I didn't see it active in any of the links in this thread.

dennishe

Bottom right at:

http://www.2tal-mobility.dk/forum/index.php?PHPSESSID=bb2f4b06e5526cf5415715490c191c1b&cat=6

The RSS feed is Novell's Zenworks Cool Solutions:

http://www.novell.com/newsfeeds/rss/zenworks.xml


The rest of the site is in Danish - have fun :)


Dennis

URPG

Deactivated it because we could not agree on a newsfeed for the front page. But it is working well as you can see :)

Greyhound

How do you change the size of the links?

rjackson

#64
Can someone help me with this error ? -

Parse error: parse error, unexpected T_STRING  /Sources/Load.php(1735) : eval()'d code(35) : eval()'d code on line 54

I have copied the script exactly how he had it listed show here


//RSS Newsreader

  $backend = "http://wowvault.ign.com/show_rss.php";
  $max_items = 16;
  $items = 0;
  $scroll = 1; //1 for scrolling box 0 for no scrolling
  $amount = 1; //pixels per scroll step
  $delay = 25; //step delay ms
  $stop = 1; //1 for scroll stop on mouseover 0 for no stop

  if($scroll==0)$stop=0; //no scrollstop if no scrolling

  $output_temp = "<b>WOW Vault News Feed:</b><br>";

//add marquee tag if scrolling is enabled
  if($scroll) $output_temp .="<marquee direction=up scrolldelay=$delay scrollamount=$amount height=200 ";

//only add mouse events if wanted
  if($stop) $output_temp .="onmouseout=this.start() onmouseover=this.stop()><br><br><br><br><br><br><br>"; else $output_temp .="><br><br><br><br><br><br><br><br>";

  $fpread = fopen($backend, 'r');
  if(!$fpread) {
      echo "error $errstr ($errno)<br>\n";
      exit;
  } else {

       while(! feof($fpread) ) {

          $buffer = ltrim(Chop(fgets($fpread, 256)));

          if (($buffer == "<item>") && ($items < $max_items)) {
            $title = ltrim(Chop(fgets($fpread, 256)));
            $link = ltrim(Chop(fgets($fpread, 256)));
            $description = ltrim(Chop(fgets($fpread, 256)));

            $title = ereg_replace( "<title>", "", $title );
            $title = ereg_replace( "</title>", "", $title );
            $link = ereg_replace( "<link>", "", $link );
            $link = ereg_replace( "</link>", "", $link );
            $description = ereg_replace( "<description>", "", $description );
            $description = ereg_replace( "</description>", "", $description );     

            $output_temp .= "<a href=\"".$link."\" target=_blank><b><big>".$title."</big></b></a><br><small>".$description."</small><br>";
            $items++;
          }
      }
      fclose($fpread);
  }

// alle daten sind in $ausgabe_temp
echo $output_temp;
echo '<br><br><br><br><br><br><br><br><br><br></marquee>';

Not all of this is my code, i took a very basic "rss to your website" thingy from some tutorial and heavilie modified it...

what did I do wrong?



rjackson


IchBin

The code you just posted doesn't look anything like the OP code.

rjackson

thats the code I got from page 2 of this thread


IchBin

Well I just copy/pasted the code into a phpbox on my site and it worked just fine. Please remember to use code tags when posting code.

3nd3r

Hello
I'm using this block code in various blocks in my web.
The problem is that when it picks a rss feed that's not working (e.g. a webpage that's down) the entire site (my site) is ralentized, until the point it returns anything.

So, my question is:
Is there a way to check rss feed source before process it, to prevent this possibility? Maybe an 'echo' telling that (something like 'rss source not found')?

Thanks in advance.

This website is proudly hosted on Crocweb Cloud Website Hosting.