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

#3733 - Added new 'Forum icon' field

- Renamed forum image to  "Image" (LAN_IMAGE instead of LAN_ICON)
- Added new field forum_icon (LAN_ICON)
- Icon can be used / rendered using {FORUMICON} shortcode in template
- database update requires
- v1 to v2 update needs testing (will do shortly)
This commit is contained in:
Tijn Kuyper
2019-06-06 16:02:46 +02:00
parent 60b7f3ae6d
commit c24ade3b9c
4 changed files with 23 additions and 1 deletions

View File

@@ -391,6 +391,16 @@ class forum_shortcodes extends e_shortcode
}
/**
* @example: {FORUMICON: size=2x}
*/
function sc_forumicon($parms = null)
{
if(empty($this->var['forum_icon'])) return '';
return e107::getParser()->toIcon($this->var['forum_icon'], $parms);
}
function sc_forumname($parm = null)
{
if(substr($this->var['forum_name'], 0, 1) == '*')

View File

@@ -155,6 +155,16 @@
return $text." ";
}
/**
* @example: {FORUMICON: size=2x}
*/
function sc_forumicon($parms = null)
{
if(empty($this->var['forum_icon'])) return '';
return e107::getParser()->toIcon($this->var['forum_icon'], $parms);
}
function sc_forumtitle()
{
return $this->var['forum_name'];