fixed path and stuff, version increased, added doc blocks
Dieser Commit ist enthalten in:
Ursprung
405b3d9fe3
Commit
ba5e895d99
|
@ -9,11 +9,11 @@
|
||||||
<copyright>(c) 2017 Ortwin Pinke, PHP-Backoffice.de</copyright>
|
<copyright>(c) 2017 Ortwin Pinke, PHP-Backoffice.de</copyright>
|
||||||
<mail>info@php-backoffice.de</mail>
|
<mail>info@php-backoffice.de</mail>
|
||||||
<website>http://php-backoffice.de</website>
|
<website>http://php-backoffice.de</website>
|
||||||
<version>1.0.0</version>
|
<version>1.0.2</version>
|
||||||
<license>GNU Lesser General Public License</license>
|
<license>GNU Lesser General Public License</license>
|
||||||
</general>
|
</general>
|
||||||
<requirements php="5.6">
|
<requirements php="5.6">
|
||||||
<conlite minversion="2.0" />
|
<conlite minversion="2.0.2" />
|
||||||
</requirements>
|
</requirements>
|
||||||
<conlite />
|
<conlite />
|
||||||
</plugin>
|
</plugin>
|
|
@ -2,13 +2,23 @@
|
||||||
/**
|
/**
|
||||||
* This file contains the backend class for smarty wrapper plugin.
|
* This file contains the backend class for smarty wrapper plugin.
|
||||||
*
|
*
|
||||||
|
* @package Plugin
|
||||||
|
* @subpackage SmartyWrapper
|
||||||
|
* @version $Rev$
|
||||||
|
* @since 2.0.2
|
||||||
|
* @author Ortwin Pinke <o.pinke@conlite.org>
|
||||||
|
* @copyright (c) 2018, conlite.org
|
||||||
|
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
|
||||||
|
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
||||||
|
* @link http://www.conlite.org ConLite.org
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
/**
|
||||||
* @package Plugin
|
* @package Plugin
|
||||||
* @subpackage SmartyWrapper
|
* @subpackage SmartyWrapper
|
||||||
* @author Andreas Dieter
|
* @author Andreas Dieter
|
||||||
* @copyright four for business AG <www.4fb.de>
|
* @copyright four for business AG <www.4fb.de>
|
||||||
* @license http://www.contenido.org/license/LIZENZ.txt
|
|
||||||
* @link http://www.4fb.de
|
|
||||||
* @link http://www.contenido.org
|
|
||||||
*/
|
*/
|
||||||
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
|
@ -25,8 +35,8 @@ class cSmartyBackend extends cSmartyFrontend {
|
||||||
|
|
||||||
parent::$aDefaultPaths = array(
|
parent::$aDefaultPaths = array(
|
||||||
'template_dir' => $aCfg['path']['contenido'] . 'plugins/smarty_templates/',
|
'template_dir' => $aCfg['path']['contenido'] . 'plugins/smarty_templates/',
|
||||||
'cache_dir' => $aCfg['path']['contenido_cache'],
|
'cache_dir' => $aCfg['path']['conlite_cache'],
|
||||||
'compile_dir' => $aCfg['path']['contenido_cache'] . 'templates_c/'
|
'compile_dir' => $aCfg['path']['conlite_cache'] . 'templates_c/'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::$bSmartyInstanciated = true;
|
parent::$bSmartyInstanciated = true;
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* This file contains the frontend class for smarty wrapper plugin.
|
||||||
|
*
|
||||||
|
* @package Plugin
|
||||||
|
* @subpackage SmartyWrapper
|
||||||
|
* @version $Rev$
|
||||||
|
* @since 2.0.2
|
||||||
|
* @author Ortwin Pinke <o.pinke@conlite.org>
|
||||||
|
* @copyright (c) 2018, conlite.org
|
||||||
|
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
|
||||||
|
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
||||||
|
* @link http://www.conlite.org ConLite.org
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* This file contains the frontend class for smarty wrapper plugin.
|
* This file contains the frontend class for smarty wrapper plugin.
|
||||||
*
|
*
|
||||||
|
@ -6,9 +21,6 @@
|
||||||
* @subpackage SmartyWrapper
|
* @subpackage SmartyWrapper
|
||||||
* @author Andreas Dieter
|
* @author Andreas Dieter
|
||||||
* @copyright four for business AG <www.4fb.de>
|
* @copyright four for business AG <www.4fb.de>
|
||||||
* @license http://www.contenido.org/license/LIZENZ.txt
|
|
||||||
* @link http://www.4fb.de
|
|
||||||
* @link http://www.contenido.org
|
|
||||||
*/
|
*/
|
||||||
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
|
@ -67,7 +79,7 @@ class cSmartyFrontend {
|
||||||
|
|
||||||
self::$oSmarty = new cSmartyWrapper();
|
self::$oSmarty = new cSmartyWrapper();
|
||||||
self::$aDefaultPaths = array(
|
self::$aDefaultPaths = array(
|
||||||
'template_dir' => $aClientCfg['tpl']['path'],
|
'template_dir' => $aClientCfg['template']['path'],
|
||||||
'cache_dir' => $aClientCfg['cache']['path'] . 'templates_c',
|
'cache_dir' => $aClientCfg['cache']['path'] . 'templates_c',
|
||||||
'compile_dir' => $aClientCfg['cache']['path'] . 'templates_c'
|
'compile_dir' => $aClientCfg['cache']['path'] . 'templates_c'
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,21 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This file contains the wrapper class for smarty wrapper plugin.
|
* This file contains the wrapper class for smarty wrapper plugin.
|
||||||
*
|
*
|
||||||
|
* @package Plugin
|
||||||
|
* @subpackage SmartyWrapper
|
||||||
|
* @version $Rev$
|
||||||
|
* @since 2.0.2
|
||||||
|
* @author Ortwin Pinke <o.pinke@conlite.org>
|
||||||
|
* @copyright (c) 2018, conlite.org
|
||||||
|
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
|
||||||
|
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
||||||
|
* @link http://www.conlite.org ConLite.org
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
* @package Plugin
|
* @package Plugin
|
||||||
* @subpackage SmartyWrapper
|
* @subpackage SmartyWrapper
|
||||||
* @author Andreas Dieter
|
* @author Andreas Dieter
|
||||||
* @copyright four for business AG <www.4fb.de>
|
* @copyright four for business AG <www.4fb.de>
|
||||||
* @license http://www.contenido.org/license/LIZENZ.txt
|
|
||||||
* @link http://www.4fb.de
|
|
||||||
* @link http://www.contenido.org
|
|
||||||
*/
|
*/
|
||||||
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
class cSmartyWrapper extends Smarty {
|
class cSmartyWrapper extends Smarty {
|
||||||
|
|
||||||
public function fetch($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL, $display = false, $merge_tpl_vars = true, $no_output_filter = false) {
|
public function fetch($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL, $display = false, $merge_tpl_vars = true, $no_output_filter = false) {
|
||||||
|
/* @todo implement functionality for CL 2.0
|
||||||
if ($this->templateExists($template) === false) {
|
if ($this->templateExists($template) === false) {
|
||||||
$moduleId = (int) cRegistry::getCurrentModuleId();
|
$moduleId = (int) cRegistry::getCurrentModuleId();
|
||||||
if ($moduleId > 0) {
|
if ($moduleId > 0) {
|
||||||
|
@ -23,7 +34,7 @@ class cSmartyWrapper extends Smarty {
|
||||||
$template = $module->getTemplatePath($template);
|
$template = $module->getTemplatePath($template);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
|
return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +59,7 @@ class cSmartyWrapper extends Smarty {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) {
|
public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) {
|
||||||
|
/* @todo implement functionality for CL 2.0
|
||||||
if ($this->templateExists($template_name) === false) {
|
if ($this->templateExists($template_name) === false) {
|
||||||
$moduleId = (int) cRegistry::getCurrentModuleId();
|
$moduleId = (int) cRegistry::getCurrentModuleId();
|
||||||
if ($moduleId > 0) {
|
if ($moduleId > 0) {
|
||||||
|
@ -55,7 +67,7 @@ class cSmartyWrapper extends Smarty {
|
||||||
$template_name = $module->getTemplatePath($template_name);
|
$template_name = $module->getTemplatePath($template_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return parent::clearCache($template_name, $cache_id, $compile_id, $exp_time, $type);
|
return parent::clearCache($template_name, $cache_id, $compile_id, $exp_time, $type);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* This file contains the autoloader stuff for this plugin
|
||||||
|
*
|
||||||
|
* @package Plugin
|
||||||
|
* @subpackage SmartyWrapper
|
||||||
|
* @version $Rev$
|
||||||
|
* @since 2.0.2
|
||||||
|
* @author Ortwin Pinke <o.pinke@conlite.org>
|
||||||
|
* @copyright (c) 2018, conlite.org
|
||||||
|
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
|
||||||
|
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
||||||
|
* @link http://www.conlite.org ConLite.org
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
$sAutoloadClassPath = strstr(dirname(dirname(__FILE__)), "conlite/plugins")."/classes/";
|
$sAutoloadClassPath = strstr(dirname(dirname(__FILE__)), "conlite/plugins")."/classes/";
|
||||||
return array(
|
return array(
|
||||||
'cSmartyBackend' => $sAutoloadClassPath.'class.smarty.backend.php',
|
'cSmartyBackend' => $sAutoloadClassPath.'class.smarty.backend.php',
|
||||||
|
|
|
@ -1,6 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is the config file for this plugin
|
||||||
|
*
|
||||||
|
* @package Plugin
|
||||||
|
* @subpackage SmartyWrapper
|
||||||
|
* @version $Rev$
|
||||||
|
* @since 2.0.2
|
||||||
|
* @author Ortwin Pinke <o.pinke@conlite.org>
|
||||||
|
* @copyright (c) 2018, conlite.org
|
||||||
|
* @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version)
|
||||||
|
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
||||||
|
* @link http://www.conlite.org ConLite.org
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
rereadClients();
|
rereadClients();
|
||||||
$client = (isset($client)) ? $client : $load_client;
|
$client = (isset($client)) ? $client : $load_client;
|
||||||
// Load smarty
|
// Load smarty
|
||||||
|
|
Laden…
In neuem Issue referenzieren