Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 3 Months ago custom forum icons for mybb 1.8
#1
Solved: 4 Years, 3 Months ago
i tried with mybb 1.6 and it worked but for mybb 1.8 custom forum icons not working.
i am using duendo theme and this plugin
http://community.mybb.com/mods.php?action=view&pid=457
but its not working is there Any way to add different forum icons for different forums? ?
one more question is it possible to add 2 prefix for 1 thread? like i am making coding forum and need to use multiple prefixs is there Any plugins that can do this?
thanks in advance.
Reply
#2
Solved: 4 Years, 3 Months ago
This plugin tries to change template forumbit_depth2_forum. When this template is changed by the Duende theme (which is most likely), then the plugin is not installed correctly.
When you post the contents of your forumbit_depth2_forum template I can indicate how the plugin must be modified.

I do not know the possibility of multiple thread icons (in 2014 there was a plugin request, but nobody reacted). There is a thread tagging plugin, though. Have a look to see whether this fulfills your requirements.
Regards, Ad Bakker (NL)
Reply
#3
Solved: 4 Years, 3 Months ago
(07-11-2015, 06:20 PM)Ad Bakker Wrote: This plugin tries to change template forumbit_depth2_forum. When this template is changed by the Duende theme (which is most likely), then the plugin is not installed correctly.
When you post the contents of your forumbit_depth2_forum template I can indicate how the plugin must be modified.

I do not know the possibility of multiple thread icons (in 2014 there was a plugin request, but nobody reacted). There is a thread tagging plugin, though. Have a look to see whether this fulfills your requirements.

Thanks for reply. 
<tr>
<td class="{$bgcolor}" align="center" valign="middle" width="1"><div class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"><i class="fa fa-folder-o"></i></div></td>
  
<td class="{$bgcolor}" valign="middle">
  <strong><a href="{$forum_url}"><span class="threadtext">{$forum['name']}</span></a></strong><br />{$forum_viewers_text} {$forum['description']} {$subforums}</td>
  
<td class="{$bgcolor}" valign="middle" align="right" style="white-space: nowrap">
<strong><i>{$posts}{$unapproved['unapproved_posts']}</i></strong>   Replies<br /> 
<strong><i>{$threads}{$unapproved['unapproved_threads']}</i></strong>  Topics 
</td>
  
<td class="{$bgcolor}" valign="middle" align="left" width="22%" style="white-space: nowrap">{$lastpost}</td>
</tr>
here is my forumbit_depth2_forum template code.
Reply
#4
Solved: 4 Years, 3 Months ago
Can you try to replace lines 55-65 of myforumicons.php by:


	function myforumicons_activate()
	{
		require_once MYBB_ROOT."inc/adminfunctions_templates.php";
        $old = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i></div>";
        $new = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i>{\$forum['myforumicon_override']}</div>{\$forum['myforumicon']}"
		find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote($old)."#i", "$new");
	}
	function myforumicons_deactivate()
	{
		require_once MYBB_ROOT."inc/adminfunctions_templates.php";
        $new = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i></div>";
        $old = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i>{\$forum['myforumicon_override']}</div>{\$forum['myforumicon']}"
		find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote($old)."#i", "$new");
	}

This may still require some changes, but is should come close.

First uninstall the plugin, then make the change and then install it again.
Regards, Ad Bakker (NL)
Reply
#5
Solved: 4 Years, 3 Months ago
(07-12-2015, 09:57 AM)Ad Bakker Wrote: Can you try to replace lines 55-65 of myforumicons.php by:


	function myforumicons_activate()
	{
		require_once MYBB_ROOT."inc/adminfunctions_templates.php";
        $old = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i></div>";
        $new = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i>{\$forum['myforumicon_override']}</div>{\$forum['myforumicon']}"
		find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote($old)."#i", "$new");
	}
	function myforumicons_deactivate()
	{
		require_once MYBB_ROOT."inc/adminfunctions_templates.php";
        $new = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i></div>";
        $old = "id=\"mark_read_{\$forum['fid']}\"><i class=\"fa fa-folder-o\"></i>{\$forum['myforumicon_override']}</div>{\$forum['myforumicon']}"
		find_replace_templatesets("forumbit_depth2_forum", "#".preg_quote($old)."#i", "$new");
	}

This may still require some changes, but is should come close.

First uninstall the plugin, then make the change and then install it again.

thank you so much. i have managed to make forum icons work added forum icons template manually in forumbit_depth2_forum.
Reply
#6
Solved: 4 Years, 3 Months ago
HEy wanna ask how to change the positioning..
my old buttons have in a css file: top: 20px; but when i put a custom Icon from your addon it dont have a top: -20px; how can i fix it?

fixed changes rowspawn to 1 in my template and remove top: -20px from my css for the normal icons now its all good looking
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)