vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Can someone help me with this if condition (https://vborg.vbsupport.ru/showthread.php?t=180758)

Medina 05-28-2008 06:51 AM

Can someone help me with this if condition
 
Quote:

Originally Posted by Opserty (Post 1529972)
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>



This one I`am using right now, and it`s working almost perfect. But there is one fault. When I am posting a new reaction with the quick reply box. The first time it`s using the settings of 'showpost' (a smaller width what I`am using for private messages). But I need the settings of showthread when I am posting a quick reply. But when I refresh the page, then it`s good.


Example:

<if condition="in_array(THIS_SCRIPT, array('showthread', 'showpost'))">
<img src="blabla.gif" width="500px">
<else />
<img src="vbulletin.gif" width="300px">
</if>[/code][/quote]


the second one with the width of 300px that`s disappear if I post a quick reply. But when I am refresh the page. Then the settings comes back to the 500px.

but in a private message it`s working al good.

Who can help me, sorry if you don`t understand it.

Lynne 05-28-2008 03:04 PM

I'm not understanding something. You said it is using the settings for 'showpost' when you want it to use the settings fro 'showthread', yet your conditional statement says to use the same setting for both the 'showpost' and 'showthread' page.

Medina 05-28-2008 03:54 PM

ok so that`s the problem. But that`s not what I want.


I want when you post a quickreply the width of the reply will be 500px and when I refresh the page it will also get a width off 500px.


But when you read a pm I wanna a width of 300px.


I have tried this:

<if condition="in_array(THIS_SCRIPT, array('showthread', 'newreply', 'showpost'))">

but then it will work good on on a topic, also when I post a quick reply. But when I read a pm, it doesnt dissapear. :S

SEOvB 05-28-2008 05:38 PM

<if conditon="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == newreply) OR (THIS_SCRIPT == showpost)">

Medina 05-28-2008 05:41 PM

have I put <else /> for each "OR".... ?

SEOvB 05-28-2008 05:57 PM

Code:

<if conditon="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == newreply) OR (THIS_SCRIPT == showpost)">
this code will display on showthread, newreply and showpost pages
<else />
This code will show every where else except those pages
</if>


Paul M 05-28-2008 06:44 PM

FYI, You are missing the single quotes around the script names.

There is nothing wrong with the original method ;

HTML Code:

<if condition="in_array(THIS_SCRIPT, array('newreply','showthread', 'showpost'))">
    DO SOMETHING
<else />
    DO SOMETHING ELSE
</if>



All times are GMT. The time now is 11:28 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.00975 seconds
  • Memory Usage 1,733KB
  • 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_html_printable
  • (1)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