vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   style name in postbit 0.3 (https://vborg.vbsupport.ru/showthread.php?t=92009)

Dream 07-10-2005 10:00 PM

style name in postbit 0.3
 
this is my implementation of the hack used here that shows what style each one is using under their usernames

it will only show the style if the user chose something else then "default style" in the usercp.

also this wont show styles choosen with the "quick style chooser", because those are stored in cookies and not in the database. if you logoff your style is resetted to the one in the usercp.

Installation
- Upload and activate "style name in postbit.xml" plugins
- Put this where you want it to appear

Code:

<if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div></if>
works with: beta 3, beta 4

mholtum 07-13-2005 11:30 PM

Easy money thanks!

Chris M 07-13-2005 11:53 PM

Instead of it re-directing to index.php, do you think you could make it so it re-loads the thread? ;)

Satan

Dream 07-13-2005 11:57 PM

*YAWN*

ill see what I can do. im thinking of changing it so it will only show styles for people that does not use the default one (ie. style 0, if you choose the default style in the usercp it shows)

im a little worried with that require_once() too, its called for each construct_postbit, not sure the performance implications of that

SlaPPiE 07-14-2005 02:15 AM

Is there a way to port this to where it shows the info in the profile? I feel that's a more appropriate place for such a minor detail on a user.

Chris M 07-14-2005 11:32 AM

Quote:

Originally Posted by Dream
*YAWN*

ill see what I can do. im thinking of changing it so it will only show styles for people that does not use the default one (ie. style 0, if you choose the default style in the usercp it shows)

im a little worried with that require_once() too, its called for each construct_postbit, not sure the performance implications of that

On a large thread I think this potentially could slow performance alot :(

Is there any way you can require /includes/adminfunctions_template.php earlier on in the code, i.e. when showthread is initialised? This might stop it having to be called for every post...

Satan

Dream 07-14-2005 10:52 PM

Quote:

Originally Posted by hellsatan
On a large thread I think this potentially could slow performance alot :(

Is there any way you can require /includes/adminfunctions_template.php earlier on in the code, i.e. when showthread is initialised? This might stop it having to be called for every post...

Satan

done, download the zip again, remove the old plugin and import the new ones

it seems to be a little faster but I didnt test with microstats

==========================================

0.3 links to the current thread, and only shows the style if the user didnt choose "default style" in the usercp.

if you installed the old one you have to edit the templates again.

==========================================

and here is the old version that shows the style of all users

Code:

<div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div>

theArchitect 07-17-2005 02:12 AM

I have just noticed a small bug. If you use quick reply then the AJAX system doesn't pull the style name down. Once you do a hard reload of the page all is ok. Just not when the new post is added via AJAX.

Dream 07-19-2005 07:37 PM

im discontinuing this one cause it adds a query to showthread.php, and thats not a good place to add queries as its a very requested script. anyone have my permission to develop it from here.

you can use this one instead that adds the style to the user's profile

theArchitect 07-19-2005 10:57 PM

Quote:

Originally Posted by Dream
im discontinuing this one cause it adds a query to showthread.php, and thats not a good place to add queries as its a very requested script. anyone have my permission to develop it from here.

you can use this one instead that adds the style to the user's profile

My board is still very small, so it is not too much of a problem. But I can see it becoming one. But thanks for your work anyway.


All times are GMT. The time now is 12:30 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
  • Page Generation 0.01141 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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