Andrew B.
27th January 2005, 12:43 PM
Hi.
I've been trying to add a link to the postbit_legacy template. The link lets the user move directly to the parent message. One method works great for Threaded and Hybrid; the other works great for Linear. But neither work great for both, and so I'd like to have vBulletin pick the right one to use, depending on the current display mode. But I can't even begin to get this nested IF statement working, let alone figure out the right way to format the statement.
Could someone please complete the statement for me. Below is what I want to do. The upper case part is pseudo code for what I can't figure out how to do. The lower case is for the statements that are working and don't need to be changed. And, btw, I didn't invent the working part. It came mostly from others.
<!-- begin parent link mod -->
IF THE CURRENT DISPLAY MODE IS NOT LINEAR
<if condition="$post[parentid] != '' && $post[parentid] > 0">
[<a href="showthread.php?$session[sessionurl]p=$post[parentid]&postcount=$post[parentid]">goto parent msg.</a>]</if>
ELSE
<if condition="$post[parentid] != '' && $post[parentid] > 0">
[<a href="showthread.php?p=$post[parentid]#post$post[parentid]">goto parent msg.</a>]</if>
ENDIF
<!-- / end parent link mod -->
I've been trying to add a link to the postbit_legacy template. The link lets the user move directly to the parent message. One method works great for Threaded and Hybrid; the other works great for Linear. But neither work great for both, and so I'd like to have vBulletin pick the right one to use, depending on the current display mode. But I can't even begin to get this nested IF statement working, let alone figure out the right way to format the statement.
Could someone please complete the statement for me. Below is what I want to do. The upper case part is pseudo code for what I can't figure out how to do. The lower case is for the statements that are working and don't need to be changed. And, btw, I didn't invent the working part. It came mostly from others.
<!-- begin parent link mod -->
IF THE CURRENT DISPLAY MODE IS NOT LINEAR
<if condition="$post[parentid] != '' && $post[parentid] > 0">
[<a href="showthread.php?$session[sessionurl]p=$post[parentid]&postcount=$post[parentid]">goto parent msg.</a>]</if>
ELSE
<if condition="$post[parentid] != '' && $post[parentid] > 0">
[<a href="showthread.php?p=$post[parentid]#post$post[parentid]">goto parent msg.</a>]</if>
ENDIF
<!-- / end parent link mod -->