mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 20:31:41 +02:00
Added new e_related addon and updated default news and page templates to utilize.
This commit is contained in:
@@ -526,6 +526,18 @@ class news_shortcodes extends e_shortcode
|
||||
return "None";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_newsrelated($array=array())
|
||||
{
|
||||
if(!varset($array['types']))
|
||||
{
|
||||
$array['types'] = 'news,page';
|
||||
}
|
||||
|
||||
return e107::getForm()->renderRelated($array['types'], $this->news_item['news_meta_keywords'], array('news'=>$this->news_item['news_id']));
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@@ -372,7 +372,15 @@ class cpage_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
|
||||
|
||||
function sc_cpagerelated($array=array())
|
||||
{
|
||||
if(!varset($array['types']))
|
||||
{
|
||||
$array['types'] = 'page,news';
|
||||
}
|
||||
|
||||
return e107::getForm()->renderRelated($array['types'], $this->page['page_metakeys'], array('page'=>$this->page['page_id']));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -27,6 +27,8 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
#### 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'] = '
|
||||
{PAGE}
|
||||
{PAGECOMMENTS}
|
||||
@@ -39,7 +41,6 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
$PAGE_TEMPLATE['default']['body'] = '
|
||||
{CPAGEMESSAGE|default}
|
||||
|
||||
<div class="f-right">{CPAGEAUTHOR|default}{CPAGEDATE|default}</div>
|
||||
{CPAGESUBTITLE|default}
|
||||
<div class="clear"><!-- --></div>
|
||||
|
||||
@@ -72,7 +73,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
';
|
||||
|
||||
// always used
|
||||
$PAGE_TEMPLATE['default']['end'] = '</div>';
|
||||
$PAGE_TEMPLATE['default']['end'] = '{CPAGERELATED: types=page,news}</div>';
|
||||
|
||||
// options per template - disable table render
|
||||
// $PAGE_TEMPLATE['default']['noTableRender'] = false; //XXX Deprecated
|
||||
@@ -91,7 +92,6 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
|
||||
';
|
||||
|
||||
$PAGE_TEMPLATE['custom']['end'] = '</div>';
|
||||
// $PAGE_TEMPLATE['custom']['noTableRender'] = true; //XXX Deprecated
|
||||
$PAGE_TEMPLATE['custom']['tableRender'] = '';
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user