diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 38f6b57ca..200623842 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -582,6 +582,8 @@ class page_admin_ui extends e_admin_ui 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'3%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'page_id' => array('title'=> LAN_ID, 'type' => 'text', 'tab' => 0, 'width'=>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=blank'), 'page_title' => array('title'=> CUSLAN_2, 'tab' => 0, 'type' => 'text', 'data'=>'str', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), + 'page_subtitle' => array('title'=> CUSLAN_80, 'tab' => 0, 'type' => 'text', 'data'=>'str', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'), + 'page_chapter' => array('title'=> CUSLAN_63, 'tab' => 0, 'type' => 'dropdown', 'width' => '20%', 'filter' => true, 'batch'=>true, 'inline'=>true), 'page_template' => array('title'=> LAN_TEMPLATE, 'tab' => 0, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>array()), diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php index 5576651b9..1899aec46 100644 --- a/e107_core/shortcodes/batch/page_shortcodes.php +++ b/e107_core/shortcodes/batch/page_shortcodes.php @@ -98,7 +98,7 @@ class cpage_shortcodes extends e_shortcode function sc_cpagesubtitle() { - $subtitle = varset($this->var['sub_title']); + $subtitle = varset($this->var['page_subtitle']); return $subtitle ? e107::getParser()->toHTML($subtitle, true, 'TITLE') : ''; } diff --git a/e107_core/sql/core_sql.php b/e107_core/sql/core_sql.php index a453d7436..eb60437fb 100755 --- a/e107_core/sql/core_sql.php +++ b/e107_core/sql/core_sql.php @@ -378,6 +378,7 @@ CREATE TABLE online ( CREATE TABLE page ( page_id int(10) unsigned NOT NULL auto_increment, page_title varchar(250) NOT NULL default '', + page_subtitle varchar(250) NOT NULL default '', page_sef varchar (250) NOT NULL default '', page_chapter int(10) unsigned NOT NULL default '0', page_metakeys varchar (250) NOT NULL default '', diff --git a/e107_core/templates/page_template.php b/e107_core/templates/page_template.php index 25cf5b1e2..0facd993e 100644 --- a/e107_core/templates/page_template.php +++ b/e107_core/templates/page_template.php @@ -7,60 +7,56 @@ * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * */ - -if (!defined('e107_INIT')) { exit; } + +if(!defined('e107_INIT')) +{ + exit; +} + $PAGE_WRAPPER = array(); -global $sc_style; +$PAGE_WRAPPER['default']['CPAGESUBTITLE'] = '

{---}

'; +$PAGE_WRAPPER['default']['CPAGEMESSAGE'] = '{---}
'; +$PAGE_WRAPPER['default']['CPAGEAUTHOR'] = "{---}, "; +$PAGE_WRAPPER['default']['CPAGENAV'] = '
{---}
'; -$sc_style['CPAGEAUTHOR|default']['pre'] = ''; -$sc_style['CPAGEAUTHOR|default']['post'] = ", "; - -$sc_style['CPAGESUBTITLE|default']['pre'] = '

'; -$sc_style['CPAGESUBTITLE|default']['post'] = '

'; - -$sc_style['CPAGEMESSAGE|default']['pre'] = ''; -$sc_style['CPAGEMESSAGE|default']['post'] = '
'; - -$sc_style['CPAGENAV|default']['pre'] = '
'; -$sc_style['CPAGENAV|default']['post'] = '
'; #### default template - BC #### - // used only for parsing comment outside of the page tablerender-ed content - // leave empty if you integrate page comments inside the main page template - - - $PAGE_TEMPLATE['default']['page'] = ' +// used only for parsing comment outside of the page tablerender-ed content +// leave empty if you integrate page comments inside the main page template + + +$PAGE_TEMPLATE['default']['page'] = ' {PAGE} {PAGECOMMENTS} - '; - - // always used - it's inside the {PAGE} sc from 'page' template - $PAGE_TEMPLATE['default']['start'] = '
{CHAPTER_BREADCRUMB}'; - - // page body - $PAGE_TEMPLATE['default']['body'] = ' - {CPAGEMESSAGE|default} + '; + +// always used - it's inside the {PAGE} sc from 'page' template +$PAGE_TEMPLATE['default']['start'] = '
{CHAPTER_BREADCRUMB}'; + +// page body +$PAGE_TEMPLATE['default']['body'] = ' + {CPAGEMESSAGE} - {CPAGESUBTITLE|default} + {CPAGESUBTITLE}
- {CPAGENAV|default} - {CPAGEBODY|default} + {CPAGENAV} + {CPAGEBODY}
- {CPAGERATING|default} + {CPAGERATING} {CPAGEEDIT} '; - // {CPAGEFIELD: name=image} +// {CPAGEFIELD: name=image} - $PAGE_WRAPPER['default']['CPAGEEDIT'] = "
{---}
"; +$PAGE_WRAPPER['default']['CPAGEEDIT'] = "
{---}
"; - // used only when password authorization is required - $PAGE_TEMPLATE['default']['authorize'] = ' +// used only when password authorization is required +$PAGE_TEMPLATE['default']['authorize'] = '
{message} {form_open} @@ -78,53 +74,52 @@ $sc_style['CPAGENAV|default']['post'] = '
'; {form_close}
'; - - // used when access is denied (restriction by class) - $PAGE_TEMPLATE['default']['restricted'] = ' + +// used when access is denied (restriction by class) +$PAGE_TEMPLATE['default']['restricted'] = ' {text} '; - - // used when page is not found - $PAGE_TEMPLATE['default']['notfound'] = ' + +// used when page is not found +$PAGE_TEMPLATE['default']['notfound'] = ' {text} '; - - // always used - $PAGE_TEMPLATE['default']['end'] = '{CPAGERELATED: types=page,news}
'; - - // options per template - disable table render + +// always used +$PAGE_TEMPLATE['default']['end'] = '{CPAGERELATED: types=page,news}'; + +// options per template - disable table render // $PAGE_TEMPLATE['default']['noTableRender'] = false; //XXX Deprecated - - // define different tablerender mode here - $PAGE_TEMPLATE['default']['tableRender'] = 'cpage'; + +// define different tablerender mode here +$PAGE_TEMPLATE['default']['tableRender'] = 'cpage'; +$PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}

{LAN=LAN_RELATED}

'; +$PAGE_TEMPLATE['default']['related']['item'] = '
{RELATED_IMAGE}

{RELATED_TITLE}

'; +$PAGE_TEMPLATE['default']['related']['end'] = '
'; - $PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}

{LAN=LAN_RELATED}

'; - $PAGE_TEMPLATE['default']['related']['item'] = '
{RELATED_IMAGE}

{RELATED_TITLE}

'; - $PAGE_TEMPLATE['default']['related']['end'] = '
'; +// $PAGE_TEMPLATE['default']['editor'] = ''; - // $PAGE_TEMPLATE['default']['editor'] = ''; - #### No table render example template #### - $PAGE_TEMPLATE['custom']['start'] = '
'; - $PAGE_TEMPLATE['custom']['body'] = ''; - $PAGE_TEMPLATE['custom']['authorize'] = ' +$PAGE_TEMPLATE['custom']['start'] = '
'; +$PAGE_TEMPLATE['custom']['body'] = ''; +$PAGE_TEMPLATE['custom']['authorize'] = ' '; - - $PAGE_TEMPLATE['custom']['restricted'] = ' + +$PAGE_TEMPLATE['custom']['restricted'] = ' '; - - $PAGE_TEMPLATE['custom']['end'] = '
'; - $PAGE_TEMPLATE['custom']['tableRender'] = ''; - - - $PAGE_WRAPPER['profile']['CMENUIMAGE: template=profile'] = '{---}'; - $PAGE_TEMPLATE['profile'] = $PAGE_TEMPLATE['default']; - $PAGE_TEMPLATE['profile']['body'] = ' + +$PAGE_TEMPLATE['custom']['end'] = '
'; +$PAGE_TEMPLATE['custom']['tableRender'] = ''; + + +$PAGE_WRAPPER['profile']['CMENUIMAGE: template=profile'] = '{---}'; +$PAGE_TEMPLATE['profile'] = $PAGE_TEMPLATE['default']; +$PAGE_TEMPLATE['profile']['body'] = ' {CPAGEMESSAGE} {CPAGESUBTITLE}
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 6280745d7..80ab4ffb2 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -4542,7 +4542,7 @@ var_dump($select_options);*/ $tmp = $obj->compile($tags,$parm); - if(count($tmp)) + if(is_array($tmp) && count($tmp)) { foreach($tmp as $val) { diff --git a/e107_languages/English/admin/lan_cpage.php b/e107_languages/English/admin/lan_cpage.php index 6532cb84f..6db12e58a 100644 --- a/e107_languages/English/admin/lan_cpage.php +++ b/e107_languages/English/admin/lan_cpage.php @@ -50,6 +50,7 @@ define("CUSLAN_76", "Menu with path #"); define("CUSLAN_77", "deleted"); define("CUSLAN_78", "Couldn't delete menu with path "); define("CUSLAN_79", "You must enter either a page title or a menu name."); +define("CUSLAN_80", "Sub Title"); // define("CUSLAN_54", "Meta Keywords"); //LAN_KEYWORDS