[geeklog-cvs] geeklog-1.3/public_html users.php,1.92,1.93

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sat Oct 23 06:23:03 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv3072

Modified Files:
	users.php 
Log Message:
Use 'mode=view' to link to the user's recent comments


Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** users.php	10 Oct 2004 19:01:07 -0000	1.92
--- users.php	23 Oct 2004 10:23:01 -0000	1.93
***************
*** 218,222 ****
  
      // then, find all comments by the user in those stories and polls
!     $sql = "SELECT sid,title,pid,type,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['comments']} WHERE (uid = $user)";
  
      // SQL NOTE:  Using a HAVING clause is usually faster than a where if the
--- 218,222 ----
  
      // then, find all comments by the user in those stories and polls
!     $sql = "SELECT sid,title,cid,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['comments']} WHERE (uid = $user)";
  
      // SQL NOTE:  Using a HAVING clause is usually faster than a where if the
***************
*** 236,253 ****
              $C = DB_fetchArray($result);
              $user_templates->set_var('row_number', $i . '.');
!             if ($C['type'] == 'article') {
!                 $user_templates->set_var('comment_begin_href',
!                     '<a href="' . $_CONF['site_url'] .
!                     '/comment.php?mode=display&sid=' . $C['sid'] .
!                     '&type=' . $C['type'] . '&title=' .
!                     urlencode($C['title']) . '&pid=' .  $C['pid'] . '">');
!             } else {
!                 $user_templates->set_var('comment_begin_href',
                      '<a href="' . $_CONF['site_url'] .
!                     '/comment.php?mode=display&sid=' . $C['sid'] .
!                     '&type=' . $C['type'] . '&title=' .
!                     urlencode($C['title']) . '&pid=' .  $C['pid'] .
!                     '&qid=' . $C['sid'] . '">');
!             }
              $C['title'] = str_replace('$','$',$C['title']);
              $user_templates->set_var('comment_title', stripslashes($C['title']));
--- 236,242 ----
              $C = DB_fetchArray($result);
              $user_templates->set_var('row_number', $i . '.');
!             $user_templates->set_var ('comment_begin_href',
                      '<a href="' . $_CONF['site_url'] .
!                     '/comment.php?mode=view&cid=' . $C['cid']. '">');
              $C['title'] = str_replace('$','$',$C['title']);
              $user_templates->set_var('comment_title', stripslashes($C['title']));




More information about the geeklog-cvs mailing list