vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Whats going on here... (https://vborg.vbsupport.ru/showthread.php?t=239153)

shaun2222 03-26-2010 04:31 PM

Whats going on here...
 
I'm trying to create a template with the following code and every time i do i get this error when saving the code.. Anybody know whats going on?

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3332
The following error occurred when attempting to evaluate this template:
%1$s
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.



Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}">
<head>
        {vb:raw headinclude}
        <title>Chat - {vb:raw vboptions.bbtitle}</title>
        {vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}
{vb:raw navbar}


        <h2 class="blockhead">Live Chat</h2>
        <div class="blockbody formcontrols">
          <h3 class="blocksubhead">Chat</h3>
          <div class="section">

<table class="tborder" cellpadding="0p" cellspacing="0px" border="0px" width="100%" align="center">
<tr><td>
<if condition="$show['member']">
<iframe src="/forums/chat/index.php" align="middle" frameborder="0px" marginheight="0" marginwidth="0" scrolling="auto" title="Chat vB-R" width="100%" style="border-width: 0px; border-style: none;" onload="this.style.height = this.contentWindow.document.body.scrollHeight;" id="chat"></iframe>
<script type="text/javascript">
function resizeIframe(){
var height=document.documentElement.clientHeight
height-=document.getElementById('chat').offsetTop
height-=400
document.getElementById('chat').style.height=height+"px"}
document.getElementById('chat').onload=resizeIframe
window.onresize=resizeIframe
</script>
</td></tr>
</if></table>

            </div>
        </div>

{vb:raw footer}

</body>
</html>


Seven Skins 03-26-2010 04:35 PM

IF has been changed in vb4 use it like below.

Code:

<vb:if condition="$show['member']">

</vb:if>


shaun2222 03-26-2010 05:25 PM

Still get the error, here's code with that whole if part removed.... It seams to be pist at the javascript section, if i remvoe it, then it works...

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}">
<head>
        {vb:raw headinclude}
        <title>Chat - {vb:raw vboptions.bbtitle}</title>
        {vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}
{vb:raw navbar}


        <div class="blockbody">
          <div class="blockrow">

<iframe src="/forums/chat/index.php" align="middle" frameborder="0px" marginheight="0" marginwidth="0" scrolling="auto" title="Chat vB-R" width="100%" style="border-width: 0px; border-style: none;" onload="this.style.height = this.contentWindow.document.body.scrollHeight;" id="chat"></iframe>
<script type="text/javascript">
function resizeIframe(){
var height=document.documentElement.clientHeight
height-=document.getElementById('chat').offsetTop
height-=400
document.getElementById('chat').style.height=height+"px"}
document.getElementById('chat').onload=resizeIframe
window.onresize=resizeIframe
</script>


            </div>
        </div>

{vb:raw footer}

</body>
</html>


Seven Skins 03-26-2010 06:34 PM

Try this:

HTML Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}">
<head>
        {vb:raw headinclude}
        <title>Chat - {vb:raw vboptions.bbtitle}</title>
        {vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}
{vb:raw navbar}

        <div class="blockbody">
          <div class="blockrow">
        <iframe src="/forums/chat/index.php" align="middle" frameborder="0px" marginheight="0" marginwidth="0" scrolling="auto" title="Chat vB-R" width="100%" style="border-width: 0px; border-style: none;" onload="this.style.height = this.contentWindow.document.body.scrollHeight;" id="chat"></iframe>
          <vb:literal>
          <script type="text/javascript">
          function resizeIframe(){
          var height=document.documentElement.clientHeight
          height-=document.getElementById('chat').offsetTop
          height-=400
          document.getElementById('chat').style.height=height+"px"}
          document.getElementById('chat').onload=resizeIframe
          window.onresize=resizeIframe
          </script>
          </vb:literal>
    </div>
        </div>

{vb:raw footer}

</body>
</html>



All times are GMT. The time now is 10: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.01263 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
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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