From 1b2db4683e7bcfcc55d66a7c728c9da0f60760ed Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 10 Mar 2016 15:13:32 -0800 Subject: [PATCH] FontAwesome version update. News shortcode wrapper issue corrected. --- e107_handlers/news_class.php | 6 +++++- e107_plugins/news/other_news2_menu.php | 1 + e107_plugins/news/other_news_menu.php | 1 + e107_plugins/tinymce4/wysiwyg.php | 2 +- e107_themes/bootstrap3/admin_theme.php | 2 +- news.php | 3 +++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index f770f722f..2d0b3c750 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -373,11 +373,15 @@ class news { // Retrieve batch sc object, set required vars + + $wrapperKey = (!empty($param['template_key'])) ? 'news/'.$param['template_key'].'/item' : 'news/view/item'; + $sc = e107::getScBatch('news') - ->wrapper('news/view/item') + ->wrapper($wrapperKey) ->setScVar('news_item', $news) ->setScVar('param', $param); + $text = e107::getParser()->parseTemplate($NEWS_PARSE, true, $sc); if ($mode == 'return') diff --git a/e107_plugins/news/other_news2_menu.php b/e107_plugins/news/other_news2_menu.php index 485c60ecc..44baf4852 100644 --- a/e107_plugins/news/other_news2_menu.php +++ b/e107_plugins/news/other_news2_menu.php @@ -116,6 +116,7 @@ $param['itemlink'] = defset('OTHERNEWS2_ITEMLINK',''); $param['thumbnail'] = OTHERNEWS2_THUMB; $param['catlink'] = defset('OTHERNEWS2_CATLINK',''); $param['caticon'] = OTHERNEWS2_CATICON; +$param['template_key'] = 'news_menu/other2/item'; $style = defset('OTHERNEWS2_CELL','padding:0px;vertical-align:top'); $nbr_cols = defset('OTHERNEWS2_COLS', 1); diff --git a/e107_plugins/news/other_news_menu.php b/e107_plugins/news/other_news_menu.php index 6df15f279..fc02371f5 100644 --- a/e107_plugins/news/other_news_menu.php +++ b/e107_plugins/news/other_news_menu.php @@ -129,6 +129,7 @@ $param['itemlink'] = defset('OTHERNEWS_ITEMLINK'); $param['thumbnail'] = defset('OTHERNEWS_THUMB'); $param['catlink'] = defset('OTHERNEWS_CATLINK'); $param['caticon'] = defset('OTHERNEWS_CATICON'); +$param['template_key'] = 'news_menu/other/item'; $style = defset('OTHERNEWS_CELL'); $nbr_cols = defset('OTHERNEWS_COLS'); diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index f16c2c7be..1ed64bba9 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -617,7 +617,7 @@ class wysiwyg $editorCSS = array( 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css', - 'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', + 'http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', e_PLUGIN_ABS.'tinymce4/editor.css', ); diff --git a/e107_themes/bootstrap3/admin_theme.php b/e107_themes/bootstrap3/admin_theme.php index 8a336aa1f..0c87938e2 100644 --- a/e107_themes/bootstrap3/admin_theme.php +++ b/e107_themes/bootstrap3/admin_theme.php @@ -13,7 +13,7 @@ define('FONTAWESOME', 4); e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2); // e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css'); -e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.4.0/css/font-awesome.min.css'); +e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css'); // Too slow. diff --git a/news.php b/news.php index 0493a5fb6..5d6c5e88a 100644 --- a/news.php +++ b/news.php @@ -327,6 +327,7 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag'])) $param['catlink'] = (defined("NEWSLIST_CATLINK")) ? NEWSLIST_CATLINK : ""; $param['caticon'] = (defined("NEWSLIST_CATICON")) ? NEWSLIST_CATICON : defset('ICONSTYLE',''); $param['current_action'] = $action; + $param['template_key'] = 'list'; // NEW - allow news batch shortcode override (e.g. e107::getScBatch('news', 'myplugin', true); ) e107::getEvent()->trigger('news_list_parse', $newsList); @@ -502,6 +503,7 @@ if ($action == 'extend') $param = array(); $param['current_action'] = $action; + $param['template_key'] = 'view'; if(vartrue($NEWSSTYLE)) { @@ -852,6 +854,7 @@ else // #### normal newsitems, rendered via render_newsitem(), the $query is changed above (no other changes made) --------- $param = array(); $param['current_action'] = $action; + $param['template_key'] = 'default'; // Get Correct Template // XXX we use $NEWSLISTSTYLE above - correct as we are currently in list mode - XXX No this is not NEWSLISTSTYLE - which provides only summaries.