PDA

View Full Version : Template Issues


Irwin
08-23-2009, 03:38 PM
(first post on forums, so please forgive any mistakes)

I've been [pitifully] attempting to modify my forum template a bit here & there and I've encountered a few issues where my [pseudo] HTML knowledge simply does not suffice.

___


My first problem is that I wanted to replace the user offline/online/invisible text/image in the post-bit with an underline for the user-name (green if online, white if offline) & after searching through the forums a bit, I thought I had it but it does not work:
<if condition="$show['profile']">
<if condition="$onlinestatus==1">
<a class="bigusername" style="border-bottom: 1px dotted #00FF00" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<else />
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
</if>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
Does anyone know why I'm having this problem?

___


My second problem revolves around prefix styling, I was attempting to brace all prefixes in '['/']' but I've seemingly hit a snag. When prefixes are shown in the thread-bit, they're shown as such:
$thread[prefix_rich]
I attempted to encapsulate the prefix in brackets but the problem is that when there is no prefix you're left with an empty "[]" brace before the thread name is shown. I've tried to find the "prefix_rich" definition but have been unable to thus-far and I'm assuming the pseudo-HTML <if> tag does not support comparing "prefix_rich" to an empty string (furthermore, I do not know the string delimiters in HTML).

___


Thanks in advance.

theFM
08-24-2009, 02:10 PM
the first issue you do not have this $post[onlinestatus] , put that where you want the online status to be on

for the second issue really i do not see any problem
Hope it solved for you

Regards.

Lynne
08-24-2009, 02:38 PM
If you want your prefixes to have [] around them, why not add it in the Prefix Manager for the prefix? I suppose the other way would be:
<if condition="$thread[prefix_rich]">[$thread[prefix_rich]]</if>

(not tested!)

Irwin
08-24-2009, 09:11 PM
the first issue you do not have this $post[onlinestatus] , put that where you want the online status to be on

for the second issue really i do not see any problem
Hope it solved for you

Regards.
Please read my post before you reply in the future. I do not wish to show $post[onlinestatus] (which is typically an image or text which shows online status), I only want to underline the poster's user-name with a certain color to show their current status. To simplify this, I'll put it like this:
if user...
online: user-name color = GREEN
offline: user-name color = RED
invisible: user-name color = WHITE

If you want your prefixes to have [] around them, why not add it in the Prefix Manager for the prefix? I suppose the other way would be:
<if condition="$thread[prefix_rich]">[$thread[prefix_rich]]</if>

(not tested!)
Thanks, your solution worked :)
I can't do this through the prefix manager because vBulletin (or maybe it's just my skin) seems already encapsulate prefixes in braces when on the forum index.

Also, where the prefix text was set in the bread-crumb in the nav-bar & the page title?

Lynne
08-24-2009, 09:18 PM
No, vbulletin does not put them in braces on the forum index. It must be your skin. Did you try the condition I posted?

James Birkett
08-24-2009, 09:27 PM
Your issue on your first problem (I think) is that you are posting their mark-up username (what is set per usergroup) - without the underline.

I will see what I can come up with, and reply.

EDIT:
It seems whatever methods I try - it over-rides current username mark-up.

Irwin
08-24-2009, 09:44 PM
No, vbulletin does not put them in braces on the forum index. It must be your skin. Did you try the condition I posted?
"Thanks, your solution worked :)"

Your issue on your first problem (I think) is that you are posting their mark-up username (what is set per usergroup) - without the underline.

I will see what I can come up with, and reply.

EDIT:
It seems whatever methods I try - it over-rides current username mark-up.
Take a look at the "$onlinestatus==1" clause:
<if condition="$onlinestatus==1">
<a class="bigusername" style="border-bottom: 1px dotted #00FF00" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<else />
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
</if>