Xaraya / Postnuke CVS Notices - Message

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 Notice

Directory filter : [ all ] / postnuke_official / html / modules / comments [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
12 Aug 2002 17:31:43postnuke_official/html/modules/commentspninit.php,1.11,1.12 pnuser.php,1.11,1.12Mike
 quick fix (tm) to at least *show* imported article comments - still lots of TODOs :-)

Update of /home/cvsroot/postnuke_official/html/modules/comments
In directory ns7.hostnuke.net:/tmp/cvs-serv28963

Modified Files:
	pninit.php pnuser.php 
Log Message:
quick fix (tm) to at least *show* imported article comments - still lots of TODOs :-)


Index: pninit.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/comments/pninit.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** pninit.php	10 Aug 2002 13:29:17 -0000	1.11
--- pninit.php	12 Aug 2002 17:31:40 -0000	1.12
***************
*** 73,77 ****
      
      // Set up User (preference) variables
!     pnModAPILoad("Modules", "admin");
      
      $metadata[0]['label'] = 'comments_rendertype';
--- 73,77 ----
      
      // Set up User (preference) variables
!     pnModAPILoad('modules', 'admin');
      
      $metadata[0]['label'] = 'comments_rendertype';
***************
*** 101,104 ****
--- 101,112 ----
      }
      */
+ 
+ // TODO: add delete hook
+ 
+     if (!pnModRegisterHook('item', 'display', 'GUI',
+                            'comments', 'user', 'display')) {
+         return false;
+     }
+ 
      // Initialisation successful
      return true;
***************
*** 107,110 ****
--- 115,120 ----
  function comments_delete()
  {
+     include('pnadodb/pnTableDDL.php');
+ 
      // Get database information
      list($dbconn) = pnDBGetConn();
***************
*** 122,126 ****
          pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR',
                         new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
!         return;
      }
  
--- 132,136 ----
          pnExceptionSet(PN_SYSTEM_EXCEPTION, 'DATABASE_ERROR',
                         new SystemException(__FILE__.'('.__LINE__.'): '.$msg));
! //        return;
      }
  
***************
*** 129,132 ****
--- 139,147 ----
      pnModDelVar('comments', 'order');
      pnModDelVar('comments', 'rendertype');
+ 
+     if (!pnModUnregisterHook('item', 'display', 'GUI',
+                              'comments', 'user', 'display')) {
+         return false;
+     }
  
      // Deletion successful

Index: pnuser.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/comments/pnuser.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** pnuser.php	4 Aug 2002 08:32:04 -0000	1.11
--- pnuser.php	12 Aug 2002 17:31:40 -0000	1.12
***************
*** 48,51 ****
--- 48,52 ----
      $comments = pnModAPIFunc('comments','user','get',$args);
  
+ //$settings['rendertype'] = _COM_VIEW_THREADED;
      $show = pnComments_RenderFactory($args, $settings['rendertype']);
  
***************
*** 58,73 ****
  }
  function comments_user_display($args) {
! 
      if (empty($args['returnurl'])) {
!         $args['modinfo'] = pnModGetInfo($modid);
          $args['returnurl'] = pnModURL($modinfo['name'],'user','main');
      }
  
      // load the display settings
!     pnModAPILoad('comments');
!     $settings = pnModAPIFunc('comments','user','GetSettings');
  
      $show = pnComments_RenderFactory($args, $settings['rendertype']);
!     $output = $show->DrawCommentTree($comments, $modid, $itemid);
  
      return $output;
--- 59,82 ----
  }
  function comments_user_display($args) {
!     if (empty($args['modid'])) {
!         $args['modid'] = pnModGetIDFromName(pnModGetName());
!     }
      if (empty($args['returnurl'])) {
!         $modinfo = pnModGetInfo($args['modid']);
          $args['returnurl'] = pnModURL($modinfo['name'],'user','main');
      }
  
      // load the display settings
!     pnModAPILoad('comments','user');
!     $settings = pnModAPIFunc('comments','user','GetOptions');
  
+     $args['type'] = 'user';
+     $args['itemid'] = $args['objectid'];
+ 
+     $comments = pnModAPIFunc('comments','user','get',$args);
+ 
+ //$settings['rendertype'] = _COM_VIEW_THREADED;
      $show = pnComments_RenderFactory($args, $settings['rendertype']);
!     $output = $show->DrawTree($comments);
  
      return $output;
***************
*** 316,318 ****
  }
  
! ?>
\ No newline at end of file
--- 325,327 ----
  }
  
! ?>


Directory filter : [ all ] / postnuke_official / html / modules / comments [ view in CVS ]

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