From 8b3b865815d761b11ba8146f5462ed08768bc0ec Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 29 Apr 2013 19:40:16 -0700 Subject: [PATCH] Notice removal --- e107_core/shortcodes/batch/news_shortcodes.php | 5 +++-- e107_plugins/chatbox_menu/chatbox_menu.php | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 20fc49598..16d8e6c5a 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -203,7 +203,7 @@ class news_shortcodes extends e_shortcode function sc_pdficon() { $pref = e107::getPref(); - if (!$pref['plug_installed']['pdf']) { return ''; } + if (!varset($pref['plug_installed']['pdf'])) { return ''; } return e107::getParser()->parseTemplate('{PDF='.LAN_NEWS_24.'^news.'.$this->news_item['news_id'].'}'); } @@ -325,10 +325,11 @@ class news_shortcodes extends e_shortcode { return ''; } + if($this->news_item['news_thumbnail'][0] == '{' ) // Always resize. Use {SETIMAGE: w=x&y=x&crop=0} PRIOR to calling shortcode to change. { - $src = $tp->thumbUrl($this->news_item['news_thumbnail'],"w={$w}&h={$h}"); + $src = $tp->thumbUrl($this->news_item['news_thumbnail']); } else { diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php index 697f75844..b520ac4ae 100644 --- a/e107_plugins/chatbox_menu/chatbox_menu.php +++ b/e107_plugins/chatbox_menu/chatbox_menu.php @@ -111,7 +111,7 @@ class chatbox_shortcodes extends e_shortcode function sc_cb_avatar($parm='') { - return e107::getParser()->parseTemplate("{USER_AVATAR=".$this->var['user_image']."}"); + return e107::getParser()->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'])."}"); } function sc_cb_bullet($parm = '') @@ -316,14 +316,14 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) // the good way in this case - it works with any object having sc_*, models too $sc = new chatbox_shortcodes(); - + if($sql->gen($qry)) { $cbpost = $sql->db_getList(); $text .= "
\n"; - + $text .= $tp->parseTemplate($CHATBOX_TEMPLATE['start'], false, $sc); - + foreach($cbpost as $cb) { $sc->setVars($cb); @@ -331,7 +331,7 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) } $text .= $tp->parseTemplate($CHATBOX_TEMPLATE['end'], false, $sc); - + $text .= "
"; } else