MyBB Community Forums
Thank Plugin: use with several themes [MyBB 1.2.1] - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: Thank Plugin: use with several themes [MyBB 1.2.1] (/thread-14063.html)



Thank Plugin: use with several themes [MyBB 1.2.1] - Kefkes - 2006-11-25

I use the "Thank You" plug-in, but I have a problem in my forum. I use different themes on my forum. For example, /images/simpleblue contains a self-inserted theme. The default theme has stayed in /images in order not to ruin something. Toungue I have got new thank buttons especially for those other themes, but they aren't selected, by something in the scripts that seems to select /images/[chosen language]/postbit_thx.gif, nevertheless the theme you selected. Now off course, I want to see selected for example /images/simpleblue/[chosen language]/postbit_thx.gif when Simple Blue is the chosen theme. Big Grin

Included is the plug-in I'm talking about. Can someone help me, please? Wink
Greetz,
Kefkes
Answer, please!


RE: Thank Plugin: use with several themes [MyBB 1.2.1] - Martin M. - 2006-11-26

Inside inc/plugins/thx.php
find:
global $db, $mybb, $lang , $altbg,$templates;
Replace with:
global $db, $mybb, $lang , $altbg,$templates, $theme;
then find:
$post['thanks'] = "<a href=\"javascript:thx({$post['pid']})\"><img 
		src=\"images/{$lang->language}/postbit_thx.gif\" border=\"0\" alt=\"$lang->thx_main\" /></a>";
Replace with:
$post['thanks'] = "<a href=\"javascript:thx({$post['pid']})\"><img 
		src=\"{$theme['imgdir']}/{$lang->language}/postbit_thx.gif\" border=\"0\" alt=\"$lang->thx_main\" /></a>";

And please don't bump the thread.


RE: Thank Plugin: use with several themes [MyBB 1.2.1] - Kefkes - 2006-11-26

But what if your default theme (MyBB Default) has stayed in the folder ./images in contrary to the other themes that have a separate folder?


RE: Thank Plugin: use with several themes [MyBB 1.2.1] - Martin M. - 2006-11-26

I updated the code and will work with any theme.