Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-21-2001 Last Update: Never Installs: 206
 
No support by the author.

This is exactly what you see here, on this board's main page.
It allows you to easily change the style you are using.
Please note that it does not update your user profile as well, it simply sets a cookie, and until it expires you will see the style you selected.
Anyhow, download the attached .txt file and do what it says.

Scroll down to a post by me if you'd like the hack to update the user setting in the database!
The attached version does NOT do that!

Have fun and happy holidays!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 07-10-2002, 07:34 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would just like to have the number of users using each style show up by the style name in the drop-down box in the user cp->Edit Options screen. Could someone show me how to do that?
Reply With Quote
  #113  
Old 07-10-2002, 08:47 PM
futureal futureal is offline
 
Join Date: Feb 2002
Location: Del Mar, CA, USA
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's very simple, actually.

In member.php, search for $thisstylename to get you near the correct area (exact like is 739 in my modified file in 2.2.6).

Replace:

PHP Code:
   $stylesets=$DB_site->query("SELECT * FROM style WHERE userselect=1 ORDER BY title"); 
With this query from FireFly (line break added):

PHP Code:
$stylesets=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user 
LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid"
); 
A few lines down, right after this:

PHP Code:
      $thisstylename $thisset['title']; 
Add this:

PHP Code:
      $thisstylecount $thisset['count']; 
Then change the template modifyoptions_styleset to look something like:

PHP Code:
<option value="$thisid$selected$thisstylename ($thisstylecount users)</option
And that should do it. At least, that worked in my forums (I just tried it).
Reply With Quote
  #114  
Old 07-10-2002, 10:31 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! You know, I had tried that EXACTLY, and it didn't work for me...until I saw in your directions that I had one little mistake. I had used $thisstylecount = $thisstyle['count']; instead of $thisstylecount = $thisset['count'];. Oops! Thanks.
Reply With Quote
  #115  
Old 07-11-2002, 01:47 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That works great but still how do you fix that prob if no one is using that style it wont show up in the drop down? HUH. And I don't want to place each style maually in the drop down because I like the feature where it says how many people are using that style. Unless there is another way please help me. Tell me my options. Thanks.
Reply With Quote
  #116  
Old 07-12-2002, 04:21 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

register a user for each style that has no users.
Reply With Quote
  #117  
Old 07-12-2002, 05:48 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol hehehe. What about a real way to fix the prob hehe.
Reply With Quote
  #118  
Old 07-16-2002, 03:01 PM
Angelus Angelus is offline
 
Join Date: Nov 2001
Location: none
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello. Thus only times I excuse for my bad English and secondly legend I thank myself for this hack. But unfortunately I have thereby a problem. If I change thereby the Style, in the User Controll Pannel unfortunately nothing one changes. Thus if someone changes and stores attitudes, he gets the default back Style. Then one there perhaps which make?
Reply With Quote
  #119  
Old 07-22-2002, 05:38 AM
countryboy713 countryboy713 is offline
 
Join Date: Mar 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone Post here on how to fix the un-selected style problem?

A real one, lol, i dont want more empty users on my board than there is already!
Reply With Quote
  #120  
Old 07-22-2002, 03:43 PM
Kasper_H Kasper_H is offline
 
Join Date: Mar 2002
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this hack!
Working perfectly I don't mind the "bug" which does that styles not used won't show up... I actually think that's good
Reply With Quote
  #121  
Old 08-16-2002, 02:47 PM
HappyPike's Avatar
HappyPike HappyPike is offline
 
Join Date: Feb 2002
Location: USA
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did what futureal wrote in post #112 but the how many users are using each style number is still not accurate. Can someone help? I am running 2.26.

My forum
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04951 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete