mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 03:54:09 +02:00
Reworked storage of custom menus.
This commit is contained in:
@@ -167,6 +167,39 @@ class cpage_shortcodes extends e_shortcode
|
||||
}
|
||||
return '<a class="cpage" href="'.$url.'">'.$this->sc_cpagetitle().'</a>';
|
||||
}
|
||||
|
||||
function sc_cpagebutton($parm)
|
||||
{
|
||||
$url = $this->sc_cpageurl();
|
||||
|
||||
if($parm == 'href' || !$url)
|
||||
{
|
||||
return $url;
|
||||
}
|
||||
return '<a class="cpage btn btn-small" href="'.$url.'">Read More..</a>';
|
||||
}
|
||||
|
||||
|
||||
function sc_cmenutitle($parm='')
|
||||
{
|
||||
return e107::getParser()->toHTML($this->getParserVars()->menu_title, true, 'TITLE');
|
||||
}
|
||||
|
||||
|
||||
function sc_cmenubody($parm='')
|
||||
{
|
||||
// print_a($this);
|
||||
return e107::getParser()->toHTML($this->page['menu_text'], true, 'BODY');
|
||||
}
|
||||
|
||||
|
||||
function sc_cmenuimage($parm='')
|
||||
{
|
||||
// print_a($this);
|
||||
$img = e107::getParser()->thumbUrl($this->page['menu_image']);
|
||||
return "<img src='".$img."' alt='' />";
|
||||
}
|
||||
|
||||
|
||||
function sc_cpageurl()
|
||||
{
|
||||
|
@@ -386,6 +386,12 @@ CREATE TABLE page (
|
||||
page_theme varchar(50) NOT NULL default '',
|
||||
page_template varchar(50) NOT NULL default '',
|
||||
page_order int(4) unsigned NOT NULL default '9999',
|
||||
|
||||
menu_title varchar(50) NOT NULL default '',
|
||||
menu_text mediumtext NOT NULL,
|
||||
menu_image varchar(250) NOT NULL default '',
|
||||
menu_template varchar(50) NOT NULL default '',
|
||||
|
||||
PRIMARY KEY (page_id)
|
||||
) ENGINE=MyISAM;
|
||||
# --------------------------------------------------------
|
||||
|
@@ -95,14 +95,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
$PAGE_TEMPLATE['custom']['tableRender'] = '';
|
||||
|
||||
|
||||
#### Panel Template - Used by e107_plugins/page/page_menu.php
|
||||
$PAGE_TEMPLATE['panel']['start'] = '';
|
||||
$PAGE_TEMPLATE['panel']['body'] = '{CPAGEBODY}';
|
||||
$PAGE_TEMPLATE['panel']['authorize'] = '';
|
||||
$PAGE_TEMPLATE['panel']['restricted'] = '';
|
||||
$PAGE_TEMPLATE['panel']['end'] = '';
|
||||
$PAGE_TEMPLATE['panel']['noTableRender'] = false;
|
||||
// $PAGE_TEMPLATE['panel']['tableRender'] = ''; // needed?
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user