Not Solved Thank Plugin: use with several themes [MyBB 1.2.1]
#1
Not Solved
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!


Attached Files
.zip   391 - Thank_you(2.4.2).zip (Size: 8.46 KB / Downloads: 120)
Reply
#2
Not Solved
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.
Reply
#3
Not Solved
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?
Reply
#4
Not Solved
I updated the code and will work with any theme.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)