Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2010, 04:31 PM
shaun2222 shaun2222 is offline
 
Join Date: Mar 2010
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
Reply With Quote
  #2  
Old 03-26-2010, 04:35 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IF has been changed in vb4 use it like below.

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

</vb:if>
Reply With Quote
  #3  
Old 03-26-2010, 05:25 PM
shaun2222 shaun2222 is offline
 
Join Date: Mar 2010
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #4  
Old 03-26-2010, 06:34 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
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 10:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07494 seconds
  • Memory Usage 2,198KB
  • Queries Executed 11 (?)
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
  • (3)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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_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