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

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?
Reply
#52
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');
Reply
#53
Yeah, now is it perfect.

THX EviLito Big Grin
Reply
#54
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.
Reply
#55
Thank you for this plugin, works like a charm on 1.6.10
Reply
#56
I solved, thanks..
Reply
#57
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

Reply
#58
Does anyone else get a redirect loop on MyBB v1.6.12?
Reply
#59
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)
Reply
#60
(04-30-2013, 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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)