View Full Version : Show Style in Postbit
archet1337
03-02-2010, 03:25 PM
Updated post: https://vborg.vbsupport.ru/showthread.php?p=1995758#post1995758
mmoore5553
03-02-2010, 10:15 PM
take a look here is this what you want ?
you can take a look at my default style and other style i uploaded quickly
http://www.cg-hq.com/vb4/forum/
ChopSuey
03-02-2010, 10:17 PM
take a look here is this what you want ?
you can take a look at my default style and other style i uploaded quickly
http://www.cg-hq.com/vb4/forum/
Your using 4.0.1? You never heard about the XSS Exploit with 4.0.1? You should upgrade. ;)
@OP there is a template only mod in 3.8 that should be easy to update.
mmoore5553
03-02-2010, 10:27 PM
No i have been moving for past month and just now got pc online lol ..i guess i will update ...thanks for pointing out. It is a test board ... lol ... I would never put my real board on vb 4 hahhahah
he wanted that mod to work and it is working fine once you use the xml file and then just make this edit ...I did this real quick but only tested on my forum.
Here is the code used. I am unsure as I do not have an old board why the style was made a link but here is the code. You can put it in the appropriate place
<vb:if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a></div></vb:if>
archet1337
03-02-2010, 10:30 PM
take a look here is this what you want ?
you can take a look at my default style and other style i uploaded quickly
http://www.cg-hq.com/vb4/forum/
Yes, that is exactly what I'm looking for. But there seem to be a small flaw with your mod. It only works with the Black/Green style. When using default it says Style: $post[styletitle]
@OP there is a template only mod in 3.8 that should be easy to update. That sounds lovely, but I'm a bit shaky, at best, when it comes to coding so I still have the same problem :P
mmoore5553
03-02-2010, 10:31 PM
oops I forgot to check default . I will fix that here in a bit.
curious where is the template mod for vb 3.8
archet1337
03-02-2010, 10:33 PM
Sounds great mmoore5553! I can't wait :)
Btw, I need the mod to work based on the Quick Style Chooser
--------------- Added 1267577922 at 1267577922 ---------------
Here is the code used. I am unsure as I do not have an old board why the style was made a link but here is the code. You can put it in the appropriate place
<vb:if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a></div></vb:if>
I've tried everything I know but I can't get it to show.
I'm using 4.0.2 PL1 if that makes any difference :)
mmoore5553
03-02-2010, 11:10 PM
well I just looked at mod and it works fine ..default shows nothing at all. If you have a theme other than default then it will show it ...
I forgot to edit where i was testing. So just use the code above.
arch just PM me with what you have done and i will check it as it works on my forum there is something missing. Did you upload the xml file ? if you want add me to msn . Just PM me for that info
archet1337
03-02-2010, 11:20 PM
Thanks a lot for taking time to convert this mod, mmoore5553! PM me your paypal address ;)
I played around with the code and figured out how to show if people are using default style as well.
<vb:if condition="$post['styleid'] != 0"><div class="eti_postbit">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a></div>
<vb:else />
<div class="eti_postbit">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">Light Blue</a></div></vb:if>
Only one more hurdle to overcome then.. How to make this work with quick style chooser?
As it is now it will show default style in postbit even though the user have changed using the qsc. Any advice on how to fix that?
I have added style buttons to the top of the forums, like the ones vb.org use and this little mod would be the icing on the cake :)
mmoore5553
03-02-2010, 11:58 PM
No problem sorry just got home and had a look at it ...so you want it to work with quick chooser as in what ?
archet1337
03-03-2010, 12:07 AM
No problem sorry just got home and had a look at it ...so you want it to work with quick chooser as in what ?
If you take a look at my forum www.digi-tech.org, you will notice the quick choose buttons on the top. - but if a user click them to change style instead of changing it in the userCP, the mod will think they still use the default style, or whatever style they picked last in userCP.
So basically I would like the mod to update the style in postbit every time a user change style.
Sorry for my horrible explanation. Hope you understand what I mean.
mmoore5553
03-03-2010, 12:16 AM
You can just find quick chooser code and just write if statements. It should do it
I do not have access to your forum but that is what i would do ....
An array might work but would be hard i think ..but not 100 percent sure on the array
archet1337
03-03-2010, 12:24 AM
Sounds like a plan, but I really don't know how to do that. Would be nice if you could point me in the right direction :)
mmoore5553
03-03-2010, 12:56 AM
I would actually need to see how they coded the top part ..if it is javascript or just html to help more ..sorry ...I can read some of it but not sure ...if you want just PM me with admin access and i will do one and you can do the rest.
archet1337
03-03-2010, 03:26 AM
Update:
https://vborg.vbsupport.ru/
<vb:if condition="$post['styleid'] != 0"><div class="eti_postbit">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a></div>
<vb:else />
<div class="eti_postbit">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">Light Blue</a></div></vb:if>
Originally a 3.5 mod by Dream (https://vborg.vbsupport.ru/member.php?u=406)
This mod is now working with 4.0.2, but there is still a problem:
I'm using Quick Style Chooser buttons on my forum and the mod above will only display the style used in postbit if a user change styles in the userCP. If they use the style buttons or dropdown at the bottom of the page the mod will think they are still using the default style listed in the userCP (or any other style they may have chosen there).
http://www.digi-tech.org/images/diverse/stylebuttons.png
The code for the style buttons in the header:
<ul>
<li><img src="http://www.digi-tech.org/images/layout_spacer.png"><font size="1px" color="#FFFFFF"><b>Layout: </b>Light Styles:
<a href="forum.php?styleid=1"><img src="images/stylechooser/blue.png" align="absmiddle" alt="Light Blue (default)"></a>
<a href="forum.php?styleid=13"><img src="images/stylechooser/seagreen.png" align="absmiddle" alt="Light Sea Green"></a>
<a href="forum.php?styleid=14"><img src="images/stylechooser/gray.png" align="absmiddle" alt="Light Gray"></a>
<a href="forum.php?styleid=15"><img src="images/stylechooser/orange.png" align="absmiddle" alt="Light Orange"></a>
<a href="forum.php?styleid=16"><img src="images/stylechooser/pink.png" align="absmiddle" alt="Light Pink"></a> <b>|</b> Dark Styles:
<a href="forum.php?styleid=17"><img src="images/stylechooser/darkblue.png" align="absmiddle" alt="Dark Blue"></a>
<a href="forum.php?styleid=18"><img src="images/stylechooser/darkorange.png" align="absmiddle" alt="Dark Orange"></a>
<a href="forum.php?styleid=19"><img src="images/stylechooser/darkgray.png" align="absmiddle" alt="Dark Gray"></a>
<a href="forum.php?styleid=20"><img src="images/stylechooser/darkpurple.png" align="absmiddle" alt="Dark Purple"></a>
<a href="forum.php?styleid=21"><img src="images/stylechooser/darkred.png" align="absmiddle" alt="Dark Red"></a> <b>|</b> Bold Styles:
<a href="forum.php?styleid=23"><img src="images/stylechooser/boldblue.png" align="absmiddle" alt="Bold Blue"></a>
<a href="forum.php?styleid=24"><img src="images/stylechooser/boldgray.png" align="absmiddle" alt="Bold Gray"></a>
<a href="forum.php?styleid=25"><img src="images/stylechooser/boldgreen.png" align="absmiddle" alt="Bold Green"></a>
<a href="forum.php?styleid=26"><img src="images/stylechooser/boldmaroon.png" align="absmiddle" alt="Bold Maroon"></a>
<a href="forum.php?styleid=27"><img src="images/stylechooser/boldyellow.png" align="absmiddle" alt="Bold Yellow"></a></font> <br /><br /></li>
</ul>
My coding skills are very limited so I hope someone would be kind enough to take on this task and make this mod work.
I'm willing to pay $30 for this and you can of course share it with the rest of the vb.org community as well.
I have attached the XML file from the original mod.
RedHacker
03-03-2010, 09:48 AM
Update:
http://www.digi-tech.org/images/diverse/postbit.png
<vb:if condition="$post['styleid'] != 0"><div class="eti_postbit">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a></div>
<vb:else />
<div class="eti_postbit">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">Light Blue</a></div></vb:if>
Originally a 3.5 mod by Dream (https://vborg.vbsupport.ru/member.php?u=406)
Not work with 4.0.2 PL1
archet1337
03-03-2010, 02:43 PM
Not work with 4.0.2 PL1
I'm using 4.0.2 PL1 and it's working fine here. Did you upload the plugin file?
Upload the plugin and try this:
<vb:if condition="$post['styleid'] != 0">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a>
<vb:else />
Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">Light Blue</a></vb:if>
RedHacker
03-03-2010, 08:58 PM
I'm using 4.0.2 PL1 and it's working fine here. Did you upload the plugin file?
Upload the plugin and try this:
<vb:if condition="$post['styleid'] != 0">Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">{vb:raw post.styletitle}</a>
<vb:else />
Layout: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">Light Blue</a></vb:if>
Show Layout: Light Blue
--------------- Added 1267730003 at 1267730003 ---------------
I have Default Style only... Is it problem....?
mmoore5553
03-04-2010, 05:22 PM
You have to have more than one style for it to work as to my understanding.
RedHacker
03-04-2010, 06:36 PM
You have to have more than one style for it to work as to my understanding.
OK I will check when upload new style...
Thanks....
Juggernaut
03-14-2010, 07:31 PM
I'm using this mod, but it only works with styles chosen in control panel :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.