[Phpslash-commit] CVS: phpslash-dev/include/modules/story relatedlinks.php,NONE,1.1 Story.class,1.8,
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2004-04-16 17:50:40
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/story In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26140/phpslash-dev/include/modules/story Modified Files: Story.class Added Files: relatedlinks.php Log Message: Story.class, relatedlinks.php, slash-all.sql - Related links for articles --- NEW FILE: relatedlinks.php --- <?php // $Id: relatedlinks.php,v 1.1 2004/04/16 17:50:31 joestewart Exp $ // Displays the contents of the related links block // block can be anywhere with a lower order number than the story (module) block // usually this means either below the story or in a right side column. global $_PSL, $ary, $relatedlinks; $content = ''; if(array_key_exists('story_id', $ary)) { // one particular story requested if(isset($relatedlinks )) { $content .= $relatedlinks; unset($relatedlinks); } } return $content; ?> Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story.class,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Story.class 26 Nov 2003 19:33:21 -0000 1.8 --- Story.class 16 Apr 2004 17:50:31 -0000 1.9 *************** *** 241,244 **** --- 241,246 ---- function getStory($story_id, $mode, $argv_ary="", $tpl="") { + global $relatedlinks; + $default_tpl = "story.tpl"; /* *************** *** 344,347 **** --- 346,351 ---- } } + // relatedlinks is a global variable that contains the related links html. + $relatedlinks = $related; $arrows = $this->getNextPrev($story_id, $argv_ary); } *************** *** 405,410 **** } ! $this->template->parse('STORY', 'template'); ! $thestory = $this->template->get('STORY'); if( $cache_ary[$story_name]['expire'] > 0) { $cache_ary[$story_name]['cache'] = $thestory; --- 409,414 ---- } ! $thestory = $this->template->parse('STORY', 'template'); ! if( $cache_ary[$story_name]['expire'] > 0) { $cache_ary[$story_name]['cache'] = $thestory; |