Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / comments / rendering [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
26 Jul 2002 02:55:55 | postnuke_official/html/modules/comments/rendering | flat.php,1.7,1.8 nested.php,1.5,1.6 renderbase.php,1.6,1.7 threaded.php,1.6,1.7 | Carl P. Corliss |
various bugfixes |
Update of /home/cvsroot/postnuke_official/html/modules/comments/rendering In directory ns7.hostnuke.net:/tmp/cvs-serv8413/html/modules/Comments/rendering Modified Files: flat.php nested.php renderbase.php threaded.php Log Message: various bugfixes Index: flat.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/comments/rendering/flat.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** flat.php 30 Jun 2002 12:25:44 -0000 1.7 --- flat.php 26 Jul 2002 02:55:53 -0000 1.8 *************** *** 32,36 **** } ! function pnComments_DrawTree($CommentList) { --- 32,36 ---- } ! function DrawTree($CommentList) { *************** *** 45,51 **** $args['uname'] = pnUserGetVar('uname'); ! // Draw the input box ! $output = $this->DrawInput($args); ! // draw comments While(!$this->EOA) { --- 45,49 ---- $args['uname'] = pnUserGetVar('uname'); ! $output .= $this->DrawFormViewOptions($args); // draw comments While(!$this->EOA) { *************** *** 61,66 **** } // Draw the closing table ! $output = $this->DrawFooter(); return $output; --- 59,67 ---- } + // Draw the input box + $output .= $this->DrawFormInput($args); + // Draw the closing table ! $output .= $this->DrawFooter(); return $output; Index: nested.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/comments/rendering/nested.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** nested.php 30 Jun 2002 12:25:44 -0000 1.5 --- nested.php 26 Jul 2002 02:55:53 -0000 1.6 *************** *** 34,44 **** { // draw the Settings Form ! $this->DrawFormSettings(); - // get the list of users. - $users = pnUserGetALL(); - // Draw the opening table ! $output = $this->DrawHeader(); // create the array of arguments to pass to --- 34,41 ---- { // draw the Settings Form ! $output = $this->DrawFormViewOptions(); // Draw the opening table ! $output .= $this->DrawHeader(); // create the array of arguments to pass to *************** *** 50,54 **** // Draw the input box ! $output = $this->DrawInput($args); // draw comments --- 47,51 ---- // Draw the input box ! $output .= $this->DrawFormInput($args); // draw comments *************** *** 58,62 **** // Draw the comment ! $this->DrawCommentLeaf($comment); // prepare the next comment (if there is one). --- 55,59 ---- // Draw the comment ! $output .= $this->DrawLeaf($comment); // prepare the next comment (if there is one). *************** *** 65,69 **** // Draw the closing table ! $output = $this->DrawFooter(); } --- 62,67 ---- // Draw the closing table ! $output .= $this->DrawFooter(); ! return $output; } Index: renderbase.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/comments/rendering/renderbase.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** renderbase.php 1 Jul 2002 06:16:59 -0000 1.6 --- renderbase.php 26 Jul 2002 02:55:53 -0000 1.7 *************** *** 129,149 **** function DrawLeaf($args) { ! return pnModTemplate('comments',$this-type,'flat',$args,$this->template); } function DrawHeader() { ! return pnModTemplate('comments',$this-type,'header',array(),$this->template); } function DrawFooter() { ! return pnModTemplate('comments',$this-type,'footer',array(),$this->template); } function DrawFormDeleteConfirm($args) { ! return pnModTemplate('comments',$this-type,'deleteconf',$args,$this->template); } function DrawFormViewOptions($args) { ! return pnModTemplate('comments',$this-type,'viewoptions',$args,$this->template); } --- 129,149 ---- function DrawLeaf($args) { ! return pnModTemplate('comments',$this->type,'flat',$args,$this->template); } function DrawHeader() { ! return pnModTemplate('comments',$this->type,'header',array(),$this->template); } function DrawFooter() { ! return pnModTemplate('comments',$this->type,'footer',array(),$this->template); } function DrawFormDeleteConfirm($args) { ! return pnModTemplate('comments',$this->type,'deleteconf',$args,$this->template); } function DrawFormViewOptions($args) { ! return pnModTemplate('comments',$this->type,'viewoptions',$args,$this->template); } *************** *** 151,159 **** $args['uname'] = (pnUserLoggedIn() ? pnUserGetVar('uname'):'anonymous'); ! return pnModTemplate('comments',$this-type,'input',$args,$this->template); } function DrawFormStats($args) { ! return pnModTemplate('comments',$this-type,'stats',$args,$this->template); } } --- 151,159 ---- $args['uname'] = (pnUserLoggedIn() ? pnUserGetVar('uname'):'anonymous'); ! return pnModTemplate('comments',$this->type,'input',$args,$this->template); } function DrawFormStats($args) { ! return pnModTemplate('comments',$this->type,'stats',$args,$this->template); } } Index: threaded.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/comments/rendering/threaded.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** threaded.php 30 Jun 2002 12:25:44 -0000 1.6 --- threaded.php 26 Jul 2002 02:55:53 -0000 1.7 *************** *** 1,3 **** ! <?php // File: $Id$ // ---------------------------------------------------------------------- // PostNuke Content Management System --- 1,4 ---- ! <?php ! // File: $Id$ // ---------------------------------------------------------------------- // PostNuke Content Management System *************** *** 26,31 **** include_once('modules/comments/common/CommonFunctions.php'); - class pnComments_Render_threaded extends pnComments_RenderBase { - define('_COM_NO_CONNECTOR',0); define('_COM_O_CONNECTOR', 1); --- 27,30 ---- *************** *** 36,39 **** --- 35,42 ---- define('_COM_I_CONNECTOR',6); define('_COM_BLANK_CONNECTOR',7); + + class pnComments_Render_threaded extends pnComments_RenderBase { + + function pnComments_Render_threaded($args) { *************** *** 41,45 **** } ! function pnComments_DrawTree($CommentList) { $row = 0; // internal row tracker -- track between rows a and b --- 44,48 ---- } ! function DrawTree($CommentList) { $row = 0; // internal row tracker -- track between rows a and b *************** *** 50,58 **** // draw the Settings Form ! $output = $this->DrawFormSettings(); // Draw the Comment Header $output .= $this->DrawHeader(); // create the array of arguments to pass to // the input box -- necessary values for the input form. --- 53,64 ---- // draw the Settings Form ! $output .= $this->DrawFormViewOptions(); // Draw the Comment Header $output .= $this->DrawHeader(); + // Draw the Threaded Header + $output .= pnModTemplate('comments',$this->type,'threaded-header',array(),$this->template); + // create the array of arguments to pass to // the input box -- necessary values for the input form. *************** *** 61,67 **** $args['itemid'] = $this->itemid; $args['uname'] = pnUserGetVar('uname'); - - // Draw the input box - $output = $this->DrawInput($args); while (!$this->EOA) { --- 67,70 ---- *************** *** 70,74 **** // Draw the comment ! if ($i % 2) { $output .= pnModTemplate('comments',$this->type,'thread-rowb',$comment,$this->template); } else { --- 73,77 ---- // Draw the comment ! if (($row +1) % 2) { $output .= pnModTemplate('comments',$this->type,'thread-rowb',$comment,$this->template); } else { *************** *** 76,89 **** } // prepare the next comment (if there is one). ! $this->MoveNext($comments); // increment the row counter $row++; } ! // Draw the comment ! $output .= $this->DrawCommentLeaf($comment, $users[$comment[author]]); return $output; ! } --- 79,96 ---- } // prepare the next comment (if there is one). ! $this->MoveNext($CommentList); // increment the row counter $row++; } ! $output .= pnModTemplate('comments',$this->type,'threaded-footer',array(),$this->template); ! $output .= $this->DrawFooter(); // Draw the comment ! $output .= $this->DrawLeaf($comment, $users[$comment[author]]); ! ! // Draw the input box ! $output .= $this->DrawFormInput($args); return $output; ! } *************** *** 154,160 **** // if there is a DepthBuoy set for (current depth -1) // then ! if ( DepthBuoy('get',($current_depth - 1)) === true ) { // the DepthBuoy for this depth can now be turned off. ! DepthBuoy('set',($current_depth - 1),false); $matrix[($current_depth - 1)] = _COM_T_CONNECTOR; } --- 161,167 ---- // if there is a DepthBuoy set for (current depth -1) // then ! if ( $this->DepthBuoy('get',($current_depth - 1)) === true ) { // the DepthBuoy for this depth can now be turned off. ! $this->DepthBuoy('set',($current_depth - 1),false); $matrix[($current_depth - 1)] = _COM_T_CONNECTOR; } *************** *** 173,177 **** if (!$matrix[$node]) { // if a depth buoy was set for this depth, add I connector ! if (DepthBuoy('get',$node) == true) { $matrix[($node)] = _COM_I_CONNECTOR; } else { // otherwise add a blank.gif --- 180,184 ---- if (!$matrix[$node]) { // if a depth buoy was set for this depth, add I connector ! if ($this->DepthBuoy('get',$node) == true) { $matrix[($node)] = _COM_I_CONNECTOR; } else { // otherwise add a blank.gif *************** *** 186,192 **** // this way we can remember where to set an I connector :) if (($next_depth > $current_depth) && ($current_depth != 0)) { ! DepthBuoy('set',($current_depth - 1), true); } - // ok -- once that's all done, take this segment of the whole matrix map (ie., // this comment's matrix) create the string of images that will represent this --- 193,198 ---- // this way we can remember where to set an I connector :) if (($next_depth > $current_depth) && ($current_depth != 0)) { ! $this->DepthBuoy('set',($current_depth - 1), true); } // ok -- once that's all done, take this segment of the whole matrix map (ie., // this comment's matrix) create the string of images that will represent this *************** *** 194,225 **** $CommentList[$counter]['map'] = ! implode('',array_map(array("this","pnComments_ImageSubstitution"),$matrix)); } return $CommentList; } function pnComments_ImageSubstitution($node) { switch ($node) { case _COM_O_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_nosub.gif" width=9 border=0>'; break; case _COM_P_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_sub.gif" width=9 border=0>'; break; case _COM_T_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_sub_branch_t.gif" width=12 border=0>'; break; case _COM_L_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_sub_branch_l.gif" width=12 border=0>'; break; case _COM_I_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_sub_line.gif" width=12 border=0>'; break; case _COM_BLANK_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_spacer.gif" width=12 border=0>'; break; case _COM_DASH_CONNECTOR: ! $node = '<img height=21 src="pnimages/n_sub_end.gif" width=9 border=0>'; break; default: --- 200,233 ---- $CommentList[$counter]['map'] = ! implode('',array_map("pnComments_ImageSubstitution",$matrix)); } return $CommentList; } + } function pnComments_ImageSubstitution($node) { + switch ($node) { case _COM_O_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_nosub.gif" width=9 border=0>'; break; case _COM_P_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_sub.gif" width=9 border=0>'; break; case _COM_T_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_sub_branch_t.gif" width=12 border=0>'; break; case _COM_L_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_sub_branch_l.gif" width=12 border=0>'; break; case _COM_I_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_sub_line.gif" width=12 border=0>'; break; case _COM_BLANK_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_spacer.gif" width=12 border=0>'; break; case _COM_DASH_CONNECTOR: ! $node = '<img height=21 src="modules/comments/pnimages/n_sub_end.gif" width=9 border=0>'; break; default: *************** *** 230,234 **** return $node; } - - } ?> --- 238,240 ----
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |