vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Help with style name in postbit conditional (https://vborg.vbsupport.ru/showthread.php?t=263640)

TundraSoul 05-14-2011 06:19 PM

Help with style name in postbit conditional
 
I'm looking for an efficient way to display the users style choice in the postbit. Here's what I have so far:

Code:

<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 06: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 08:32 PM

Quote:

Originally Posted by Zachery (Post 2195700)
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:

Code:

<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 02:47 AM

Does {vb:raw post.styleid} work in the template?

TundraSoul 05-15-2011 03:52 AM

Yes the Style ID number is returned. It happens to be 15 for me.

TheLastSuperman 05-15-2011 03: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 10:43 PM

Quote:

Originally Posted by TheLastSuperman (Post 2195875)

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 09:41 PM

A week later, any guesses?

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

TheLastSuperman 05-25-2011 12:04 PM

Quote:

Originally Posted by TundraSoul (Post 2199262)
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 #.


All times are GMT. The time now is 05:11 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01056 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete