View Full Version : Show users Theme...
|oR|Greg
10-26-2006, 05:29 PM
On this site in the postbit you can see the users theme, where is there a hack for this?
da420
10-26-2006, 05: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, 06:08 PM
I'm going to start searching for code I guess... sigh.
Paul M
10-26-2006, 06: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, 06: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, 06: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.
<div class="smallfont">
Style: <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, 06: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?
<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, 11:51 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?
<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, 11: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
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?
<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 :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.