1
0
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:
Cameron
2013-03-06 23:01:16 -08:00
parent 3d26475d97
commit 8895d48dd1
11 changed files with 321 additions and 111 deletions

View File

@@ -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()
{

View File

@@ -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;
# --------------------------------------------------------

View File

@@ -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?