Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Change style on index with UPDATE Details »»
Change style on index with UPDATE
Version: 1.00, by grog6 grog6 is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-01-2003 Last Update: Never Installs: 23
 
No support by the author.


This hack displays a small box at the top of your forum's index, where you can change easily of style.
The number of users who used is too displayed just next the Style's name.

This hacks was already existed :

https://vborg.vbsupport.ru/showthrea...tyle+AND+index

but it didn't updat the user's table in the database, and if you use others hacks which display the user's style in the postbit, or an other hack to list hacks used on your board (such as mine or Lesane's), information which was displayed was false ! Now, it's updated when the user uses this scroll menu, and so, no pb with other hacks :-)

Moreover, the style directly shown in the scroll menu, is the style that the user uses, so he knows which style he used
A simple changement in this scroll menu, and the user is automatically redirected to the forum's index with the new style selected





Ce hack affiche en haut de votre forum une petite boite, ou vous pouvez facilement changer de style.
Le nombre d'utilisateurs utilisant ce style est egalement montre a cote du nom du style.

Ce genre de hack existait deja :

https://vborg.vbsupport.ru/showthrea...tyle+AND+index

mais il ne mettait pas a jour les infos du membre dans la table user, et si vous utilisez d'autres hacks qui montre le style de chaque membre dans le postbit, ou mon hack qui liste les styles utilises sur votre forum, les infos affichees auraient alors pu etre fausses ! Maintenant c'est mis a jour quand le user utilise ce petit menu, et ainsi, plus de pb avec les autres hacks :-)

De plus, le style actuellement utilis? par le membre est directement affiche, ainsi il sait quel style il utilise a tout moment.
Un simple changement dans ce menu, redirige le membre vers l'accueil du forum avec le nouveau style choisi




[HIGH]Here is the english version.
I could understand a mod or Firefly want to remove this hack (which is only a modification of an other one)


Voici la version anglaise.
Je pourrais comprendre qu'un modo ou un Firefly veuille supprimer ce hack, etant donne que ce n'est que la modification d'un hack de Firefly
[/HIGH]

Show Your Support

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

Comments
  #12  
Old 05-03-2003, 09:30 AM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Metrosports82 : Replace in the index.php

PHP Code:
$styles=$DB_site->query("SELECT styleid,title FROM `style` ORDER by styleid"); 
by
PHP Code:
$styles=$DB_site->query("SELECT styleid,title FROM `style` WHERE userselect='1'  ORDER by styleid"); 
[HIGH]Archive updated [/HIGH]
Reply With Quote
  #13  
Old 05-03-2003, 01:28 PM
MetroSports82's Avatar
MetroSports82 MetroSports82 is offline
 
Join Date: Nov 2002
Location: NJ
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks mate. great job on the hack.
Reply With Quote
  #14  
Old 05-03-2003, 05:30 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey nice work.

May I ask exactly what needs to be removed to take out the number of users using a style? Thanks!

-Jason

Quote:
Yesterday at 07:26 PM grog6 said this in Post #8
1 query to get the number of styles,

1 other which is run X times (depends of your number of styles to display how many users use the style, but you can remove this query and not show the number of users who use styles,

and 1 to update the user's table which is ONLY run if the user modify his style
Reply With Quote
  #15  
Old 05-03-2003, 05:59 PM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Alien : Remove it from the index.php modification :

PHP Code:
$listes=$DB_site->query_first("SELECT COUNT(*) AS nombre FROM `user` WHERE styleid='$style[styleid]'");
$nombre=$listes[nombre];

if (
$bbuserinfo[styleid] == $style[styleid]) $select='selected'; else $select=''
And it from the style_liste template : ($nombre)
Reply With Quote
  #16  
Old 05-03-2003, 11:28 PM
-Sidekick- -Sidekick- is offline
 
Join Date: May 2002
Location: Cudahy, Wi
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is a problem I'm having with this hack...

If I use the style change hack to change my style, then I go into my usercp options and try to change it to something else, it won't take effect on the style I pick in my usercp options unless I pick it twice in a row.

Did I explain that okay? -.-
Reply With Quote
  #17  
Old 05-05-2003, 08:50 AM
o0stephane0o's Avatar
o0stephane0o o0stephane0o is offline
 
Join Date: Feb 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Side click, the bug you are experioencing have nothing to see with that hack, you have just noticed it now but it was there before installing that hack.
Reply With Quote
  #18  
Old 05-05-2003, 11:16 AM
Edgar Edgar is offline
 
Join Date: Dec 2001
Location: Belgium
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, but the numbers are not coming up correct for me.
To see what I mean see: http://www.avalancheonline.com/forums/index.php?s=
I have close to 1900 members yet only 200 or so users are showing up in the menu. And these are the only 3 styles there are.
Reply With Quote
  #19  
Old 05-05-2003, 11:30 AM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Edgar : Take a look into your database, and look if other users don't have a wrong styleid recorded in their profile which may correspond to an old style you could have removed
Reply With Quote
  #20  
Old 05-05-2003, 12:19 PM
Edgar Edgar is offline
 
Join Date: Dec 2001
Location: Belgium
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, that will probably be it. I had a duplicate on one of my styles I later removed. So I guess the number will only update when people use that dropdownbox now or change it in their profile again, I see it already increased by a few numbers.

But I can live with it. Nice job with your hacks man, I already installed a few of them. They're small but usefull hacks, I like it that way.
Reply With Quote
  #21  
Old 05-05-2003, 12:27 PM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cliks install if you like it
Reply With Quote
Reply

Thread Tools

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 07:16 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.04786 seconds
  • Memory Usage 2,314KB
  • Queries Executed 27 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (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
  • (3)pagenav_pagelink
  • (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_postinfo_query
  • fetch_postinfo
  • 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