From df84ef0ee203cedeeff5bb9ca6c6a9d4db77ebb2 Mon Sep 17 00:00:00 2001 From: Jimako Date: Sun, 27 Aug 2023 08:49:23 +0200 Subject: [PATCH] fix for news category template option --- .../news/shortcodes/batch/news_shortcodes.php | 7 ++++++- e107_plugins/news/templates/news_template.php | 12 ------------ .../news/templates/news_view_template.php | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/e107_plugins/news/shortcodes/batch/news_shortcodes.php b/e107_plugins/news/shortcodes/batch/news_shortcodes.php index 7797dbe52c..69fc44e3db 100644 --- a/e107_plugins/news/shortcodes/batch/news_shortcodes.php +++ b/e107_plugins/news/shortcodes/batch/news_shortcodes.php @@ -1202,7 +1202,12 @@ function sc_news_related($array=array()) $array['types'] = 'news,page'; } - $template = e107::getTemplate('news', 'news', 'related'); + $template = e107::getTemplate('news', 'news_view', 'related'); + + /* just callback for older themes */ + if(empty($template)) { + $template = e107::getTemplate('news', 'news', 'related'); + } return e107::getForm()->renderRelated($array, $this->news_item['news_meta_keywords'], array('news'=>$this->news_item['news_id']),$template); } diff --git a/e107_plugins/news/templates/news_template.php b/e107_plugins/news/templates/news_template.php index 42d9a56304..994b730a9a 100644 --- a/e107_plugins/news/templates/news_template.php +++ b/e107_plugins/news/templates/news_template.php @@ -164,15 +164,3 @@ $NEWS_TEMPLATE['2-column']['end'] = ''; -### Related 'start' - Options: Core 'single' shortcodes including {SETIMAGE} -### Related 'item' - Options: {RELATED_URL} {RELATED_IMAGE} {RELATED_TITLE} {RELATED_SUMMARY} -### Related 'end' - Options: Options: Core 'single' shortcodes including {SETIMAGE} -/* -$NEWS_TEMPLATE['related']['start'] = "

".defset('LAN_RELATED', 'Related')."

";*/ - -$NEWS_TEMPLATE['related']['caption'] = '{LAN=RELATED}'; -$NEWS_TEMPLATE['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}
'; -$NEWS_TEMPLATE['related']['item'] = ''; -$NEWS_TEMPLATE['related']['end'] = '
'; \ No newline at end of file diff --git a/e107_plugins/news/templates/news_view_template.php b/e107_plugins/news/templates/news_view_template.php index 3c32f32df0..83d757d2dd 100644 --- a/e107_plugins/news/templates/news_view_template.php +++ b/e107_plugins/news/templates/news_view_template.php @@ -77,7 +77,7 @@ - {NEWSRELATED} + {NEWS_RELATED}