vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Setting a Condition in Vbulletin (https://vborg.vbsupport.ru/showthread.php?t=127370)

RVSmarter 09-23-2006 07:51 PM

Setting a Condition in Vbulletin
 
I have a conditional statement as follows:

<if condition="$show['custom']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/custom.gif" alt="$vbphrase[custom]" /> </if>

Where and how do I set the condition "$show['custom']" ?

Do I just put the code

$show['custom'] somewhere in the post that this is a condition for?

is there a Set condition command?

Thank you for the help.

RVSmarter 09-27-2006 09:28 PM

Thanks again to all who helped.

993ti 10-22-2006 11:58 PM

I'd like to know this too.
I already posted something similar like this on vbulletin.com, i'll let you know if it comes up with something useful.

Adrian Schneider 10-23-2006 12:17 AM

Set it in a plugin. You'll have to use the right plugin, but in most basic cases, "global_start" is the one you want.
PHP Code:

$show['custom'] = true

You can also do it in templates, but it's not really a good idea because it can be extremely confusing to debug.
Code:

<if condition="$show['custom'] = true">
would set it to true.

Paul M 10-23-2006 01:22 AM

Quote:

Originally Posted by SirAdrian
You can also do it in templates, but it's not really a good idea because it can be extremely confusing to debug.
Code:

<if condition="$show['custom'] = true">
would set it to true.

Ooh, that's a very bad thing to do, avoid like the plague.

Adrian Schneider 10-23-2006 01:30 AM

Quote:

Originally Posted by Paul M
Ooh, that's a very bad thing to do, avoid like the plague.

lol agreed

993ti 10-23-2006 05:19 PM

Thx guys.
How should i create a plugin if i want to do this?
I'm trying to create a new condition so i can show an image when the img tag is used on forumdisplay similar like the trashcan (when a post is soft deleted) and paperclip (attachments).
I know that i need to edit the threadbit template but i don't know how to use a condition or how to create a custom one to show a small image when the img tag is used.

See this for an example of what i wrote for my phpBB forum.
Notice the camera's, they only show when the img tag is used in the topic.

Any ideas?
Thx in advance.


All times are GMT. The time now is 09:23 AM.

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.01137 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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