[ PHPXref.com ] [ Generated: Sun Jul 20 17:50:08 2008 ] [ Flip 3.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> syndicate.php (source)

   1  <?php
   2  
   3  # Flip 3 (Flatfile PHP Weblog)

   4  # copyright 2002-2003, Adam Scheinberg

   5  # http://flipsource.org

   6  # http://www.sourceforge.net/projects/flipsource

   7  
   8  # This is free software.  

   9  # You may use this software however you wish, provided you leave 

  10  # the above copyright notices intact. 

  11  
  12  # syndicate.php

  13  
  14  // this script will grab the 10 most current "headlines" and of your weblog

  15  // people can grab those headlines from this file.

  16  
  17  require ("config.php"); 
  18  
  19      $data = file($newsfile);
  20      $loops = count($data);
  21      $data = array_reverse($data);
  22  
  23  if($loops > 10) { $loops = "10"; }
  24          
  25  for ($i = 0; $i <= $loops; $i++) {
  26  
  27      $slashpieces = explode("%%", $data[$i]); 
  28      $pieces[0] = stripslashes($slashpieces[0]); 
  29      $pieces[1] = stripslashes($slashpieces[1]); 
  30      $pieces[2] = stripslashes($slashpieces[2]); 
  31      $pieces[3] = stripslashes($slashpieces[3]); 
  32       $pieces[4] = stripslashes($slashpieces[4]);  
  33      $pieces[5] = $slashpieces[5];
  34      
  35  //uncomment only ONE of the options below 

  36  // the first line makes a link to the article on everything.php

  37  // the second one makes a link to the article and its comments

  38  
  39  //echo "<a href=\"" . $siteurl . $allnews . "#" . $pieces[5] . "\">" . $pieces[4] . "</a><br />\n";            //option 1

  40  echo "<a href=\"" . $siteurl . "viewcomments.php?cID=" . $pieces[5] . "\">" . $pieces[4] . "</a>";    //option 2

  41  if ($i != $loops) { echo "<br />\n"; } 
  42  }
  43  
  44  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]