Esempio n. 1
0
File: t3.php Progetto: lazarch/t3
 function onAfterRoute()
 {
     if (defined('T3_PLUGIN')) {
         T3Bot::preload();
         $template = T3::detect();
         if ($template) {
             // load the language
             $this->loadLanguage();
             T3Bot::beforeInit();
             T3::init($template);
             T3Bot::afterInit();
             //load T3 plugins
             JPluginHelper::importPlugin('t3');
             if (is_file(T3_TEMPLATE_PATH . '/templateHook.php')) {
                 include_once T3_TEMPLATE_PATH . '/templateHook.php';
             }
             $tplHookCls = preg_replace('/(^[^A-Z_]+|[^A-Z0-9_])/i', '', T3_TEMPLATE . 'Hook');
             $dispatcher = JDispatcher::getInstance();
             if (class_exists($tplHookCls)) {
                 new $tplHookCls($dispatcher, array());
             }
             $dispatcher->trigger('onT3Init');
             //check and execute the t3action
             T3::checkAction();
             //check and change template for ajax
             T3::checkAjax();
         }
     }
 }
Esempio n. 2
0
 function onAfterRoute()
 {
     include_once dirname(__FILE__) . '/includes/core/defines.php';
     include_once dirname(__FILE__) . '/includes/core/t3.php';
     include_once dirname(__FILE__) . '/includes/core/bot.php';
     T3Bot::preload();
     $template = T3::detect();
     if ($template) {
         T3Bot::beforeInit();
         T3::init($template);
         T3Bot::afterInit();
         //check and execute the t3action
         T3::checkAction();
         //check and change template for ajax
         T3::checkAjax();
     }
 }