Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
style name in postbit 0.3 Details »»
style name in postbit 0.3
Version: 0.3, by Dream Dream is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Version: 3.5.0 Beta 4 Rating:
Released: 07-10-2005 Last Update: 07-14-2005 Installs: 61
Uses Plugins Template Edits
Re-useable Code  
No support by the author.

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

Show Your Support

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

Comments
  #12  
Old 10-03-2005, 07:48 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Idea to avoid the query caused by cache_styles:

showthread_start
PHP Code:
foreach ($vbulletin->stylecache AS $parentid => $parentstyles)
{
    foreach (
$parentstyles AS $displayorder => $styles)
    {
        foreach (
$styles AS $idx => $selstyle)
        {
            
$stylecache["$selstyle[styleid]"] =& $vbulletin->stylecache["$parentid"]["$displayorder"]["$idx"];
        }
    }

Reply With Quote
  #13  
Old 10-04-2005, 04:46 PM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Better yet

Use this plugin in showthread_query

Code:
$hook_query_fields .= ",style.title";
$hook_query_joins .= " LEFT JOIN style AS style ON(user.styleid = style.styleid)";
Then in the postbit template just do

Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style:
$post[title]
</div></if>
That's working for me now. Going to toy with it a bit more to clean it up and make it a clickable link that will change the style of the user and such, but that seems to be a good skeleton.

EDIT - okay, it needs a lil bit of tweaking LOL, in PMs it shows your style as the title of the pm hehehee.
Reply With Quote
  #14  
Old 10-19-2005, 03:54 AM
murrtex murrtex is offline
 
Join Date: May 2002
Location: izmir
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cyricx
Better yet

Use this plugin in showthread_query

Code:
$hook_query_fields .= ",style.title";
$hook_query_joins .= " LEFT JOIN style AS style ON(user.styleid = style.styleid)";
Then in the postbit template just do

Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style:
$post[title]
</div></if>
That's working for me now. Going to toy with it a bit more to clean it up and make it a clickable link that will change the style of the user and such, but that seems to be a good skeleton.

EDIT - okay, it needs a lil bit of tweaking LOL, in PMs it shows your style as the title of the pm hehehee.
can u tell how can i apply your codes,thanks
Reply With Quote
  #15  
Old 10-26-2005, 12:06 AM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Murrtex, mine doesn't work at all, causes alot of bugs , was a good idea but bad application

I'm going to try Andreas code
Reply With Quote
  #16  
Old 10-26-2005, 12:13 AM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O awesome! It worked great, no extra queries by what I can tell

Just replace the showthread_start plugin with andreas code

Thanks Andreas!!
Reply With Quote
  #17  
Old 10-26-2005, 01:36 AM
murrtex murrtex is offline
 
Join Date: May 2002
Location: izmir
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok cyricx..what will we do..fist i'll install style name in postbit 0.3.zip plugin than apply andreas code..can u show me the way? how ?
Reply With Quote
  #18  
Old 10-26-2005, 02:02 AM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Admincp -> plugin system -> download / upload plugins

Scroll to the bottom, Click browse, select the xml in the first post, click import

now

admincp -> plugin system -> plugin manager

scroll down to "Hook Location : showthread_start" - "Styles in Postbit" and click Edit for that one.

Replace all the code in the "PHP Plugin Code" box with Andreas code above.

Click save.

Do the template edit.

Tada
Reply With Quote
  #19  
Old 10-29-2005, 12:42 PM
murrtex murrtex is offline
 
Join Date: May 2002
Location: izmir
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cyricx
Admincp -> plugin system -> download / upload plugins

Scroll to the bottom, Click browse, select the xml in the first post, click import

now

admincp -> plugin system -> plugin manager

scroll down to "Hook Location : showthread_start" - "Styles in Postbit" and click Edit for that one.

Replace all the code in the "PHP Plugin Code" box with Andreas code above.

Click save.

Do the template edit.

Tada
ok thanks i did it..it works but ...some users ok ,some users no show..??
Reply With Quote
  #20  
Old 10-29-2005, 09:38 PM
JoeWho JoeWho is offline
 
Join Date: Oct 2005
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Murrtex,
Did you get this to work, I have Replace all the code in the "PHP Plugin Code" box with Andreas code but still can not see the style.

JoeWho
Reply With Quote
  #21  
Old 10-29-2005, 11:13 PM
murrtex murrtex is offline
 
Join Date: May 2002
Location: izmir
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

same on me JoeWho..it works on some user,it doesnt work on some user.
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 10:54 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.17377 seconds
  • Memory Usage 2,317KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_php
  • (2)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
  • (3)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