Thread Rating:
  • 5 Vote(s) - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.6] Quick Theme OnChange
Yeah nice, works for me. Thx Pro. Big Grin


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

SELECT name FROM mybb_themes WHERE tid =


Any idea?
Oh right. This one will work. This time I tested it Smile

$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 Big Grin
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.


Ok solved. I have found it.
Thank you for this plugin, works like a charm on 1.6.10
I solved, thanks..
Thanks works on 1.6.11 too and i add some things basic to only registeder users can use it xD.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

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


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 Smile

$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?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system

Forum Jump:

Users browsing this thread: 1 Guest(s)