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

Reply
 
Thread Tools
Stylename (and Stylecounter) Modification v1.0.3.1 Details »»
Stylename (and Stylecounter) Modification v1.0.3.1
Version: 1.0.3.1, by Hellspire Hellspire is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-07-2005 Last Update: 05-09-2005 Installs: 19
DB Changes
 
No support by the author.

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.

Show Your Support

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

Comments
  #22  
Old 05-08-2005, 07:59 PM
Remi Remi is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

Does this update the user profile when changing a style or it is only a cookie thing

Still a wounderful hack

Thanks
Reply With Quote
  #23  
Old 05-08-2005, 11:58 PM
Hellspire's Avatar
Hellspire Hellspire is offline
 
Join Date: Oct 2003
Location: NY, USA
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
Nice...installing now.

Oh, one thing:

That's not really good practice, asking people to search for that. It could very well have been put in by another hack. Best practice (and AFAIK, part of the Read This First Before You Post A Hack thread) is to use unique blocks of code in your find parts.

*edit*

Also:
That line is terribly written. Sorry, but it is.

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.
Might I point out that I released this yesterday? So lighten up for one....
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.
Reply With Quote
  #24  
Old 05-09-2005, 12:01 AM
GsVnEt GsVnEt is offline
 
Join Date: Mar 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
Nice...installing now.

Oh, one thing:

That's not really good practice, asking people to search for that. It could very well have been put in by another hack. Best practice (and AFAIK, part of the Read This First Before You Post A Hack thread) is to use unique blocks of code in your find parts.

*edit*

Also:
That line is terribly written. Sorry, but it is.

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.
This was a free hack released yesterday. Do you expect anything more?

Lighten up.
Reply With Quote
  #25  
Old 05-09-2005, 12:57 AM
Hellspire's Avatar
Hellspire Hellspire is offline
 
Join Date: Oct 2003
Location: NY, USA
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Originally Posted by Remi
Hi

Does this update the user profile when changing a style or it is only a cookie thing

Still a wounderful hack

Thanks
1.2 makes it a note to temporary override the style selection like so:

Code:
$useid = ($bbuserinfo['userid']==$post['userid']) ? $bbuserinfo['styleid'] : $post['styleid'];
So if the thread belongs to the user currently viewing then it will use his temp id (over the realstyleid if it is different) to make it relatively fixed for users. The only way to accurately know if user A is using style 'b' as his temp or main would be to make the stylechooser update the userinformation. What some people in this thread FAIL to grasp is that such is NOT the purview of my hack. My hack is simply to to show what styles people are using, and 1.2 to make it believable by the user viewing if there is a discrepency.

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.
Reply With Quote
  #26  
Old 05-09-2005, 01:01 AM
gnu-'s Avatar
gnu- gnu- is offline
 
Join Date: Apr 2005
Location: Finland
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, it's not that bad

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




And take that extra "<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>" out of your instructions :P
Reply With Quote
  #27  
Old 05-09-2005, 01:06 AM
Hellspire's Avatar
Hellspire Hellspire is offline
 
Join Date: Oct 2003
Location: NY, USA
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 05-09-2005, 01:12 AM
Hellspire's Avatar
Hellspire Hellspire is offline
 
Join Date: Oct 2003
Location: NY, USA
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gnu-
Yeah, it's not that bad

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
...
I really don't see how that is possible unless your $stylechoosercache is somehow screwed around. Can you perhaps do the following in your showpost?

Code:
		$post['styleid'] = $result[0];
		$post['styletitle'] = $result[1];
Take that, and change it to the following:
Code:
$post['styleid'] = $result[0];
ob_start();
print_r($stylechoosercache);
$post['styletitle'] = ob_get_clean();
Then go to any post using showpost.php then copy and paste the array structure of stylechoosercache. (Then obviously reverse the temp change I had you make ;D) I strongly doubt there is anything wrong with this array, but you never know?
Reply With Quote
  #29  
Old 05-09-2005, 01:19 AM
gnu-'s Avatar
gnu- gnu- is offline
 
Join Date: Apr 2005
Location: Finland
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, yeah

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 ) ) ) )
Reply With Quote
  #30  
Old 05-09-2005, 01:31 AM
Hellspire's Avatar
Hellspire Hellspire is offline
 
Join Date: Oct 2003
Location: NY, USA
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #31  
Old 05-09-2005, 01:35 AM
gnu-'s Avatar
gnu- gnu- is offline
 
Join Date: Apr 2005
Location: Finland
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh man Yeah, we accidentlly went like that from the start and are not changing it now

Thanks mate
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:31 AM.


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.04653 seconds
  • Memory Usage 2,319KB
  • 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
  • (3)bbcode_code
  • (4)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
  • (4)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_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