Posted by new Sat 3rd Mar 2007 05:08 - Syntax is PHP - 77 viewsRun this post in the PHP shell
Download | New Post | Modify | Hide line numbers
PHP parser reported no syntax errors in this post!
  1. // The source code packaged with this file is Free Software, Copyright (C) 2005 by
  2. // Ricardo Galli .
  3. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
  4. // You can get copies of the licenses here:
  5. //         http://www.affero.org/oagpl.html
  6. // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
  7. // -------------------------------------------------------------------------------------
  8.  
  9. include_once('Smarty.class.php');
  10. if(!isset($main_smarty)){$main_smarty = new Smarty;}
  11. // If we're calling this page through another page like index.php, $main_smarty will already be set
  12. // If we're calling this page directly, set main_smarty
  13.  
  14. include_once('config.php');
  15. include_once(mnminclude.'html1.php');
  16. include_once(mnminclude.'link.php');
  17. include_once(mnminclude.'tags.php');
  18. include_once(mnminclude.'search.php');
  19. include_once(mnminclude.'smartyvariables.php');
  20.  
  21. //How many comments to show in the list
  22. $comment_size = 8;
  23.  
  24. $link = getmyurl(comments);
  25.  
  26. echo "
    \"new Effect.toggle('latcomments','blind', {queue: 'end'}); \"\"".my_base_url.my_pligg_base."/templates/yget/images/expand.png\" onClick=expandcontent(this,'latcomments') >\"".$link."\">".PLIGG_Visual_Pligg_Latest_Comments."
    ";
  27.  
  28.     $res = "select comment_content,comment_id,link_id from ".table_comments.",".table_links." WHERE comment_link_id = link_id ORDER BY comment_date DESC limit ".$comment_size."";
  29.     $list_comments = mysql_query($res) or die(mysql_error());
  30.  
  31.         while($row = mysql_fetch_array($list_comments)){       
  32.            
  33.             $story_url = getmyurl("story", $row['link_id']);
  34.            
  35.             echo '
    ';
  36.             echo '
    '
  37. ;
  •         }
  •  
  • echo '
  • '
  • .$main_smarty->get_config_vars('PLIGG_Visual_What_Is_Pligg_Read_More').'';
  • echo "
    "
  • ;
  •    
  •    
  • //determine the amount of characters to show for each comment   
  • function ShortenText($text) {
  •  
  •     // Change to the number of characters you want to display
  •     $chars = 75;
  •  
  •   $text = $text." ";
  •   $text = substr($text,0,$chars);
  •   $text = substr($text,0,strrpos($text,' '));
  •   $text = $text."...";
  •  
  •   return $text;
  •  
  •   }   
  •    
  •    
  •    
  • ?>
  •  

  • PermaLink to this entry https://pastebin.co.uk/11323
    Posted by new Sat 3rd Mar 2007 05:08 - Syntax is PHP - 77 viewsRun this post in the PHP shell
    Download | New Post | Modify | Hide line numbers

     

    Comments: 0