![]() |
Stylename (and Stylecounter) Modification v1.0.3.1
Note: This module has been changed to 1.0.3 since these were basically bugfixes.
Greetings, these are simple hacks made by me that show what stylename a user is using. Stylecounter module has been removed while I revise it to do a few things you guys requested! The stylename hack adds 0 queries and will adjust for: - Child and parent styles, including 'use forum default styles' - Will account for the current user (the one in the $bbuserinfo array) and which temp style he/she is using. - Same display orders (display order doesn't even matter...) Thanks go out to gnu- and cinq. The former for pointing out some odd little mistakes I made in cyphering the stylechoosercache with child and parent styles that I ignored (sorry!) and the latter for contributing a screenshot. I'm sorry for the hassle I caused some of you who installed, please know that when I did so, I was under duress from other issues and I did not account for a few things that I thought I had. Makes me look like a fool, sure... but since I corrected this basically.... a day, I don't expect to be treated harshly. (Be kind!) Update: v1.0.3.1 - Added optional instructions on how to make QuickStyleChanges permanent for logged-in users. |
Awesome hack. First time i've seen one like it and i've been wondering who is using what style on my forums..
|
Very nice!
|
screen please :)
|
Quote:
|
Cool.. Took not more then a minute and ur done! Thumbs up!
|
Quote:
|
I've seen it before, but this one is better.
|
Heh, I would tend to agree with barhopper. Other hacks like this are just too attached to the showthread functions that they are not portable, whereas this is. Of course, that means it demands two or three more edits, but meh... I don't think it matters.
I will be posting some addon hacks to this in the future as soon as I finish my spring semester ;D |
Quote:
I am sure lots of people will enjoy this add-on =) |
Doesn't work for me :( Checked two times. It shows "Default Style" for everyone. Even for myself, and no, I'm not using it. :l
|
GNU please be specific as to which addon you refer. Do you mean the stylecount or stylename mods?
Also if you could please do the following, take the array $styleusercache and print_r it so you can see its structure, then paste it in a code bb tag here, so I can see if it is something specific to your forum. |
I'm refering to that stylename in postbit mod, but I understood it wrong first, after reading that description the second time I noticed that it in deed doesn't get those styles that have been changed via quick change. Now I'm looking something to solve this. :)
EDIT: Though, it would be nice if you would add that one extra query, if that's what it needs, in to instructions. ;) |
Ah yes, I am already planning on coding a modifcation to this script (very simple but I don't have time at the moment) that will check the bbuserinfo of the current user in relation to the post to correct the discrepency. Thus, relative to all users each will appear to have the correct information, but not so for the others without adding an extra query. Give me some time with this, in the mean time, install the hack as normal and when I update it, you just have to add another line or two to the construct_style_options function.
Have a nice day. |
Well, there's no construct_style_options in the hack I'm refering, but I'm sure to chek this out until you got it done. :)
|
Already done, please following the upgrade guide, 3 changes to 2 files (virtually same change). Cheers.
|
Btw.
Quote:
|
This will sound very newbish, but it is the first instance of (I will make a note of it in the installer) and not the second, although if you feel thus inclined you can add in both places. Doesn't make a difference, but will affect load time for the cypher.
|
yet another thing :D
Quote:
and edit: nah. it's still doing this. in attachment left is a screen shot of the postbit and at the right is my options. :( |
Nice...installing now.
Oh, one thing: Quote:
*edit* Also: Quote:
If the addition is meant to go after the }, why not write 'find $template = 'postbit'; }' ? *edit* Uninstalled. This hack is of no use to me until it can display the styles correctly when they have been changed using the quickchooser. And....it doesn't add 5 seconds to load time, even when using 13 styles. 5 seconds would be insane. |
Hi
Does this update the user profile when changing a style or it is only a cookie thing Still a wounderful hack Thanks |
Quote:
Two, 1.2 DOES display the quick changes from the quickchooser, but will only do so for the username that is currently browsing, not for others (it is a relative fix). If you had read, you would have noticed that I mentioned this and that I said I would make such quick changes permanent for users logged in, or store in some way the styleid in a different field when it is not the same as realstyleid. The installation guides were simply written in 5 or so minutes so you will have to forgive the lack of 'unprofessional' crap that you want me to exhibit. Give me a break geez. In regards, to the 5 second thing, i said anywhere from 1-5 seconds at most, which MEANS that it is a relative thing friend, even if it is less than 1 second, these are approximations! Sheesh. |
Quote:
Lighten up. |
Whatever, while all instances of what I asked to find were unique, and asking them to put it 2 lines below or above is too much apparently, I have made the instruction guides for installation and upgrade into html docs found in their respective zips. As for the stylecounter, I don't have the time to do it at the moment.
Quote:
Code:
$useid = ($bbuserinfo['userid']==$post['userid']) ? $bbuserinfo['styleid'] : $post['styleid']; For those of you who are having problems with the thing, I can only tell you that you installed it WRONG. I'm sorry, but I don't make stupid mistakes in my coding, but the installation guide was rather newbish like that guy said, so I made it easier for people to find the exact space where I want you to add it. |
Yeah, it's not that bad :D
Well, after new fresh install again it still does that what I said above, with the screenshot. All are just Default. :S You have any idea what's wrong? And EDIT note. No, I did NOT install it wrong like seven times :D And take that extra "<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>" out of your instructions :P |
LOL Omg, sigh... removed, thank you. I was a bit pissed when I had to make that installation over again. Never thought I would have to provide so much time for this simple crap.
|
Quote:
Code:
$post['styleid'] = $result[0]; Code:
$post['styleid'] = $result[0]; |
hmm, yeah :D
Array ( [-1] => Array ( [1] => Array ( [0] => Array ( [styleid] => 1 [title] => Default Style [parentid] => -1 [displayorder] => 1 [userselect] => 0 ) [1] => Array ( [styleid] => 2 [title] => AlienSkin [parentid] => -1 [displayorder] => 1 [userselect] => 1 ) [2] => Array ( [styleid] => 3 [title] => Fusion [parentid] => -1 [displayorder] => 1 [userselect] => 1 ) [3] => Array ( [styleid] => 4 [title] => Blue by gnu- [parentid] => -1 [displayorder] => 1 [userselect] => 1 ) [4] => Array ( [styleid] => 5 [title] => Butter's Style tryout [parentid] => -1 [displayorder] => 1 [userselect] => 0 ) [5] => Array ( [styleid] => 6 [title] => DarkChild doing this >:| [parentid] => -1 [displayorder] => 1 [userselect] => 0 ) [6] => Array ( [styleid] => 8 [title] => Adam [parentid] => -1 [displayorder] => 1 [userselect] => 0 ) ) ) ) |
I see the problem, your array is COMPLETELY different than mine, because you are creating completely new styles that don't act as children but as copies of the parent. So the way they are stored in the cache are different than most. I didn't predict something like that... meh, I will draft a replacement function for your case. Give me a few minutes ;D
|
Oh man :D Yeah, we accidentlly went like that from the start and are not changing it now ;)
Thanks mate :) |
In includes/functions_showthread.php, find the function that the installer told you to add, and replace it with this:
* NOT APPLICABLE, WAIT FOR 1.3 * Edit: Ew! Looking at the array you sent me again, I see that you don't have different displayorders for each =\ I would assume that if you changed the display orders to different things, then they would all be displayed as the old function worked =\ I will code a new function for it now... give me a few minutes for 1.3 sigh...... |
Yeah, Changed the display order and works fine :) But yeah, update it of course :P
|
Quote:
|
thank you:)
|
NP (smiley of teardrop on head inserted here)
|
almost good :D now it shows 'UNKNOWN' for everything ;) Can I find the earlier version somehere :p :D
(oh okay it's in the same instructions :D ) |
Quote:
Edit: Done, and it was reuploaded. You should have no further problems. Seriously, I think I got them all. |
Sorry :D Plain unknown all the way. I'm sticking with the old one for now as it works great if you just have those different display orders. ;) I'm off to sleep :D It's morning already :p
|
Sigh, *hits head against the wall* I will look at it tomorrow when I have a clear head, I'm sick of the simplistic avoiding solution in my dazed state.
Edit: Wow what a stupid mistake... it has been corrected and the files updated. If another problem happens for gnu- I swear I will quit coding, because there is no other way that cache can be programmed. And NO I will not support people who have styles like this Parent 1 -Offspring 1 --Child of Offspring 1 ---Child of Child of Offspring 1 Seriously, if you need those many parents you have optimization issues (although I THINK it is possible that I accounted for that -.- who knows...) |
works like a dream :)
|
All times are GMT. The time now is 02:56 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:
|