Yeah nice, works for me. Thx Pro.
Edit:
As a registered user, it is perfect. As a guest do I get an mysql error.
-->
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Query:
SELECT name FROM mybb_themes WHERE tid =
<--
Any idea?
Oh right. This one will work. This time I tested it
$query = $db->simple_select('themes', 'name', $mybb->user['uid'] == 0 || $mybb->user['style'] == 0 ? 'def = 1' : 'tid = '.$mybb->user['style']);
$current_theme_name = $db->fetch_field($query, 'name');
Yeah, now is it perfect.
THX EviLito
I have a question.
You can still adjust it so that even a guest / unregistered the name of the respective themes gets read?
In this variant gets a guest only the default theme as word read.
THX YOU
Ok solved. I have found it.
Thank you for this plugin, works like a charm on 1.6.10
Thanks works on 1.6.11 too and i add some things basic to only registeder users can use it xD.
Does anyone else get a redirect loop on MyBB v1.6.12?
Need some help with this, added it onto my forums and it won't change themes at all.
No matter what theme i set to the default in my ACP... i then go to the theme changer at bottom of page and change it, does the next page where it loads, but still keeps the theme on no matter what.
I don't have a theme enforced either.
Anyone know how to fix this?
I'm using the latest version of mybb 1.6.12
EDIT:
I noticed, when i sign out i can change themes.
How do i fix this so i can use the theme changer when signed in?
It also kept forcing a theme on me, and didn't have drop down box on that one theme, even when i went into my ACP and changed the theme and then clicked enforce (still wouldn't change)
(2013-04-30, 03:08 AM)EviLito Wrote: [ -> ]Oh right. This one will work. This time I tested it
$query = $db->simple_select('themes', 'name', $mybb->user['uid'] == 0 || $mybb->user['style'] == 0 ? 'def = 1' : 'tid = '.$mybb->user['style']);
$current_theme_name = $db->fetch_field($query, 'name');
Works fine on MyBB 1.8, anyway where exactly to put this code mentioned above?