diff --git a/e107_plugins/forum/forum_admin.php b/e107_plugins/forum/forum_admin.php index a803bda68..26694e513 100644 --- a/e107_plugins/forum/forum_admin.php +++ b/e107_plugins/forum/forum_admin.php @@ -140,7 +140,8 @@ if(!deftrue('OLD_FORUMADMIN')) 'forum_name' => array ( 'title' => LAN_TITLE, 'type' => 'method', 'inline'=>true, 'data' => 'str', 'width' => '40%', 'help' => FORLAN_223, 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'forum_sef' => array ( 'title' => LAN_SEFURL, 'type' => 'text', 'batch'=>true, 'inline'=>true, 'noedit'=>false, 'data' => 'str', 'width' => 'auto', 'help' => 'Leave blank to auto-generate it from the title above.', 'readParms' => '', 'writeParms' => 'sef=forum_name&size=xxlarge', 'class' => 'left', 'thclass' => 'left', ), 'forum_description' => array ( 'title' => LAN_DESCRIPTION, 'type' => 'textarea', 'data' => 'str', 'width' => '30%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'forum_image' => array ( 'title' => LAN_ICON, 'type' => 'image', 'batch'=>false, 'inline'=>false, 'noedit'=>false, 'data' => 'str', 'width' => 'auto', 'help' => 'Will be displayed next to the forum name', 'readParms' => '', 'writeParms' => 'media=forum&max=1', 'class' => 'center', 'thclass' => 'center', ), + 'forum_image' => array ( 'title' => LAN_IMAGE, 'type' => 'image', 'batch'=>false, 'inline'=>false, 'noedit'=>false, 'data' => 'str', 'width' => 'auto', 'help' => 'Image that will be displayed using {FORUMIMAGE}', 'readParms' => '', 'writeParms' => 'media=forum&max=1', 'class' => 'center', 'thclass' => 'center', ), + 'forum_icon' => array('title' => LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => 'auto', 'help' => 'Icon that will be displayed using {FORUMICON}', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'center',), 'forum_parent' => array ( 'title' => FORLAN_75, 'type' => 'dropdown', 'data' => 'int', 'width' => '10%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'forum_sub' => array ( 'title' => LAN_FORUM_1002, 'type' => 'dropdown', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => array(), 'writeParms' => array(), 'class' => 'center', 'thclass' => 'center', ), 'forum_moderators' => array ( 'title' => LAN_FORUM_2003, 'type' => 'userclass', 'inline'=>true, 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => 'classlist=admin,main,classes', 'writeParms' => "classlist=admin,main,mods,classes", 'class' => 'left', 'thclass' => 'left', ), diff --git a/e107_plugins/forum/forum_sql.php b/e107_plugins/forum/forum_sql.php index 4d5ae263e..b307b2b02 100644 --- a/e107_plugins/forum/forum_sql.php +++ b/e107_plugins/forum/forum_sql.php @@ -3,6 +3,7 @@ CREATE TABLE forum ( `forum_name` varchar(250) NOT NULL default '', `forum_description` text, `forum_image` varchar(250) DEFAULT NULL, + `forum_icon` varchar(250) DEFAULT NULL, `forum_parent` int(10) unsigned NOT NULL default '0', `forum_sub` int(10) unsigned NOT NULL default '0', `forum_datestamp` int(10) unsigned NOT NULL default '0', diff --git a/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php index 532282901..c347a6020 100644 --- a/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php @@ -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) == '*') diff --git a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php index dd5c274cb..03a36cc88 100644 --- a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php @@ -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'];