Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-28-2008, 06:51 AM
Medina Medina is offline
 
Join Date: Oct 2006
Location: the Netherlands
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Can someone help me with this if condition

Quote:
Originally Posted by Opserty View Post
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.
Reply With Quote
  #2  
Old 05-28-2008, 03:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 05-28-2008, 03:54 PM
Medina Medina is offline
 
Join Date: Oct 2006
Location: the Netherlands
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 05-28-2008, 05:38 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<if conditon="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == newreply) OR (THIS_SCRIPT == showpost)">
Reply With Quote
  #5  
Old 05-28-2008, 05:41 PM
Medina Medina is offline
 
Join Date: Oct 2006
Location: the Netherlands
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have I put <else /> for each "OR".... ?
Reply With Quote
  #6  
Old 05-28-2008, 05:57 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #7  
Old 05-28-2008, 06:44 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:43 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.04008 seconds
  • Memory Usage 2,223KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete