vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   if condition problem (https://vborg.vbsupport.ru/showthread.php?t=224399)

Alexey? 10-02-2009 05:22 PM

its still now working
this is my code in forumhome_forumbit_level1_post
Code:

<if condition="!in_array($forum['forumid'], array(9, 132, 95, 72, 13, 288, 113, 124, 11, 12, 100, 62, 16, 421, 14, 10))">
<tr align="center">
                <td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">

                <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                        <td><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
                        <td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
                        <td>
                        <div>
                                <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
                        </div>
                        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>

                        </td>
                </tr>
                </table>

                </td>
        </tr>
</if>




<if condition="in_array($forum['forumid'], array(9, 132, 95, 72, 13, 288, 113, 124, 11, 12, 100, 62, 16, 421, 14, 10))">

        <tr align="center">
                <td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">

<table cellpadding="0" cellspacing="0" border="0">

        <tr>
                <td colspan="2" width="850" height="60" style="background: url('http://www.images.tgt.co.il/FB/$forumid.jpg')">

                        <table border="0" width="100%" height="60" dir="rtl">
                        <tr>                       
                        <td width="28%" align="right" onclick="window.location.href='forumdisplay.php?$session[sessionurl]f=$forum[forumid]'" style="cursor: pointer">
                        <h2 style="margin: 0em; color: #003355; font-family: arial;"><nobr><font color="#003355">$forum[title]</font><nobr></h2>
                        </td>
                        <td width="72%" align="right"><strong><font face=verdana>
                        $forum[description]</strong></font>
                        </td>

                        </tr>
                        </table>
                </td>
        </tr>
        <tr>
                <td colspan="2" style="border-top:#000000 1px dashed; border-bottom:#000000 1px dashed">
                &nbsp;<img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
                </td>
        </tr>

</table>


                </td>

        </tr>
</if>

The first condition is what i don't want to show in the forum i writed there.
and the second condition is what i want to show in those categories.

SOL-R 10-02-2009 05:46 PM

I did it a bit differently but mine works fine for me.


Code:

<if condition="in_array($forumid, array(41,0))">
stuff to be shown
</if>

I also put this in the Forum display template.

That is what someone told me once.....I tried it and it worked.

Alexey? 10-02-2009 06:08 PM

:(
Doesn't work for me.
And i'm editing the template forumhome_forumbit_level1_post

Digital Jedi 10-03-2009 04:55 AM

Maybe the problem is we're misunderstanding what it is you're trying to do. What are you trying to do with your custom code?

Lynne 10-03-2009 05:00 AM

Instead of doing an two if conditions, one for if true, the other for if not true, combine them into one - if true or else.

Also, are you positive you are editing the correct template for the page?

Alexey? 10-03-2009 07:24 AM

I think so.
Any way what i'm trying to do is this.
http://www.tgt.co.il/forumdisplay.php?f=9 - link to my category.
http://www.tgt.co.il/forumdisplay.php?f=17 - link to forum that have inside sub forums.
what i'm trying to do is to change the view in the category and NOT to change the view in the sub forum table.
Hope you'll understand now.

And maybe i used a wrong template.


edit :
Now i'm trying to do this in the HARD way, it seems like to be working.

TNX for you help every body.
Those codes really helped me.


All times are GMT. The time now is 03:06 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.01224 seconds
  • Memory Usage 1,736KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete