[geeklog-cvs] geeklog-1.3/plugins/staticpages functions.inc,1.20,1.21

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Fri May 30 08:24:33 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages
In directory internal.geeklog.net:/tmp/cvs-serv13046/plugins/staticpages

Modified Files:
	functions.inc 
Log Message:
Changes for an improved Static Pages editor and more flexibility positioning Static Pages on the frontpage.


Index: functions.inc
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/plugins/staticpages/functions.inc,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** functions.inc	22 May 2003 21:08:31 -0000	1.20
--- functions.inc	30 May 2003 12:24:31 -0000	1.21
***************
*** 16,19 ****
--- 16,20 ----
  // |          Tom Willett      - twillett at users.sourceforge.net                |
  // |          Blaine Lang      - langmail at sympatico.ca                         |
+ // |          Dirk Haun        - dirk at haun-online.de                           |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 356,371 ****
      $retval = '';
  
!     if ($where > 1) {
!         return $retval;
!     } else if (($where == 0) && (($page > 1) || !empty ($topic))) {
!         return $retval;
      }
  
!     if (($where == 0) && ($page == 1) && empty ($topic)) {
!         $staticpage_label = 'nonews';
!     } else if (empty ($topic)) {
!         $staticpage_label = 'frontpage';
      } else {
!         $staticpage_label = 'topic:' . $topic;
      }
  
--- 357,368 ----
      $retval = '';
  
!     if ($page > 1) {
!         return $retval; // we only support page 1 at the moment ...
      }
  
!     if (empty ($topic)) {
!         $moresql = "(sp_where = $where) AND (sp_tid = 'none')";
      } else {
!         $moresql = "(sp_where = $where) AND (sp_tid = '{$topic}')";
      }
  
***************
*** 374,378 ****
          $perms = ' AND ' . $perms;
      }
!     $spsql = "SELECT sp_content,sp_title,sp_format,sp_php FROM {$_TABLES['staticpage']} WHERE sp_label = '{$staticpage_label}'" . $perms;
      $result = DB_query ($spsql);
  
--- 371,375 ----
          $perms = ' AND ' . $perms;
      }
!     $spsql = "SELECT sp_id,sp_content,sp_title,sp_format,sp_php FROM {$_TABLES['staticpage']} WHERE (sp_centerblock = 1) AND " . $moresql . $perms;
      $result = DB_query ($spsql);
  
***************
*** 415,418 ****
--- 412,418 ----
              }
          }
+ 
+         // increment hit counter for page
+         DB_query ("UPDATE {$_TABLES['staticpage']} SET sp_hits = sp_hits + 1 WHERE sp_id = '{$spresult['sp_id']}'");
      }
  





More information about the geeklog-cvs mailing list