vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Show users Theme... (https://vborg.vbsupport.ru/showthread.php?t=130032)

|oR|Greg 10-26-2006 04:29 PM

Show users Theme...
 
On this site in the postbit you can see the users theme, where is there a hack for this?

da420 10-26-2006 04:33 PM

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.

|oR|Greg 10-26-2006 05:08 PM

I'm going to start searching for code I guess... sigh.

Paul M 10-26-2006 05:11 PM

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.

|oR|Greg 10-26-2006 05:16 PM

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.

Mark.B 10-26-2006 05:17 PM

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>


|oR|Greg 10-26-2006 05:28 PM

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?

Mark.B 10-27-2006 10:51 PM

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.

|oR|Greg 10-27-2006 10:54 PM

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.

Allan 12-12-2006 12:09 PM

Quote:

Originally Posted by |oR|Greg (Post 1104962)
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 :(


All times are GMT. The time now is 02:15 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.02654 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete