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

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


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

Modified Files:
	lib-plugins.php 
Log Message:
List supported autolink tags with the allowed HTML.


Index: lib-plugins.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-plugins.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** lib-plugins.php	21 Sep 2004 10:06:30 -0000	1.40
--- lib-plugins.php	21 Sep 2004 10:58:17 -0000	1.41
***************
*** 872,886 ****
  
  /**
! * This function will allow plugins to support the use of custom autolinks
! * in other site content. Plugins can now use this API when saving content
! * and have the content checked for any autolinks before saving.
! * The autolink would be like:  [story:20040101093000103 here]
  *
! * @param   string   $content   Content that should be parsed for autolinks
  *
  */
! function PLG_replaceTags ($content)
  {
!     global $_CONF, $_TABLES, $_PLUGINS, $LANG32;
  
      // Determine which Core Modules and Plugins support AutoLinks
--- 872,885 ----
  
  /**
! * Get a list of all currently supported autolink tags.
  *
! * Returns an associative array where $A['plugin-name'] = 'tag-name'
! *
! * @return   array   All currently supported autolink tags
  *
  */
! function PLG_collectTags ()
  {
!     global $_PLUGINS;
  
      // Determine which Core Modules and Plugins support AutoLinks
***************
*** 891,900 ****
      foreach ($_PLUGINS as $pi_name) {
          $function = 'plugin_autotags_' . $pi_name;
!         if (function_exists($function)) {
!             $autotag = $function('tagname');
              $autolinkModules[$pi_name]  = $autotag;
          }
      }
  
      // For each supported module - scan the content looking for any AutoLink tags
      $tags = array();
--- 890,917 ----
      foreach ($_PLUGINS as $pi_name) {
          $function = 'plugin_autotags_' . $pi_name;
!         if (function_exists ($function)) {
!             $autotag = $function ('tagname');
              $autolinkModules[$pi_name]  = $autotag;
          }
      }
  
+     return $autolinkModules;
+ }
+ 
+ /**
+ * This function will allow plugins to support the use of custom autolinks
+ * in other site content. Plugins can now use this API when saving content
+ * and have the content checked for any autolinks before saving.
+ * The autolink would be like:  [story:20040101093000103 here]
+ *
+ * @param   string   $content   Content that should be parsed for autolinks
+ *
+ */
+ function PLG_replaceTags ($content)
+ {
+     global $_CONF, $_TABLES, $_PLUGINS, $LANG32;
+ 
+     $autolinkModules = PLG_collectTags ();
+ 
      // For each supported module - scan the content looking for any AutoLink tags
      $tags = array();




More information about the geeklog-cvs mailing list