./ ge-webdesign.de 2024-01 // adapted for CMSimple 4 and 5 ge-webdesign.de 2012-2023 /** * Page-Parameters - main index.php * Plugin (V.2.1-compatible) * * Stores page-parameters (heading, template) * and let the user take control of visibility * of the page. * index.php is called by pluginloader and * manipulates the respective CMSimple-data. * * @author Martin Damken * @link http://www.zeichenkombinat.de * @version 1.0.05 * @package pluginloader * @subpackage page_params */ /** * Check if PLUGINLOADER is calling and die if not */ if(!defined('PLUGINLOADER_VERSION')){die('Plugin '. basename(dirname(__FILE__)) . ' requires a newer version of the Pluginloader. No direct access.');} /** * Add used interests to router */ $pd_router -> add_interest('heading'); $pd_router -> add_interest('show_heading'); $pd_router -> add_interest('sitetitle'); $pd_router -> add_interest('show_sitetitle'); $pd_router -> add_interest('template'); $pd_router -> add_interest('published'); $pd_router -> add_interest('show_last_edit'); $pd_router -> add_interest('linked_to_menu'); $pd_router -> add_interest('header_location'); $pd_router -> add_interest('use_header_location'); /** * Add a tab for admin-menu */ $pd_router -> add_tab($tx['page_params']['tab'], $pth['folder']['plugins'].'page_params/page_params_view.php'); /** * Set template, overwrite CMSimple. */ if(isset($pd_current['template']) && $pd_current['template'] !== $cf['site']['template'] && trim($pd_current['template']) !== '' && is_dir($pth['folder']['templates'].$pd_current['template']) ) { $cf['site']['template'] = $pd_current['template']; $pth['folder']['template'] = $pth['folder']['templates'].$cf['site']['template'].'/'; $pth['file']['template'] = $pth['folder']['template'].'template.htm'; $pth['file']['stylesheet'] = $pth['folder']['template'].'stylesheet.css'; $pth['folder']['menubuttons'] = $pth['folder']['template'].'menu/'; $pth['folder']['templateimages'] = $pth['folder']['template'].'images/'; } /** * Overwrite CMsimple by page-parameters * but only if not in edit-mode */ if(!$edit && $pd_current) { if($pd_current['show_heading'] == '1' || $cf['show']['page_headings'] != 'true') { if(trim($pd_current['heading']) == '' || $cf['show']['page_headings'] != 'true') { if($cf['use']['h1only_pagesplitting'] == 'true') { $c[$pd_s] = preg_replace('/(