PDA

View Full Version : Help with style name in postbit conditional


TundraSoul
05-14-2011, 05:19 PM
I'm looking for an efficient way to display the users style choice in the postbit. Here's what I have so far:

<vb:if condition="$post['styleid'] == '##'">
<dt>{vb:rawphrase style}</dt><dd>My style name</dd>
</vb:if>


Oddly when configured it doesn't work properly. Is there a variable for the actual style title? And does styleid even work anymore?

Thanks!

Zachery
05-14-2011, 05:42 PM
Define doesn't work properly?
It would only show which style a user has set in their usercp, which might not be the style they're using, since cookies can override a setting in the usercp.

TundraSoul
05-14-2011, 07:32 PM
Define doesn't work properly?
It would only show which style a user has set in their usercp, which might not be the style they're using, since cookies can override a setting in the usercp.

The term "style" and any subsequent text doesn't appear from the code. For instance:

<vb:if condition="$post['styleid'] == '##'"> <dt>{vb:rawphrase style}</dt><dd>No text appears here</dd> </vb:if>

1. The phrase doesn't return the word "style"
2, The text that should appear based on the open 'if' statement doesn't appear either.

I can only conclude that the first line of the "if" statement is incorrect.
Since I want the term users style choice to appear in every style, is there perhaps a simpler way of doing this?

Zachery
05-15-2011, 01:47 AM
Does {vb:raw post.styleid} work in the template?

TundraSoul
05-15-2011, 02:52 AM
Yes the Style ID number is returned. It happens to be 15 for me.

TheLastSuperman
05-15-2011, 02:57 AM
This works fine for 4.x:
https://vborg.vbsupport.ru/showthread.php?t=168816

View the modification code and you'll see another way it was done, shows correct name etc but note* this shows the style they have set as default not the selected style in use kwim?

TundraSoul
05-15-2011, 09:43 PM
This works fine for 4.x:
https://vborg.vbsupport.ru/showthread.php?t=168816


Not in newer versions. I examined the code and there's little in there that would be useful. So, anyone know what variable displays the users chosen style name? It's not styleid, that's just the style number.

TundraSoul
05-23-2011, 08:41 PM
A week later, any guesses?

What variable produces the style ID's name, suitable for the postbit?

TheLastSuperman
05-25-2011, 11:04 AM
A week later, any guesses?

What variable produces the style ID's name, suitable for the postbit?

uhh the one I linked too? I have it on a 4.1.3 been on there since 4.0.7 and works fine shows style name not id #.