mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
fixes #1412 implemented a forum image/icon which is displayed in front
of the forum name. Displaysize of the image can be defined in the templates.
This commit is contained in:
@@ -328,6 +328,16 @@ class forum_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_parentimage($parms=null)
|
||||
{
|
||||
if (empty($this->var['forum_image'])) return '';
|
||||
if (!empty($parms) && !is_array($parms)) parse_str($parms, $parms);
|
||||
if (empty($parms)) $parms = array();
|
||||
$parms = array_merge(array('class'=>'img-fluid', 'h' => 50), $parms);
|
||||
$text = e107::getParser()->toImage($this->var['forum_image'], $parms);
|
||||
return $text.' ';
|
||||
}
|
||||
|
||||
function sc_parentname()
|
||||
{
|
||||
return $this->var['forum_name'];
|
||||
@@ -362,10 +372,20 @@ class forum_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_forumimage($parms=null)
|
||||
{
|
||||
if(empty($this->var['forum_image'])) return '';
|
||||
|
||||
if (!empty($parms) && !is_array($parms)) parse_str($parms, $parms);
|
||||
if (empty($parms)) $parms = array();
|
||||
$parms = array_merge(array('class'=>'img-fluid', 'h' => 50), $parms);
|
||||
$text = e107::getParser()->toImage($this->var['forum_image'], $parms);
|
||||
return "<a href='".e107::url('forum', 'forum', $this->var)."'>{$text}</a> ";
|
||||
|
||||
}
|
||||
|
||||
function sc_forumname()
|
||||
{
|
||||
// global $f;
|
||||
// $tp = e107::getParser();
|
||||
if(substr($this->var['forum_name'], 0, 1) == '*')
|
||||
{
|
||||
$this->var['forum_name'] = substr($this->var['forum_name'], 1);
|
||||
|
@@ -140,6 +140,16 @@
|
||||
return $this->var['forum_crumb'];
|
||||
}
|
||||
|
||||
function sc_forumimage($parms=null)
|
||||
{
|
||||
if(empty($this->var['forum_image'])) return '';
|
||||
if (!empty($parms) && !is_array($parms)) parse_str($parms, $parms);
|
||||
if (empty($parms)) $parms = array();
|
||||
$parms = array_merge(array('class'=>'img-fluid', 'h' => 50), $parms);
|
||||
$text = e107::getParser()->toImage($this->var['forum_image'], $parms);
|
||||
return $text." ";
|
||||
}
|
||||
|
||||
function sc_forumtitle()
|
||||
{
|
||||
return $this->var['forum_name'];
|
||||
@@ -485,6 +495,16 @@
|
||||
------*/
|
||||
|
||||
|
||||
function sc_sub_forumimage($parms=null)
|
||||
{
|
||||
if(empty($this->var['forum_image'])) return '';
|
||||
if (!empty($parms) && !is_array($parms)) parse_str($parms, $parms);
|
||||
if (empty($parms)) $parms = array();
|
||||
$parms = array_merge(array('class'=>'img-fluid', 'h' => 50), $parms);
|
||||
$text = e107::getParser()->toImage($this->var['forum_image'], $parms);
|
||||
return "<a href='".e107::url('forum', 'forum', $this->var)."'>{$text}</a> ";
|
||||
}
|
||||
|
||||
function sc_sub_forumtitle()
|
||||
{
|
||||
$forumName = e107::getParser()->toHTML($this->var['forum_name'], true);
|
||||
|
Reference in New Issue
Block a user