Source for file config.plugin.php

Documentation is available at config.plugin.php

  1. <?php
  2. /**
  3.  * Plugin Advanced Mod Rewrite settings
  4.  *
  5.  * @author      Murat Purc <murat@purc.de>
  6.  * @copyright   © Murat Purc 2008
  7.  * @package     Contenido
  8.  * @subpackage  ModRewrite
  9.  */
  10.  
  11.  
  12. if(!defined('CON_FRAMEWORK')) {
  13.     die('Illegal call');
  14. }
  15.  
  16. global $cfg$client$load_client$contenido;
  17.  
  18. if (isset($client&& (int) $client 0{
  19.     $clientId = (int) $client;
  20. elseif (isset($load_client&& (int) $load_client 0{
  21.     $clientId = (int) $load_client;
  22. else {
  23.     $clientId '';
  24. }
  25.  
  26.  
  27. // Include necessary sources
  28. cInclude('classes''Debug/DebuggerFactory.class.php');
  29. cInclude('classes''mp/class.mpdebug.php');
  30. plugin_include('mod_rewrite''classes/class.modrewrite.php');
  31. plugin_include('mod_rewrite''classes/class.modrewritecontroller.php');
  32. plugin_include('mod_rewrite''includes/functions.mod_rewrite.php');
  33. cInclude('classes''mp/class.confighandler.php');
  34.  
  35. // set debug configuration
  36. $options array(
  37.     'enable'                    => true//{%DEPLOY_DEBUG_ENABLE%}
  38.     'ressource_urls'            => array('/contenido/logs/errorlog.txt'),
  39.     'dump_super_globals'        => array('$_GET''$_POST''$_COOKIE''$_SESSION'),
  40.     'ignore_empty_superglobals' => true
  41. );
  42. $GLOBALS['mpDebug']->setConfig($options);
  43.  
  44.  
  45. // load configuration
  46.  
  47.  
  48.  
  49.     if (isset($contenido)) {
  50.         // we are in backend, don't register any cec functions and get out here
  51.         return;
  52.     }
  53.  
  54.     $aMrCfg ModRewrite::getConfig();
  55.  
  56.     ////////////////////////////////////////////////////////////////////////////////////////////////
  57.  
  58.     $_cecRegistry cApiCECRegistry::getInstance();
  59.  
  60.     // Add new tree function to Contenido Extension Chainer
  61.     $_cecRegistry->addChainFunction('Contenido.Action.str_newtree.AfterCall''mr_strNewTree');
  62.  
  63.     // Add move subtree function to Contenido Extension Chainer
  64.     $_cecRegistry->addChainFunction('Contenido.Action.str_movesubtree.AfterCall''mr_strMoveSubtree');
  65.  
  66.     // Add new category function to Contenido Extension Chainer
  67.     $_cecRegistry->addChainFunction('Contenido.Action.str_newcat.AfterCall''mr_strNewCategory');
  68.  
  69.     // Add rename category function to Contenido Extension Chainer
  70.     $_cecRegistry->addChainFunction('Contenido.Action.str_renamecat.AfterCall''mr_strRenameCategory');
  71.  
  72.     // Add move up category function to Contenido Extension Chainer
  73.     $_cecRegistry->addChainFunction('Contenido.Action.str_moveupcat.AfterCall''mr_strMoveUpCategory');
  74.  
  75.     // Add move down category function to Contenido Extension Chainer
  76.     $_cecRegistry->addChainFunction('Contenido.Action.str_movedowncat.AfterCall''mr_strMovedownCategory');
  77.  
  78.     // Add save article (new and existing category) function to Contenido Extension Chainer
  79.     $_cecRegistry->addChainFunction('Contenido.Action.con_saveart.AfterCall''mr_conSaveArticle');
  80.  
  81.     // Add mr related function for hook "after plugins loaded" to Contenido Extension Chainer
  82.     $_cecRegistry->addChainFunction('Contenido.Frontend.AfterLoadPlugins''mr_runFrontendController');
  83.  
  84.     ////////////////////////////////////////////////////////////////////////////////////////////////
  85.  
  86.  
  87.     // Add move article function to Contenido Extension Chainer
  88.     $_cecRegistry->addChainFunction('Contenido.Article.conMoveArticles_Loop''mr_conMoveArticles');
  89.  
  90.     // Add duplicate article function to Contenido Extension Chainer
  91.     $_cecRegistry->addChainFunction('Contenido.Article.conCopyArtLang_AfterInsert''mr_conCopyArtLang');
  92.  
  93.     // Add sync article function to Contenido Extension Chainer
  94.     $_cecRegistry->addChainFunction('Contenido.Article.conSyncArticle_AfterInsert''mr_conSyncArticle');
  95.  
  96.     // Add url rewriting function to Contenido Extension Chainer
  97.     $_cecRegistry->addChainFunction('Contenido.Frontend.CreateURL''mr_build_new_url');
  98.  
  99.     if ($aMrCfg['rewrite_urls_at_congeneratecode'== 1{
  100.  
  101.         // Add url rewriting at code generation to Contenido Extension Chainer
  102.         $_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode''mr_build_generated_code');
  103. #        $GLOBALS['mpDebug']->addDebug('conGenerateCode()', 'added chain to', __FILE__);
  104.  
  105.     elseif ($aMrCfg['rewrite_urls_at_front_content_output'== 1{
  106.  
  107.         // Add url rewriting at html output to Contenido Extension Chainer
  108.         $_cecRegistry->addChainFunction('Contenido.Frontend.HTMLCodeOutput''mr_build_generated_code');
  109. #           $GLOBALS['mpDebug']->addDebug('front_content.php', 'added chain to output at', __FILE__);
  110.  
  111.     else {
  112.  
  113.         // Fallback solution: Add url rewriting at code generation to Contenido Extension Chainer
  114.         $_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode''mr_build_generated_code');
  115. #           $GLOBALS['mpDebug']->addDebug('conGenerateCode()', 'added fallback chain to', __FILE__);
  116.  
  117.     }
  118.  
  119. }
  120.  
  121. unset($clientId$options);

Documentation generated on Mon, 08 Sep 2008 03:08:48 +0200 by phpDocumentor 1.4.0