vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Make quick style chooser update user settings (https://vborg.vbsupport.ru/showthread.php?t=133831)

Xoligy 12-11-2006 10:00 PM

Make quick style chooser update user settings
 
The Quick style chooser relies on sessions rather than updating the actual user's settings. This means when you want to see what skin a user is using, it's usually not correct. Since most users tend to change skins using just the Quick Style Chooser, this plug-in updates their settings to match it. It's specifically for use with my skin view plug-in, but also could be handy for other forums. Simply install it using the product manager.

Note: This will not update a user's settings until they re-visit your forums. It is also said to fix issues with psiStats giving inaccurate results.

Update: This now lets users easily reset their options back to the default style.

You're free to do what you like with this code, although credit is appreciated, it's not required.

Brought to you by eXaltic - vBulletin skins.

Allan 12-12-2006 04:56 PM

i need install this product before ?

https://vborg.vbsupport.ru/showthrea...hreadid=133805

Xoligy 12-12-2006 05:08 PM

It doesn't matter what order you install them in :)

Allan 12-12-2006 05:25 PM

I have installed the 2 mod and i little problem :p

In postbit template, i have added this:
Code:

Style: $post[stylename]
Looking:

Xoligy 12-12-2006 05:38 PM

As mentioned in the other thread, you should wrap <if condition="$post[stylename]"> </if> round it, so you'd have:

<if condition="$post[stylename]">Style: $post[stylename]</if>

AMG021 12-12-2006 06:37 PM

Works like a charm!!!!!

Allan 12-12-2006 06:48 PM

I'm stupid, excuse me, it work now :)

HPIA 12-12-2006 10:09 PM

I dont understand...I installed them both and added that <if condition="$post[stylename]">Style: $post[stylename]</if> in the postbit template. What did I do wrong?

AMG021 12-13-2006 02:25 AM

Quote:

Originally Posted by HPIA (Post 1137398)
I dont understand...I installed them both and added that <if condition="$post[stylename]">Style: $post[stylename]</if> in the postbit template. What did I do wrong?

Try adding it to posbit_legacy too. I have them added in both templates

Xoligy 12-13-2006 09:01 AM

If your site uses the 2 column view like vbulletin.org does, then you need to edit postbit_legacy.

Ramsesx 12-13-2006 09:49 AM

Thanks for this (install it later), never understood that this isn't vbulletin default because how should the default user know it's only a temporary change if he use the quick style chooser?

Xoligy 12-13-2006 01:32 PM

Ramsesx, yes I agree. I guess it saves writing to the database when people are just checking out the other skins. I guess there should really be a notice saying it's only a temporary change and with a link/button to save the changes. But for most forums, this plug-in will be effective enough, as it only updates the database when needed.

Bison 12-15-2006 02:55 AM

For some unkown reason, but when I change my style, everyone else's style name inside a thead changes to my previous style.

Xoligy 12-15-2006 09:32 AM

Thanks, I'll check it out. Does it change their actual style, or it just shows up in the postbit as their style being different?

Bison 12-15-2006 09:37 AM

Just the style name, I had one user report that in the chooser, the name changed, but his style remained visable.

Xoligy 12-15-2006 10:56 AM

Strange, I'll try and reproduce & fix it.

Falcon Capt 12-15-2006 09:04 PM

What hook location should be used when installing this plug-in???

Ev!L ErN!E 12-15-2006 09:29 PM

ok wait do I need that other one you made to? or can I just use this one?

Xoligy 12-16-2006 09:28 AM

Quote:

Originally Posted by Falcon Capt (Post 1139394)
What hook location should be used when installing this plug-in???

It should install in the correct location.

"ok wait do I need that other one you made to? or can I just use this one?"

This plug-in is to be used in conjunction with the "show user style in postbit" plug-in. I released it separate as it also provides a fix for other plug-ins.

MathewC 12-16-2006 02:38 PM

i go to add to member info temp using

Code:

<if condition="$post[stylename]"><strong>Forum Style Used:</strong> $post[stylename]</if>
And yet it doesnt appear?

Bison 12-16-2006 03:24 PM

I thought this was just a posbit hack?

Xoligy 12-16-2006 03:58 PM

You're getting confused between this hack and my other hack which shows their skin in the postbit.

Bison is right, it will only appear in their postbit, not their member info. I may add the ability to show it in their member info if I get time.

Bison 12-17-2006 11:52 PM

This hack has is not properly working well with your other hack. I suggest that you pull this hack until you can fix the problem. I have disabled the hack to see if your other hack would work like it did before I installed this one, but now its broken too.

I am not good with writing SQL code, but there's something wrong with this query.

Code:

global $styleid;

// Are they the same?
if (isset($styleid) && $user['styleid'] != $styleid){
    $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET styleid = " . $styleid . " WHERE userid = ". $user['userid']);
}

Like I mentioned in another thread, once I change my style while inside a thread, everyone elses style name changes in the same thread to my previous style. If I refresh the thread once more, then they all inherit the style name I just selected. The funny thing about it is that they still can visually see the one that they originally selected, but their chooser points to the one I'm currently using.

Xoligy 12-18-2006 01:29 PM

I spent 2 hours trying to debug the problem, but couldn't even reproduce it. I've added some extra checks, but I don't think they'll do much good.

If you don't mind, could you answer the following questions:
What is your userid on your forums?
Is it just you that can change other people's themes?
What other plug-ins do you have installed?
Would it be possible for me to register on your forums and experience the problem?

If you want, we can take this to PM or MSN (or another IM network).

Xoligy 12-18-2006 05:53 PM

Updated to allow users to reset their skin to the forum default skin from the quick style chooser.

Make sure you remove the previous plug-in.

Bison 12-18-2006 08:39 PM

Question(s):
  1. Does removing the plugin reset their skin to the one that's currently set in their options?
  2. Are there any templates or phrases associated with this plugin?
  3. When applying the revised plugin, will the user need to do an overwrite?

Xoligy 12-19-2006 08:59 AM

1. No
2. The previous plug-in had no templates or phrases.
3. The user won't need to do anything.

Also, I uploaded the wrong version. The latest version has been uploaded now.

da420 12-19-2006 07:40 PM

Installed, but when i updated to the latest version it will not save the style when i choose the style in the style chooser. I choose it, it goes to the style, but when i click on new posts or any forum it goes right back to what I had it to. Disable the product and all is well again.

Bison 12-19-2006 09:09 PM

This guy is very smart and I think he's close to figuring this one out. The problem lies in the query which changes the styleid for the user. He's going to have to join a few tables to get this one to work ... only for the person who changes his style. Right now, its changing everyone's style in the chooser.

Xoligy 12-20-2006 10:11 AM

The query only changes the user's style, no-one elses. The where clause specifies only the current user's style will be changed, so that's not the problem.

I believe it may be something to do with the user's realistyleid variable not being updated - but I can't see why that changes what everyone elses style is specified as, I shall check it out and see, but I'm very busy at the moment so I can't promise anything. It could also be caching, since if you refresh it seems to rectify Bison's problem.

Bison 01-01-2007 05:54 PM

Happy New Year y'all!

Any progress on fixing this hack, Xoligy?

Xoligy 01-10-2007 01:19 PM

I'm now about to take a look at it. I know there are problems with it as I have been experiencing them myself.

Update: Ok I've fixed all the problems and it works like normal. Now I just need to fix the bugs with the other one.

KURTZ 01-10-2007 02:26 PM

INSTALLED!

AMG021 01-11-2007 02:38 AM

works like a charm
thanks again for not giving up :D

Forza 01-16-2007 01:47 PM

im still not sure what this does exactly lol but atleast the 'show skin in postbit' works properly now! thanks for this!

KURTZ 02-06-2007 01:24 PM

hi, i've a trouble with this fix, it fix correctly in the postbit the style that an user uses, BUT when an user reconnect on the board his style is changed automatically ...

Tralala 02-14-2007 04:14 AM

Great, great, great add-on. I always lamented the fact that I could never get accurate stats on what skins were in use, since so many users tend to override their User Settings via the QuickChooser. Thanks to this, the stats will be more accurate.

/clicks install

Oh... will it work with this hack? Show Users using Style in Stylechooser

Tralala 02-14-2007 04:49 AM

Now that the user settings are somewhat more accurate, is there a way to discover specifically which users are using what skin? Like a search in the AdminCP or something? In other words, if psiStats reports there are two users who have chosen "style Z" is there a way to find out who those two users are?

I'm searching but not finding anything.

WNxWakko 02-19-2007 02:34 PM

Quote:

Originally Posted by Tralala (Post 1182081)
Now that the user settings are somewhat more accurate, is there a way to discover specifically which users are using what skin? Like a search in the AdminCP or something? In other words, if psiStats reports there are two users who have chosen "style Z" is there a way to find out who those two users are?

I'm searching but not finding anything.


I totally agree. Would be nice if I could quickly find out how many members are using each style.

Tralala 02-19-2007 02:42 PM

Quote:

Originally Posted by WNxWakko (Post 1186055)
I totally agree. Would be nice if I could quickly find out how many members are using each style.

According to this post by Psionic Vision:

Quote:

You could run query. Something like this:
SELECT userid, username FROM user WHERE styleid = XXX
It'd be nice to have a nice AdminCP menu option for this though... just a quick screen that shows what users have selected what style. That way if you have an unpopular style (only 4 users) and you want to get rid of it, you can inform them ahead of time...


All times are GMT. The time now is 06:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01291 seconds
  • Memory Usage 1,818KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete