[geeklog-cvs] Geeklog-1.x/plugins/staticpages functions.inc, 1.119, 1.120

Dirk Haun dhaun at qs1489.pair.com
Sat Apr 19 15:24:01 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages
In directory qs1489.pair.com:/tmp/cvs-serv45463/plugins/staticpages

Modified Files:
	functions.inc 
Log Message:
Changed behaviour of the [staticpage_content:] autotag so that it only replaces the tag string instead of the entire content. Seems to make more sense that way ...


Index: functions.inc
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages/functions.inc,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** functions.inc	6 Apr 2008 17:26:02 -0000	1.119
--- functions.inc	19 Apr 2008 19:23:58 -0000	1.120
***************
*** 984,988 ****
  *
  */
! function plugin_autotags_staticpages ($op, $content = '', $autotag = '')
  {
      global $_CONF, $_TABLES;
--- 984,988 ----
  *
  */
! function plugin_autotags_staticpages($op, $content = '', $autotag = '')
  {
      global $_CONF, $_TABLES;
***************
*** 994,1015 ****
      } else if ($op == 'parse') {
          if ($autotag['tag'] == 'staticpage' ) {
!             $sp_id = COM_applyFilter ($autotag['parm1']);
!             $url = COM_buildUrl ($_CONF['site_url'] . '/staticpages/index.php?page='
!                                  . $sp_id);
!             if (empty ($autotag['parm2'])) {
!                 $linktext = stripslashes (DB_getItem ($_TABLES['staticpage'],
!                                           'sp_title', "sp_id = '$sp_id'"));
              } else {
                  $linktext = $autotag['parm2'];
              }
              $link = COM_createLink($linktext, $url);
!             $content = str_replace ($autotag['tagstr'], $link, $content);
          } else if ($autotag['tag'] == 'staticpage_content') {
!             $sp_id = COM_applyFilter ($autotag['parm1']);
              if (isset($recursive[$sp_id])) {
                  $content = '';
              } else {
                  $recursive[$sp_id] = true;
!                 $content = SP_returnStaticpage($sp_id, 'autotag');
              }
          }
--- 994,1017 ----
      } else if ($op == 'parse') {
          if ($autotag['tag'] == 'staticpage' ) {
!             $sp_id = COM_applyFilter($autotag['parm1']);
!             $url = COM_buildUrl($_CONF['site_url']
!                                 . '/staticpages/index.php?page=' . $sp_id);
!             if (empty($autotag['parm2'])) {
!                 $linktext = stripslashes(DB_getItem ($_TABLES['staticpage'],
!                                          'sp_title', "sp_id = '$sp_id'"));
              } else {
                  $linktext = $autotag['parm2'];
              }
              $link = COM_createLink($linktext, $url);
!             $content = str_replace($autotag['tagstr'], $link, $content);
          } else if ($autotag['tag'] == 'staticpage_content') {
!             $sp_id = COM_applyFilter($autotag['parm1']);
              if (isset($recursive[$sp_id])) {
                  $content = '';
              } else {
                  $recursive[$sp_id] = true;
!                 $sp_content = SP_returnStaticpage($sp_id, 'autotag');
!                 $content = str_replace($autotag['tagstr'], $sp_content,
!                                        $content);
              }
          }




More information about the geeklog-cvs mailing list