![]() |
Change style on index with UPDATE
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] |
Here is the french version
Voici la version francaise. |
and the SC
|
nice!
thanks man, i needed that :D |
Haha, uc, Grog6 has followed my command ;P
|
@ Flup : ;)
|
Nice work grog, but how many queries does this add to forumhome?
|
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 ;) |
nice work :glasses:
|
grog6,
nice hack. :) 1 question. say i have other styles running, but are not selectable to users, how I can avoid from having those style sets from showing up in the box? i've attached a ss to show you what i mean. i have 4 styles that are set as non-selectable. (ie, 0 users) thanks! ;) |
@ Metrosports82 : Replace in the index.php
PHP Code:
PHP Code:
|
thanks mate. great job on the hack. ;)
|
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:
|
@ Alien : Remove it from the index.php modification :
PHP Code:
|
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? -.- |
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.
|
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. |
@ 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 ;)
|
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. |
Cliks install if you like it :)
|
Done :cool:
|
Quote:
It's not just this hack, it's any of these style changing hacks. Even here on vb.org you'll experience the problem if you do what I described and it's not even the same hack. Now is there any solution to this? |
Grog, I have a question about your hack. When I go to edit my forumhome template (Templates/modify) I see this:
http://www.jdcarr.com/images/templates.gif Do I have to edit the forumhome template for all the different styles? Also, when I create the two new templates, which template set do I save them to (Default, plasma, etc...)? Thanks! |
@ BustaCap : To add this modification to all styles, you have to add the 2 new templates and add the variable to each of your forumhome template ;)
That's why I created 2 .txt file which countain the template to add, use the hack Template Backup System to add these 2 templates to each style faster ;) (just 2 clicks ;) ) |
I've installed Firefly's template backup hack. I'm not clear on how I should use this to add the two templates to all of the style sets. ..
Sorry for being so dense about this but I'm new to this. Can you tell me how I should do this? |
You can do it fast without any hacks. Create one of the templates to your top style. Then hit your back button for your browser and change the style you are saving it to from the dropdown menu. Then do the same for the second template. :)
|
Grog any comment on my situation? Otherwise I'll just remove the style change option from the usercp since it will be on the main page of the forums.
|
@ -Sidekick- : Yup but you have to clik X times (the number of styles you have ;) ) to install a template to all styles, and the same thing with the second template whereas with the TBS, just upload the 2 .txt files to your FTP, and then click import to all styles, and you"re done :)
For your question concerning the user profile's change, and the problem you have, as you've said above, this pb is when you install a hack to change the style elsewhere than ic the user CP :( I don't know why, sorry guy :( |
ah, so I can import a .txt file as a template? That's what had me confused. I though I had to somehow convert it to a template file before I could import it.
Anyway, I got it working and it seems to be both showing correctly the number of users using each style, including showing styles even if noone is using them. Thanks! |
grog6, I've got it working and it's working as it should except for one problem. On one of my styles it "squashes" it so that it looks really narrow. However, if I select the style through the UserCP it looks fine, so it must be something to do with the hack. The style is the Ravio Skin offered by VBskins.com. It happens with both the fixed width and expanded style. Any thoughts as to why this happens or how to fix it?
Right now what I've done is to remove the: <center> $style_select </select> <br> from the forumhome template for the Ravio style. Of course, this means that I don't get the dropdown box on that skin. However, if I'm viewing another skin (with the dropdown box) I can at least change to the Ravio Skin. As soon as I add the: <center> $style_select </select> <br> to the forum home for Ravio style it messes it up again. So I'm just leaving it out. |
Can this be modified so it will work in the header template as well? If so, how?
|
Use firefly to use it in the header, I think it should be better ;)
With mine, all modifications are done in the index.php, and if you want to do it in the header, you' ve to modify the global.php ... |
Might install this if I have the time to do so.. ;)
Matthew's click *install* :) |
Quote:
[sql]UPDATE user SET styleid='1' WHERE styleid!='2' AND styleid!='4'[/sql] ^ That should work:) That query will update all users setting their styleid to 1, unless their styleid is 2 or 4 (the other 2 styles on your site):) Satan |
Hehe, thx Chris :)
|
Quote:
|
Try this Sidekick, it may bu usefull for you ;)
https://vborg.vbsupport.ru/showthrea...AND+each+style |
That hack will update the style postbit hack like yours?
|
I haven't looked at this hack yet, but just ask the question to the hacker, he should answer you with pleasure ;)
|
I've gotten no response from that hacker....
|
All times are GMT. The time now is 02:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|