[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.332,1.333

tony at iowaoutdoors.org tony at iowaoutdoors.org
Mon Jun 7 14:40:47 EDT 2004


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

Modified Files:
	lib-common.php 
Log Message:
Added link to PDF generator to admin menu (if enabled)

Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.332
retrieving revision 1.333
diff -C2 -d -r1.332 -r1.333
*** lib-common.php	4 Jun 2004 21:47:28 -0000	1.332
--- lib-common.php	7 Jun 2004 18:40:43 -0000	1.333
***************
*** 565,568 ****
--- 565,576 ----
                  . $LANG11[3] . '"></a>' );
          }
+         if ($_CONF['pdf_enabled'] == 1) {
+             $article->set_var('pdf_icon',
+                 sprintf('<a href="%s/pdfgenerator.php?pageType=2&pageData=%s"><img border="0" src="%s/images/pdf.gif" alt="%s" title="%s" /></a>',
+                     $_CONF['site_url'], urlencode("{$_CONF['site_url']}/article.php?story={$A['sid']}&mode=print"),
+                     $_CONF['layout_url'], $LANG01[111], $LANG11[5]));
+         } else {
+             $article->set_var('pdf_icon', '');
+         }
      }
      $article->set_var( 'recent_post_anchortag', $recent_post_anchortag );
***************
*** 2380,2384 ****
  function COM_adminMenu( $help = '', $title = '' )
  {
!     global $_TABLES, $_USER, $_CONF, $LANG01, $HTTP_SERVER_VARS;
  
      $retval = '';
--- 2388,2392 ----
  function COM_adminMenu( $help = '', $title = '' )
  {
!     global $_TABLES, $_USER, $_CONF, $LANG01, $LANG_PDF, $HTTP_SERVER_VARS;
  
      $retval = '';
***************
*** 2700,2703 ****
--- 2708,2722 ----
          }
  
+         // Add PDF Generator Link if the feature is enabled
+         if (($_CONF['pdf_enabled'] == 1) AND (SEC_inGroup('Root'))) {
+             $url = $_CONF['site_url'] . '/pdfgenerator.php';
+             $adminmenu->set_var( 'option_url', $url );
+             $adminmenu->set_var( 'option_label', $LANG_PDF[9] );
+             $adminmenu->set_var( 'option_count', 'N/A' );
+ 
+             $retval .= $adminmenu->parse( 'item',
+                     ( $thisUrl == $url ) ? 'current' : 'option' );
+         }
+         
          if( SEC_inGroup( 'Root' ))
          {




More information about the geeklog-cvs mailing list