[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.275,1.276 article.php,1.39,1.40

dhaun at geeklog.net dhaun at geeklog.net
Sat Jan 31 09:16:28 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv10544

Modified Files:
	lib-common.php article.php 
Log Message:
Integrated Vinny's patches to use Geeklog's URL rewriting for links to article.php


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.275
retrieving revision 1.276
diff -C2 -d -r1.275 -r1.276
*** lib-common.php	18 Jan 2004 14:43:31 -0000	1.275
--- lib-common.php	31 Jan 2004 14:16:25 -0000	1.276
***************
*** 470,473 ****
--- 470,474 ----
      $A['bodytext'] = str_replace( '$', '$', $A['bodytext'] );
  
+     $recent_post_anchortag = '';
      if( $index == 'n' )
      {
***************
*** 481,484 ****
--- 482,488 ----
          $article->set_var( 'story_introtext', stripslashes( $A['introtext'] ));
  
+         $articleUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
+                                     . $A['sid'] );
+         $article->set_var( 'article_url', $articleUrl );
          if( !empty( $A['bodytext'] ))
          {
***************
*** 488,497 ****
              $article->set_var( 'readmore_words', $numwords );
  
!             $article->set_var( 'readmore_link', '<a href="' . $_CONF['site_url']
!                     . '/article.php?story=' . $A['sid'] . '">' . $LANG01[2]
!                     . '</a> (' . $numwords . ' ' . $LANG01[62] . ') ' );
              $article->set_var( 'start_readmore_anchortag', '<a href="'
!                     . $_CONF['site_url'] . '/article.php?story=' . $A['sid']
!                     . '">' );
              $article->set_var( 'end_readmore_anchortag', '</a>' );
          }
--- 492,500 ----
              $article->set_var( 'readmore_words', $numwords );
  
!             $article->set_var( 'readmore_link', '<a href="' . $articleUrl . '">'
!                     . $LANG01[2] . '</a> (' . $numwords . ' ' . $LANG01[62]
!                     . ') ' );
              $article->set_var( 'start_readmore_anchortag', '<a href="'
!                     . $articleUrl . '">' );
              $article->set_var( 'end_readmore_anchortag', '</a>' );
          }
***************
*** 501,506 ****
              if( $A['comments'] > 0 )
              {
!                 $article->set_var( 'comments_url', $_CONF['site_url']
                          . '/article.php?story=' . $A['sid'] . '#comments' );
                  $article->set_var( 'comments_text', $A['comments'] . ' '
                          . $LANG01[3] );
--- 504,510 ----
              if( $A['comments'] > 0 )
              {
!                 $commentsUrl = COM_buildUrl( $_CONF['site_url']
                          . '/article.php?story=' . $A['sid'] . '#comments' );
+                 $article->set_var( 'comments_url', $commentsUrl );
                  $article->set_var( 'comments_text', $A['comments'] . ' '
                          . $LANG01[3] );
***************
*** 516,521 ****
                          . $LANG01[104] . ' ' . $C['username'] . '</span>';
                  $article->set_var( 'start_comments_anchortag', '<a href="'
!                         . $_CONF['site_url'] . '/article.php?story=' . $A['sid']
!                         . '#comments">' );
                  $article->set_var( 'end_comments_anchortag', '</a>' );
              }
--- 520,524 ----
                          . $LANG01[104] . ' ' . $C['username'] . '</span>';
                  $article->set_var( 'start_comments_anchortag', '<a href="'
!                         . $commentsUrl . '">' );
                  $article->set_var( 'end_comments_anchortag', '</a>' );
              }
***************
*** 550,557 ****
          {
              $article->set_var( 'print_icon', '<a href="' . $_CONF['site_url']
!                 . '/article.php?story=' . $A['sid']
!                 . '&mode=print"><img border="0" src="'
!                 . $_CONF['layout_url'] . '/images/print.gif" alt="'
!                 . $LANG01[65] . '" title="' . $LANG11[3] . '"></a>' );
          }
      }
--- 553,560 ----
          {
              $article->set_var( 'print_icon', '<a href="' . $_CONF['site_url']
!                 . '/article.php?story=' . $A['sid'] . '&mode=print">'
!                 . '<img border="0" src="' . $_CONF['layout_url']
!                 . '/images/print.gif" alt="' . $LANG01[65] . '" title="'
!                 . $LANG11[3] . '"></a>' );
          }
      }
***************
*** 776,780 ****
          ));
  
!     $pagetitle = $_CONF['pagetitle'];
      if( empty( $pagetitle ))
      {
--- 779,786 ----
          ));
  
!     if( isset( $_CONF['pagetitle'] ))
!     {
!         $pagetitle = $_CONF['pagetitle'];
!     }
      if( empty( $pagetitle ))
      {
***************
*** 3189,3194 ****
                  }
  
!                 $oldnews[] = '<a href="' . $_CONF['site_url']
!                     . '/article.php?story=' . $A['sid'] . '">' . $A['title']
                      . '</a> (' . $A['comments'] . ')';
              }
--- 3195,3200 ----
                  }
  
!                 $oldnews[] = '<a href="' . COM_buildUrl( $_CONF['site_url']
!                     . '/article.php?story=' . $A['sid'] ) . '">' . $A['title']
                      . '</a> (' . $A['comments'] . ')';
              }
***************
*** 3231,3234 ****
--- 3237,3244 ----
          $U['noboxes'] = DB_getItem( $_TABLES['userindex'], 'noboxes', "uid = {$_USER['uid']}" );
      }
+     else
+     {
+         $U['noboxes'] = 0;
+     }
  
      switch( $name )
***************
*** 3301,3304 ****
--- 3311,3319 ----
          $U = DB_fetchArray( $result );
      }
+     else
+     {
+         $U['boxes'] = '';
+         $U['noboxes'] = 0;
+     }
  
      if( $side == 'left' )
***************
*** 3985,3989 ****
              }
  
!             $mailtext .= "$LANG08[33] {$_CONF['site_url']}/article.php?story={$S['sid']}\n";
          }
  
--- 4000,4005 ----
              }
  
!             $mailtext .= $LANG08[33] . ' ' . COM_buildUrl( $_CONF['site_url']
!                       . '/article.php?story=' . $S['sid'] ) . "\n";
          }
  
***************
*** 4143,4147 ****
                      $itemlen = strlen( $A['title'] );
                      $titletouse = stripslashes( $A['title'] );
!                     $urlstart = '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $A['sid'] . '#comments"';
                  }
                  else if( $A['type'] == 'poll' )
--- 4159,4164 ----
                      $itemlen = strlen( $A['title'] );
                      $titletouse = stripslashes( $A['title'] );
!                     $urlstart = '<a href="' . COM_buildUrl( $_CONF['site_url']
!                         . '/article.php?story=' . $A['sid'] . '#comments' ) . '"';
                  }
                  else if( $A['type'] == 'poll' )

Index: article.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/article.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** article.php	12 Dec 2003 21:58:10 -0000	1.39
--- article.php	31 Jan 2004 14:16:25 -0000	1.40
***************
*** 55,62 ****
  // MAIN
  
  if (isset ($HTTP_POST_VARS['story'])) {
      $story = COM_applyFilter($HTTP_POST_VARS['story']);
- } else {
-     $story = COM_applyFilter($HTTP_GET_VARS['story']);
  }
  if (empty ($story)) {
--- 55,62 ----
  // MAIN
  
+ COM_setArgNames (array ('story'));
+ $story = COM_applyFilter (COM_getArgument ('story'));
  if (isset ($HTTP_POST_VARS['story'])) {
      $story = COM_applyFilter($HTTP_POST_VARS['story']);
  }
  if (empty ($story)) {
***************
*** 166,171 ****
              if ($_CONF['hideprintericon'] == 0) {
                  $story_options[] = '<a href="' . $_CONF['site_url']
!                     . '/article.php?story=' . $story .  '&mode=print">'
!                     . $LANG11[3] . '</a>';
              }
              $related = COM_whatsRelated ($A['introtext'] . ' ' . $A['bodytext'],
--- 166,171 ----
              if ($_CONF['hideprintericon'] == 0) {
                  $story_options[] = '<a href="' . $_CONF['site_url']
!                     . '/article.php?story=' . $story .  '&mode=print'
!                     . '">' . $LANG11[3] . '</a>';
              }
              $related = COM_whatsRelated ($A['introtext'] . ' ' . $A['bodytext'],





More information about the geeklog-cvs mailing list