Author Topic: {if Question} {endif Question} :)  (Read 3667 times)

0 Members and 1 Guest are viewing this topic.

Offline Habi86

  • Newbie
  • *
  • Posts: 46
    • View Profile
{if Question} {endif Question} :)
« on: December 05, 2009, 06:15:48 PM »
Hi all!

I hope its okay that I opened a new thread for this.

I want that the chapter heading "Kulturbedingungen" is only showing if one of 6 submissions or more are entered.

Code: [Select]

                         <tr>

                            <td width="100%" bgcolor="#EDECEA" colspan="2"><font color="#BCB8AF"><b>Kulturbedingungen</b></font></td>

                          </tr>
 
   
 
{if image_temp}                     
                           <tr>

                            <td valign="top" class="row1"><b>{lang_image_temp}</b></td>

                            <td valign="top" class="row1">{image_temp}</td>

                          </tr>
{endif image_temp}
{if image_LF} 
                           <tr>

                            <td valign="top" class="row1"><b>{lang_image_LF}</b></td>

                            <td valign="top" class="row1">{image_LF}</td>

                          </tr>
{endif image_LF}
{if image_giessen}
                           <tr>

                            <td valign="top" class="row1"><b>{lang_image_giessen}</b></td>

                            <td valign="top" class="row1">{image_giessen}</td>

                          </tr>
{endif image_giessen}
{if image_duengen}
 
                          <tr>

                            <td valign="top" class="row1"><b>{lang_image_duengen}</b></td>

                            <td valign="top" class="row1">{image_duengen}</td>

                          </tr>
{endif image_duengen}

{if image_licht}
                           <tr>

                            <td valign="top" class="row1"><b>{lang_image_licht}</b></td>

                            <td valign="top" class="row1">{image_licht}</td>

                          </tr>
 
{endif image_licht}

{if image_ruhezeit}

                           <tr>

                            <td valign="top" class="row1"><b>{lang_image_ruhezeit}</b></td>

                            <td valign="top" class="row1">{image_ruhezeit}</td>

                          </tr>
{endif image_ruhezeit}


That didnt worked for me:

Code: [Select]
{if image_temp}
{if image_LF}
{if image_giessen}
{if image_duengen}
{if image_licht}
{if image_ruhezeit}
 
                         <tr>

                            <td width="100%" bgcolor="#EDECEA" colspan="2"><font color="#BCB8AF"><b>Kulturbedingungen</b></font></td>

                          </tr>
{endif image_temp}
{endif image_LF}
{endif image_giessen}
{endif image_duengen}
{endif image_licht}
{endif image_ruhezeit}


Cz it only shows when all 6 are entered.

Is there something like {if this,this,this or THIS}  {than THAT}   :?:


Greetings,
Habi

PS: deutsch: Kann es auch auf Deutsch übersetzten wenn gewünscht.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: {if Question} {endif Question} :)
« Reply #1 on: December 05, 2009, 08:25:58 PM »
try this:
Code: (HTML+PHP Template) [Select]
<?php
if (str_replace(REPLACE_EMPTY"""{image_temp}")
 || 
str_replace(REPLACE_EMPTY"""{image_LF}")
 || 
str_replace(REPLACE_EMPTY"""{image_giessen}")
 || 
str_replace(REPLACE_EMPTY"""{image_duengen}")
 || 
str_replace(REPLACE_EMPTY"""{image_licht}")
 || 
str_replace(REPLACE_EMPTY"""{image_ruhezeit}"))
{
?>

                         <tr>

                            <td width="100%" bgcolor="#EDECEA" colspan="2"><font color="#BCB8AF"><b>Kulturbedingungen</b></font></td>

                          </tr>
<?php
}
?>

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Habi86

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: {if Question} {endif Question} :)
« Reply #2 on: December 05, 2009, 09:53:37 PM »
Thank you very very much  :!:  :!:  :!:
Works perfect ^_^ *cuddle*

Greetings,
Habi