[Phpcms-plugins-cvs] masterPlugin4phpCMS .cvsignore,NONE,1.1 masterscript.php,NONE,1.1 masterplugin4
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-12-08 17:44:41
|
Update of /cvsroot/phpcms-plugins/masterPlugin4phpCMS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5736 Added Files: .cvsignore masterscript.php masterplugin4phpcms.php README Log Message: initial import --- NEW FILE: README --- --- NEW FILE: masterscript.php --- <?php /** * MasterPlugin4phpCMS * * Gives you the possibility to run PLUGINs after SCRIPTs * * <b>License</b> * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * @author Martin Jahn <mj...@us...> * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright Copyright (c) 2004, Martin Jahn * @version $Id: masterscript.php,v 1.1 2004/12/08 17:44:32 mjahn Exp $ * @package masterPlugin4phpCMS */ /* * $Log: masterscript.php,v $ * Revision 1.1 2004/12/08 17:44:32 mjahn * initial import * */ /** * import the Tagarray into the namespace */ global $Tags; /** * a simple class for a virtual PAGE-class */ class helpMaster { var $CONTENT = array (); } /** * create a dummy-PAGE */ $PageContent = new helpMaster; /** * fill the dumy-PAGE with the content */ if (isset ($phpCMS_Buffer)) { $PageContent->CONTENT = $phpCMS_Buffer; } else { $PageContent->CONTENT = $phpCMSBuffer; } $Tags = array (); /**#@+ * call the plugins * * here you can include any plugin, that you wish _and_ that only manipulates * the CONTENT-field and/or creates Tags from the CONTENT-content * Successfully tested wih autokeygen, autodecgen, lexiword. Sometimes the * plugin need some manipulation until they work together with * masterPlugin4phpCMS */ include_once (dirname (__FILE__).'/autokeygen/autokeygen.php'); include_once (dirname (__FILE__).'/autodescgen.php'); include_once (dirname (__FILE__).'/lexiword.php'); /**#@-*/ /** * get the content back and replace it to the $phpCMS_Buffer */ if (is_array ($PageContent->CONTENT)) { $search = array (); $replace = array (); $num = count ($Tags); for ($i = 0; $i < $num; $i++) { $search [] = $Tags [$i] [0]; $replace [] = $Tags [$i] [1]; } /** * replace the tags in the CONTENT */ $CONTENT = str_replace ($search, $replace, join ("\r\n", $PageContent->CONTENT)); if (isset ($phpCMS_Buffer)) { $phpCMS_Buffer = explode ("\r\n", $CONTENT); } else { $phpCMSBuffer = explode ("\r\n", $CONTENT); } } ?> --- NEW FILE: masterplugin4phpcms.php --- <?php $PageContent->SCRIPT_MASTER = array ('/cms/plugins/masterscript.php'); ?> --- NEW FILE: .cvsignore --- .project project.index |