View Full Version : Correct Code
TCE Killa
01-24-2008, 08:54 PM
Can someone please correct this code for me in my template modification postbit legacy? Thanks...
<if condition="$post[field27]"><span style="font-weight: bold; $post[field27]">$post[username]</b></if></span>
<else />
$post[musername]</if></if>
</if>
</div>
Basically, that is somewhat for users to choose a bold username or not, the profile field is in a tick box option at the moment.
Thanks alot.
Can someone please correct this code for me in my template modification postbit legacy? Thanks...
<if condition="$post[field27]"><span style="font-weight: bold; $post[field27]">$post[username]</b></if></span>
<else />
$post[musername]</if></if>
</if>
</div>
Basically, that is somewhat for users to choose a bold username or not, the profile field is in a tick box option at the moment.
Thanks alot.
I would probably use do this:
<if condition="$bbuserinfo[field27]"><span style="font-weight: bold;">$post[musername]</span>
<else />
$post[musername]</if></if>
</if>
</div>
Don't know what the other </if> closing tags are for, but this is probably how it should look.
TCE Killa
01-24-2008, 11:20 PM
^Didn't work man, I tried it and it got rid of users avatars as well as making the text quite big.
I have other custom stuff (glow usertitle, color username, font username etc...) so I need the extra </if> tags from where I placed the <bold> code. Here is where I placed the code in my postbit legacy among the other custom edits:
<div align="center">
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]"> <if condition="$post[field14]"><font color="$post[field14]">$post[username]</font><else /><if condition="$post['field15'] != '' ">
<font style="font-family:$post[field15]">$post[username]</font>
<else />
$post[musername]</if></if></a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
<if condition="$post[field14]"><font color="$post[field14]">$post[username]</font><else /><if condition="$post['field15'] != '' ">
<font style="font-family:$post[field15]">$post[username]</font><else />
<if condition="$post[field27]"><span style="font-weight: bold;" "$post[field27]">$post[username]</b></if></span>
<else />
$post[musername]</if></if>
</if>
</div>
<if condition="$post[field26]">
<div style="width:100%;filter:glow(color=$post[field26],strength=6)">$post[usertitle]</if></div> <else />
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
As you can see where I placed it, it needs the extra </if>'s. Do you know where abouts I should place it? Plus, here is images of the profile field for it:
http://i27.tinypic.com/2nld6xt.jpg
http://i30.tinypic.com/mtasso.jpg
http://i26.tinypic.com/11qtsaq.jpg <Thats what it looks like in members profile, sorry about highlighting it.
^As you can see I made it a check box so the user can just check the box for the bold username if they want, maybe I have to add a check box code with the bold code aswell? And I'm not sure if that is the correct bold code to put in either. Any help I would highly appreciate it, thanks.
--------------- Added 1201227340 at 1201227340 ---------------
I have done it now, just needed one extra </if> in a certain place and the whole of it needed placing else where. Thanks for the help man.
Lynne
01-25-2008, 02:35 AM
In my postbit, I use a user field and my conditional is "<if condition="$vbulletin->userinfo[field6]">" So try using that variable instead.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.