vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Stylename (and Stylecounter) Modification v1.0.3.1 (https://vborg.vbsupport.ru/showthread.php?t=81135)

Remi 05-08-2005 07:59 PM

Hi

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

Still a wounderful hack

Thanks

Hellspire 05-08-2005 11:58 PM

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.

GsVnEt 05-09-2005 12:01 AM

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.

Hellspire 05-09-2005 12:57 AM

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.

gnu- 05-09-2005 01:01 AM

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

Hellspire 05-09-2005 01:06 AM

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.

Hellspire 05-09-2005 01:12 AM

Quote:

Originally Posted by gnu-
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
...

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?

gnu- 05-09-2005 01:19 AM

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

Hellspire 05-09-2005 01:31 AM

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

gnu- 05-09-2005 01:35 AM

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

Thanks mate :)


All times are GMT. The time now is 06:00 PM.

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.02623 seconds
  • Memory Usage 1,751KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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