Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 10-26-2006, 05:29 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Show users Theme...

On this site in the postbit you can see the users theme, where is there a hack for this?
Reply With Quote
  #2  
Old 10-26-2006, 05:33 PM
da420 da420 is offline
 
Join Date: Nov 2005
Posts: 1,232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't see one. vB.org is probably keeping it proprietary, but I could be wrong. Im sure if you knew more about the coding it could be done fairly easily.
Reply With Quote
  #3  
Old 10-26-2006, 06:08 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm going to start searching for code I guess... sigh.
Reply With Quote
  #4  
Old 10-26-2006, 06:11 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has been asked before, I've never seen it released anywhere, but there is nothing special about it - a members styleid is already available for every post - we just have a lookup array from id to name, and display it.
Reply With Quote
  #5  
Old 10-26-2006, 06:16 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, so it's simple? Can you post the simple code please? Cause I have been trying $stylename and $styleid and get no output in the postbit.
Reply With Quote
  #6  
Old 10-26-2006, 06:17 PM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can do it like this, it's not the cleanest way of doing it but it works and needs no plugins etc.

In this code x is the id number of your default style, y is the id number of an alternative style. Repeat the second conditional for any other styles you have, changing the id number and style name. Stick the code in the postbit or postbit_legacy templates.

Code:
<div class="smallfont">
Style:&nbsp;<if condition="$post[styleid]==0"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=x">default</a></if>
<if condition="$post[styleid]==y"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">style name</a></if>
</div>
Reply With Quote
  #7  
Old 10-26-2006, 06:28 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually upon further testing this doesn't work. I have changed styles, and it keeps showing the first one it detected, even after refreshing. Sigh.

I tried using this too, and no good... anyone know how to do this?

Code:
<if condition="in_array($styleid, array(1,0))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=1">AMAC Blue</a></if>

<if condition="in_array($styleid, array(5))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">AMAC Midnight</a></if>

<if condition="in_array($styleid, array(17))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">AMAC Butterflies</a></if>
Anyone? Bueller?
Reply With Quote
  #8  
Old 10-27-2006, 11:51 PM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by |oR|Greg
Actually upon further testing this doesn't work. I have changed styles, and it keeps showing the first one it detected, even after refreshing. Sigh.

I tried using this too, and no good... anyone know how to do this?

Code:
<if condition="in_array($styleid, array(1,0))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=1">AMAC Blue</a></if>

<if condition="in_array($styleid, array(5))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">AMAC Midnight</a></if>

<if condition="in_array($styleid, array(17))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">AMAC Butterflies</a></if>
Anyone? Bueller?
My method will work, as I use it on my site.

However, it's important to note it only shows the style as set in the user cp...it won't detect any changes made using the quick chooser dropdown, as these are simply cookie changes.

It'd be nice if there was a way to detect those, but I don't know of one.
Reply With Quote
  #9  
Old 10-27-2006, 11:54 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahhhh, and that's what I was doing to change the styles, I see said the blind man. Ok, so, maybe if I replace my dropdown with a link to the UserCP, or make an interface that will update it, I can detect it easier. Thanks.
Reply With Quote
  #10  
Old 12-12-2006, 12:09 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by |oR|Greg View Post
Actually upon further testing this doesn't work. I have changed styles, and it keeps showing the first one it detected, even after refreshing. Sigh.

I tried using this too, and no good... anyone know how to do this?

Code:
<if condition="in_array($styleid, array(1,0))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=1">AMAC Blue</a></if>

<if condition="in_array($styleid, array(5))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">AMAC Midnight</a></if>

<if condition="in_array($styleid, array(17))"><a href="$vboptions[forumhome].php?$session[sessionurl]&styleid=$post[styleid]">AMAC Butterflies</a></if>
Anyone? Bueller?
Don't work with vB3.6.4
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:43 PM.


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.04572 seconds
  • Memory Usage 2,253KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete