[geeklog-cvs] geeklog-1.3/system lib-plugins.php,1.39,1.40

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Tue Sep 21 06:06:32 EDT 2004


Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv24485

Modified Files:
	lib-plugins.php 
Log Message:
Added support for autolinks to events: [event:20040101093000103 link text here]


Index: lib-plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** lib-plugins.php	21 Sep 2004 09:43:30 -0000	1.39
--- lib-plugins.php	21 Sep 2004 10:06:30 -0000	1.40
***************
*** 880,888 ****
  *
  */
! function PLG_replacetags($content) {
      global $_CONF, $_TABLES, $_PLUGINS, $LANG32;
  
      // Determine which Core Modules and Plugins support AutoLinks
!     $autolinkModules = array('story' => 'story');
      foreach ($_PLUGINS as $pi_name) {
          $function = 'plugin_autotags_' . $pi_name;
--- 880,892 ----
  *
  */
! function PLG_replaceTags ($content)
! {
      global $_CONF, $_TABLES, $_PLUGINS, $LANG32;
  
      // Determine which Core Modules and Plugins support AutoLinks
!     $autolinkModules = array ('story'    => 'story',
!                               'calendar' => 'event'
!                              );
! 
      foreach ($_PLUGINS as $pi_name) {
          $function = 'plugin_autotags_' . $pi_name;
***************
*** 942,948 ****
                            . '/article.php?story=' . $autotag['parm1']) . '">'
                            . $autotag['parm2'] . '</a>';
!                 $content = str_replace($autotag['tagstr'],$filelink,$content);
              } elseif (function_exists($function)) {
!                 $content = $function('parse',$content,$autotag);
              }
          }
--- 946,957 ----
                            . '/article.php?story=' . $autotag['parm1']) . '">'
                            . $autotag['parm2'] . '</a>';
!                 $content = str_replace($autotag['tagstr'], $filelink, $content);
!             } else if ($autotag['module'] == 'calendar') {
!                 $filelink = '<a href="' . $_CONF['site_url']
!                           . '/calendar_event.php?eid=' . $autotag['parm1']
!                           . '">' . $autotag['parm2'] . '</a>';
!                 $content = str_replace($autotag['tagstr'], $filelink, $content);
              } elseif (function_exists($function)) {
!                 $content = $function('parse', $content, $autotag);
              }
          }




More information about the geeklog-cvs mailing list