[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.364,1.365 links.php,1.34,1.35 portal.php,1.11,1.12 stats.php,1.30,1.31

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Mon Aug 23 15:36:38 EDT 2004


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

Modified Files:
	lib-common.php links.php portal.php stats.php 
Log Message:
Added support for URL rewriting in portal.php


Index: portal.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/portal.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** portal.php	1 Jan 2004 20:50:08 -0000	1.11
--- portal.php	23 Aug 2004 19:36:34 -0000	1.12
***************
*** 41,50 ****
  $url = '';
  
! $item = COM_applyFilter ($HTTP_GET_VARS['item']);
  
! if (!empty ($item)) {
!     $url = DB_getItem ($_TABLES['links'], 'url', "lid = '{$item}'");
!     if (!empty ($url)) {
!         DB_change ($_TABLES['links'], 'hits','hits + 1', 'lid',$item, '', true);
      }
  }
--- 41,56 ----
  $url = '';
  
! COM_setArgNames (array ('what', 'item'));
! $what = COM_getArgument ('what');
  
! if ($what == 'link') {
! 
!     $item = COM_applyFilter (COM_getArgument ('item'));
! 
!     if (!empty ($item)) {
!         $url = DB_getItem ($_TABLES['links'], 'url', "lid = '{$item}'");
!         if (!empty ($url)) {
!             DB_change ($_TABLES['links'], 'hits','hits + 1', 'lid',$item, '', true);
!         }
      }
  }

Index: links.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/links.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** links.php	6 Aug 2004 08:55:36 -0000	1.34
--- links.php	23 Aug 2004 19:36:34 -0000	1.35
***************
*** 138,143 ****
              for ($i = 0; $i < $nrows; $i++) {
                  $A = DB_fetchArray($result);
!                 $linklist->set_var('link_url', $_CONF['site_url'] .
!                     '/portal.php?what=link&item=' . $A['lid']);
                  $linklist->set_var ('link_actual_url', $A['url']);
                  $linklist->set_var('link_name', stripslashes($A['title']));
--- 138,143 ----
              for ($i = 0; $i < $nrows; $i++) {
                  $A = DB_fetchArray($result);
!                 $linklist->set_var('link_url', COM_buildUrl ($_CONF['site_url']
!                     . '/portal.php?what=link&item=' . $A['lid']));
                  $linklist->set_var ('link_actual_url', $A['url']);
                  $linklist->set_var('link_name', stripslashes($A['title']));
***************
*** 195,200 ****
                      $linklist->set_var('link_category',$currentcategory);
                  }
!                 $linklist->set_var('link_url', $_CONF['site_url'] .
!                     '/portal.php?what=link&item=' . $A['lid']);
                  $linklist->set_var ('link_actual_url', $A['url']);
                  $linklist->set_var('link_name', stripslashes($A['title']));
--- 195,200 ----
                      $linklist->set_var('link_category',$currentcategory);
                  }
!                 $linklist->set_var('link_url', COM_buildUrl ($_CONF['site_url']
!                     . '/portal.php?what=link&item=' . $A['lid']));
                  $linklist->set_var ('link_actual_url', $A['url']);
                  $linklist->set_var('link_name', stripslashes($A['title']));

Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.364
retrieving revision 1.365
diff -C2 -d -r1.364 -r1.365
*** lib-common.php	23 Aug 2004 14:30:45 -0000	1.364
--- lib-common.php	23 Aug 2004 19:36:33 -0000	1.365
***************
*** 4427,4432 ****
  
                  // redirect link via portal.php so we can count the clicks
!                 $lcount = $_CONF['site_url']
!                         . '/portal.php?what=link&item=' . $A['lid'];
  
                  // Trim the length if over 16 characters
--- 4427,4432 ----
  
                  // redirect link via portal.php so we can count the clicks
!                 $lcount = COM_buildUrl( $_CONF['site_url']
!                         . '/portal.php?what=link&item=' . $A['lid'] );
  
                  // Trim the length if over 16 characters

Index: stats.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/stats.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** stats.php	23 Aug 2004 12:38:50 -0000	1.30
--- stats.php	23 Aug 2004 19:36:34 -0000	1.31
***************
*** 245,249 ****
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);
!         $stat_templates->set_var('item_url', $_CONF['site_url'] . '/portal.php?what=link&item=' . $A['lid']);
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['hits']);
--- 245,250 ----
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);
!         $stat_templates->set_var('item_url', COM_buildUrl ($_CONF['site_url']
!                 . '/portal.php?what=link&item=' . $A['lid']));
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['hits']);




More information about the geeklog-cvs mailing list