mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 20:31:41 +02:00
Bootstrap3 news and search-menu template fixes.
New thumb.php placeholder feature added. New {GLYPH} shortcode added. Usage: {GLYPH=time}
This commit is contained in:
@@ -352,13 +352,19 @@ class news_shortcodes extends e_shortcode
|
||||
function sc_newsimage($parm = '')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
||||
if(!$this->news_item['news_thumbnail'])
|
||||
{
|
||||
return '';
|
||||
if($parm == 'placeholder')
|
||||
{
|
||||
$src = $tp->thumbUrl(); // placeholder;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($this->news_item['news_thumbnail'][0] == '{' ) // Always resize. Use {SETIMAGE: w=x&y=x&crop=0} PRIOR to calling shortcode to change.
|
||||
elseif($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']);
|
||||
}
|
||||
@@ -369,6 +375,8 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
;
|
||||
|
||||
switch($parm)
|
||||
{
|
||||
case 'src':
|
||||
@@ -381,7 +389,7 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
case 'url':
|
||||
default:
|
||||
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='news_image news-image img-rounded' src='".$src."' alt='' style='".$this->param['thumbnail']."' /></a>";
|
||||
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='news_image news-image img-responsive img-rounded' src='".$src."' alt='' style='".$this->param['thumbnail']."' /></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -189,7 +189,7 @@ class cpage_shortcodes extends e_shortcode
|
||||
$size = vartrue($options['size'], "");
|
||||
$inc = ($size) ? " btn-".$size : "";
|
||||
|
||||
return '<a class="cpage btn btn-default'.$inc.'" href="'.$url.'">'.$text.'</a>';
|
||||
return '<a class="cpage btn btn-primary'.$inc.'" href="'.$url.'">'.$text.'</a>';
|
||||
}
|
||||
|
||||
|
||||
|
8
e107_core/shortcodes/single/glyph.php
Normal file
8
e107_core/shortcodes/single/glyph.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
|
||||
function glyph_shortcode($parm = '')
|
||||
{
|
||||
$file = "icon-".$parm.".glyph";
|
||||
return e107::getParser()->toGlyph($file,false);
|
||||
}
|
@@ -9,12 +9,12 @@
|
||||
$MENU_TEMPLATE['default']['end'] = '';
|
||||
|
||||
$MENU_TEMPLATE['button']['start'] = '<div class="cpage-menu">';
|
||||
$MENU_TEMPLATE['button']['body'] = '{CMENUBODY}{CPAGEBUTTON}';
|
||||
$MENU_TEMPLATE['button']['body'] = '{CMENUBODY}<br />{CPAGEBUTTON}';
|
||||
$MENU_TEMPLATE['button']['end'] = '</div>';
|
||||
|
||||
### Additional control over image thumbnailing is possible via SETIMAGE e.g. {SETIMAGE: w=200&h=150&crop=1}
|
||||
$MENU_TEMPLATE['buttom-image']['start'] = '<div class="cpage-menu">';
|
||||
$MENU_TEMPLATE['buttom-image']['body'] = '{CMENUIMAGE}{CPAGEBUTTON}';
|
||||
$MENU_TEMPLATE['buttom-image']['body'] = '{CMENUIMAGE}<br />{CPAGEBUTTON}';
|
||||
$MENU_TEMPLATE['buttom-image']['end'] = '</div>';
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user