vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Somebody knows the if conditions of (https://vborg.vbsupport.ru/showthread.php?t=180347)

Medina 05-24-2008 10:17 AM

Somebody knows the if conditions of
 
private message and postbit legacy?


because I have add something in my signature for postbit (topics).

But it dissapear also in private messages. So how can I give it a if condition?

Opserty 05-24-2008 11:18 AM

You could just check to see if the variable has a value like...

Code:

<if condition="$somevar">
    The value is: $somevar
</if>


What is your current code?

An alternative would be to check the script name like:
Code:

<if condition="in_array(THIS_SCRIPT, array('showthread', 'showpost'))">
    The value is: $somevar
</if>


Medina 05-24-2008 11:59 AM

Maybe you don`t understand me,


but what I have, is a image that have to show up in topics.

so when somebody post, it have to show up. But I wanna in a private message there showing up a other picture.


example:

Quote:

<if condition="showTOPIC">
<img src="blabla.gif">
</if>

<if condition="showPRIVATE MESSAGE">
<img src="vbulletin.gif">
</if>

Opserty 05-24-2008 12:43 PM

Then use the last condition I posted above...

Code:

<if condition="in_array(THIS_SCRIPT, array('showthread', 'showpost'))">
    <img src="blabla.gif">
<else />
    <img src="vbulletin.gif">
</if>


Medina 05-24-2008 01:05 PM

Works perfect, thank you very much. ;)

--------------- Added [DATE]1211717966[/DATE] at [TIME]1211717966[/TIME] ---------------

Opserty, I found a little problem with those conditions.

If i post a quick reply in a topic, it doesn`t dissapear. When I refresh my page, then it dissapears.


I think showpost is the problem, because a quick reply have the same condition isn`t it?


All times are GMT. The time now is 05:45 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.01155 seconds
  • Memory Usage 1,719KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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