vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Change Style Drop-Down (https://vborg.vbsupport.ru/showthread.php?t=33418)

JJR512 07-10-2002 07:34 PM

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?

futureal 07-10-2002 08:47 PM

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).

JJR512 07-10-2002 10:31 PM

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. :)

BigJohnson 07-11-2002 01:47 PM

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.

Smoothie 07-12-2002 04:21 AM

register a user for each style that has no users. :)

BigJohnson 07-12-2002 05:48 AM

lol hehehe. What about a real way to fix the prob hehe.

Angelus 07-16-2002 03:01 PM

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?

countryboy713 07-22-2002 05:38 AM

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! :D

Kasper_H 07-22-2002 03:43 PM

I love this hack!
Working perfectly :D I don't mind the "bug" which does that styles not used won't show up... I actually think that's good :p

HappyPike 08-16-2002 02:47 PM

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


All times are GMT. The time now is 10:17 AM.

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.01250 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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