1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

New menu_icon field added.

This commit is contained in:
Cameron 2014-01-08 04:29:00 -08:00
parent 78397acfd1
commit 7f9326f1a1
7 changed files with 35 additions and 26 deletions

View File

@ -456,7 +456,8 @@ class page_admin_ui extends e_admin_ui
'menu_title' => array('title'=> "Menu Title", 'nolist'=>true, 'tab' => 2, 'type' => 'text', 'inline'=>true, 'width'=>'25%', "help"=>"Caption displayed on the menu item.", 'writeParms'=>'size=xxlarge'),
'menu_text' => array('title'=> "Menu Body", 'nolist'=>true, 'tab' => 2, 'type' => 'bbarea', 'data'=>'str', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'media=page' ),
'menu_template' => array('title'=> "Menu Template", 'nolist'=>true, 'tab' => 2, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''),
'menu_icon' => array('title' =>"Menu Icon/Glyph", 'nolist'=>true, 'tab' => 2, 'type' => 'icon', 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'media=page&glyphs=1', 'readonly'=>false),
'menu_image' => array('title' =>"Menu Image", 'nolist'=>true, 'tab' => 2, 'type' => 'image', 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'media=page', 'readonly'=>false),
@ -500,14 +501,15 @@ class page_admin_ui extends e_admin_ui
// 'page_author' => array('title'=> LAN_AUTHOR, 'tab' => 0, 'type' => 'user', 'data'=>'int','width' => 'auto', 'thclass' => 'left'),
'page_datestamp' => array('title'=> LAN_DATE, 'type' => 'datestamp', 'data'=>'int', 'width' => 'auto','writeParms'=>'auto=1&readonly=1'),
'menu_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '80px', 'thclass' => 'center', 'class' => "right", 'nosort' => false, 'readParms'=>'thumb=80&thumb_urlraw=0&thumb_aw=80', 'readonly'=>false),
'menu_title' => array('title'=> "Menu Title", 'forced'=> TRUE, 'type' => 'text', 'inline'=>true, 'width'=>'25%'),
'menu_text' => array('title'=> "Menu Body", 'type' => 'bbarea', 'data'=>'str', 'width' => 'auto', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'media=page'),
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'noselector' => true, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center','readParms'=>'deleteClass=252')
);
$this->fieldpref = array("page_id","menu_name", "menu_title", "menu_text", 'menu_image', 'menu_template');
$this->fieldpref = array("page_id","menu_name", "menu_title", "menu_text", 'menu_image', 'menu_template', 'menu_icon');
}

View File

@ -218,7 +218,12 @@ class cpage_shortcodes extends e_shortcode
}
return "<img class='img-responsive' src='".$img."' alt='' />";
}
}
function sc_cmenuicon($parm='')
{
return e107::getParser()->toIcon($this->page['menu_icon']);
}
function sc_cpageurl()

View File

@ -389,6 +389,7 @@ CREATE TABLE page (
menu_title varchar(250) NOT NULL default '',
menu_text mediumtext NOT NULL,
menu_image varchar(250) NOT NULL default '',
menu_icon varchar(250) NOT NULL default '',
menu_template varchar(50) NOT NULL default '',
PRIMARY KEY (page_id)

View File

@ -401,8 +401,8 @@ class e_menu
$sql->select("page", "*", $query);
$page = $sql->fetch();
$caption = $tp->toHTML($page['menu_title'], true, 'parse_sc, constants');
$caption = (vartrue($page['menu_icon'])) ? $tp->toIcon($page['menu_icon']) : '';
$caption .= $tp->toHTML($page['menu_title'], true, 'parse_sc, constants');
if(vartrue($page['menu_template'])) // New v2.x templates. see core/menu_template.php
{

View File

@ -49,6 +49,7 @@ e-tabs fieldset { padding:0px ; padding-left:3px; border-top:0px;}
td.center, th.center { text-align:center }
td.right, th.right { text-align:right }
.col-label { width:25%; }

View File

@ -21,7 +21,7 @@
$MENU_TEMPLATE['2-column_1:1_text-left']['start'] = '{SETIMAGE: w=700&h=450}';
$MENU_TEMPLATE['2-column_1:1_text-left']['body'] = '
<div class="col-lg-6 col-md-6 col-sm-6"><h2>{CMENUTITLE}</h2>{CMENUBODY}<br />{CPAGEBUTTON}</div>
<div class="col-lg-6 col-md-6 col-sm-6"><h2>{CMENUICON}{CMENUTITLE}</h2>{CMENUBODY}<br />{CPAGEBUTTON}</div>
<div class="col-lg-6 col-md-6 col-sm-6">{CMENUIMAGE}</div>
';
$MENU_TEMPLATE['2-column_1:1_text-left']['end'] = '';
@ -30,14 +30,14 @@
$MENU_TEMPLATE['2-column_1:1_text-right']['start'] = '{SETIMAGE: w=700&h=450}';
$MENU_TEMPLATE['2-column_1:1_text-right']['body'] = '
<div class="col-lg-6 col-md-6 col-sm-6">{CMENUIMAGE}</div>
<div class="col-lg-6 col-md-6 col-sm-6"><h2>{CMENUTITLE}</h2>{CMENUBODY}<br />{CPAGEBUTTON}</div>
<div class="col-lg-6 col-md-6 col-sm-6"><h2>{CMENUICON}{CMENUTITLE}</h2>{CMENUBODY}<br />{CPAGEBUTTON}</div>
';
$MENU_TEMPLATE['2-column_1:1_text-right']['end'] = '';
$MENU_TEMPLATE['2-column_2:1_text-left']['start'] = '';
$MENU_TEMPLATE['2-column_2:1_text-left']['body'] = '
<div class="col-lg-8 col-md-8"><h4>{CMENUTITLE}</h4>{CMENUBODY}</div>
<div class="col-lg-8 col-md-8"><h4>{CMENUICON}{CMENUTITLE}</h4>{CMENUBODY}</div>
<div class="col-lg-4 col-md-4">
<a class="btn btn-lg btn-primary pull-right" href="{CPAGEBUTTON=href}">'.LAN_READ_MORE.'</a>
</div>

View File

@ -13,33 +13,33 @@
.justify { text-align: justify }
.f-left { float: left }
.f-right { float: right }
.top { vertical-align: top }
.middle { vertical-align: middle }
.bottom { vertical-align: bottom }
.clear { clear: both }
.clear-l { clear: right }
.clear-r { clear: left }
.top { vertical-align: top }
.middle { vertical-align: middle }
.bottom { vertical-align: bottom }
.clear { clear: both }
.clear-l { clear: right }
.clear-r { clear: left }
i.icon-download { font-size:200%; }
.e-footer-info { margin-top:10px; padding:20px; text-align: center }
td.text-center { text-align:center; }
td.text-center { text-align:center; }
/* Core Icons */
.icon { border: 0 }
.icon.action { vertical-align: middle }
.S16 { width: 16px; height: 16px }
.S32 { width: 32px; height: 32px }
.S64 { width: 64px; height: 64px }
.S128 { width: 128px; height: 128px }
.icon { border: 0px; display: inline-block; margin-right: .3em;}
.icon.action { vertical-align: middle }
.S16 { width: 16px; height: 16px }
.S32 { width: 32px; height: 32px }
.S64 { width: 64px; height: 64px }
.S128 { width: 128px; height: 128px }
/* Decorate JS - see core/decorate.js */
.odd { }
.even { background-color: #F5F5F5 }
.first, .last { }
.e-list { /* core selector - can be used per theme (JS) to decorate list blocks */ }
.odd { }
.even { background-color: #F5F5F5 }
.first, .last { }
.e-list { /* core selector - can be used per theme (JS) to decorate list blocks */ }
/* e107 Tabs - see core/tabs.js */
ul.e-tabs { list-style-type: none; }