[geeklog-cvs] journal/public_html index.php,1.2,1.3

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Thu Jul 31 13:58:42 EDT 2003


Update of /usr/cvs/geeklog/journal/public_html
In directory geeklog_prod:/tmp/cvs-serv6552/public_html

Modified Files:
	index.php 
Log Message:
This upgrade adds the ability to have RSS feeds for individual journals (plus various cleanups, moving text to the language file). Also includes and installs the Journal block now.


Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/journal/public_html/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.php	30 Jul 2003 10:00:44 -0000	1.2
--- index.php	31 Jul 2003 17:58:40 -0000	1.3
***************
*** 9,15 ****
  // | This is the home page for the Journal plug-in                             |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2002 by the following authors:                              |
  // |                                                                           |
  // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
--- 9,16 ----
  // | This is the home page for the Journal plug-in                             |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2002-2003 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
+ // |          Dirk Haun        - dirk at haun-online.de                           |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 32,36 ****
  // $Id$
  
! include("../lib-common.php");
  
  if (DB_getItem ($_TABLES['plugins'], 'pi_enabled', "pi_name = 'journal'") == 0) {
--- 33,37 ----
  // $Id$
  
! require_once ('../lib-common.php');
  
  if (DB_getItem ($_TABLES['plugins'], 'pi_enabled', "pi_name = 'journal'") == 0) {
***************
*** 48,58 ****
  // if not anonymous, get current journal 
  if ($_USER['uid'] > 1) {
!     $cur_journal = DB_getItem ($_TABLES['journal'], 'jrn_id',
!             "jrn_uid = {$_USER['uid']} AND jrn_iscurrent = 1");
  }
  
  switch ($mode) {
      case $LANG_JOURNAL['cancel']:
!         // note: I purpose don't have anything in this so that when a use
          //       clicks cancel on a form they route to the user page
      case 'user':
--- 49,63 ----
  // if not anonymous, get current journal 
  if ($_USER['uid'] > 1) {
!     $result = DB_query ("SELECT jrn_id FROM {$_TABLES['journal']} WHERE jrn_uid = {$_USER['uid']} ORDER BY jrn_iscurrent DESC");
!     if (DB_numRows ($result) > 0) {
!         $C = DB_fetchArray ($result);
!         $cur_journal = $C['jrn_id'];
!     }
! 
  }
  
  switch ($mode) {
      case $LANG_JOURNAL['cancel']:
!         // note: I purpose don't have anything in this so that when a user
          //       clicks cancel on a form they route to the user page
      case 'user':
***************
*** 118,127 ****
          if ($type == 'journal') {
              // $display .= shownavigation('user');
!             $display .= savejournal($jrn_id, $jrn_uid, $jrn_name, $jrn_jt_id, $jrn_public,
!                         $jrn_hits, $unixdate, $jrn_iscurrent);
          } else if ($type == 'entry') {
              // $display .= shownavigation('user');
              savejournalentry($je_id, $je_jrn_id, $je_summary, $je_text,
                               $je_public, $unixdate, $je_hits, $je_mood);
          }
          break;	
--- 123,133 ----
          if ($type == 'journal') {
              // $display .= shownavigation('user');
!             $display .= savejournal ($jrn_id, $jrn_uid, $jrn_name, $jrn_jt_id,
!                 $jrn_public, $jrn_hits, $unixdate, $jrn_iscurrent, $jrn_feed);
          } else if ($type == 'entry') {
              // $display .= shownavigation('user');
              savejournalentry($je_id, $je_jrn_id, $je_summary, $je_text,
                               $je_public, $unixdate, $je_hits, $je_mood);
+             journal_update_feed ($je_jrn_id);
          }
          break;	





More information about the geeklog-cvs mailing list