1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Fix for google-plus icon on Social plugin. {EXTENDED} may now have a class added. Debug info added when Featurebox returns nothing.

This commit is contained in:
Cameron
2014-01-29 11:10:05 -08:00
parent dc2c29fff7
commit a57faeb3b9
4 changed files with 16 additions and 6 deletions

View File

@@ -286,9 +286,11 @@ class news_shortcodes extends e_shortcode
}
}
function sc_extended($parm)
function sc_extended($parm='')
{
$class = vartrue($parm['class']) ? "class='".$parm['class']."'" : '';
if ($this->news_item['news_extended'] && ($this->param['current_action'] != 'extend' || $parm == 'force'))
{
$es = (defined('EXTENDEDSTRING')) ? EXTENDEDSTRING : LAN_MORE;
@@ -301,7 +303,7 @@ class news_shortcodes extends e_shortcode
}
else
{
return $es1."<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'>".$es."</a>".$es2;
return $es1."<a {$class} href='".e107::getUrl()->create('news/view/item', $this->news_item)."'>".$es."</a>".$es2;
}
}
return '';

View File

@@ -69,6 +69,8 @@ class e_parse extends e_parser
public $thumbWidth = 100;
public $thumbHeight = 0;
public $thumbCrop = 0;
// Set up the defaults
var $e_optDefault = array(

View File

@@ -35,6 +35,7 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
{
$type = vartrue(e107::getPlugPref('featurebox','menu_category'),'bootstrap_carousel');
$text = e107::getParser()->parseTemplate("{FEATUREBOX|".$type."}");
return $text;
}
@@ -71,11 +72,12 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
if(!$category->hasData())
{
return '';
}
$tmpl = $this->getFboxTemplate($ctemplate);
$type = vartrue($tmpl['js_type'],''); // Legacy support (prototype.js)
@@ -102,8 +104,12 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
// Fix - don't use tablerender if no result (category could contain hidden items)
$ret = $this->render($category, $ctemplate, $parm);
if(empty($ret)) return '';
if(empty($ret))
{
e107::getMessage()->addDebug('Featurebox returned nothing.')->addDebug('Category: '.print_a($category,true))->addDebug('Template: '.$ctemplate)->addDebug('Param: '.print_a($parm,true));
return '';
}
$ret = $tp->parseTemplate($tmpl['list_start'], true, $category).$ret.$tp->parseTemplate($tmpl['list_end'], true, $category);
if(isset($parm['notablestyle']))
{

View File

@@ -23,7 +23,7 @@ class social_shortcodes extends e_shortcode
'rss' => array('href'=> (e107::isInstalled('rss_menu') ? e_PLUGIN_ABS."rss_menu/rss.php?news.2" : ''), 'title'=>'Feed'),
'facebook' => array('href'=> deftrue('XURL_FACEBOOK'), 'title'=>'Facebook'),
'twitter' => array('href'=> deftrue('XURL_TWITTER'), 'title'=>'Twitter'),
'googleplus' => array('href'=> deftrue('XURL_GOOGLE'), 'title'=>'Google Plus'),
'google-plus' => array('href'=> deftrue('XURL_GOOGLE'), 'title'=>'Google Plus'),
'linkedin' => array('href'=> deftrue('XURL_LINKEDIN'), 'title'=>'LinkedIn'),
'pinterest' => array('href'=> deftrue('XURL_PINTEREST'), 'title'=>'Pinterest'),
'instagram' => array('href'=> deftrue('XURL_INSTAGRAM'), 'title'=>'Instagram'),