...

View Full Version : Fatal error: Smarty Error - unexpected {elseif}



Delysid
07-17-2012, 07:06 PM
Fatal error: Smarty error: : syntax error: unexpected {elseif} (Smarty_Compiler.class.php, line 495) in /home/geloo/public_html/imob/libs/Smarty.class.php on line 1092

This is what i get when i finish adding an ad on my site and i can't figure out what is the problem.

here is the [I]/free_return.php:




<?php

/*

*

* OxyClassifieds.com : PHP Classifieds (http://www.oxyclassifieds.com)

* version 6.0

* (c) 2009 OxyClassifieds.com (office@oxyclassifieds.com).

*

*/

require_once "include/include.php";

require_once "classes/mail_templates.php";

require_once "classes/mails.php";

require_once "classes/mail_settings.php";

require_once "classes/info.php";

//require_once "classes/actions.php";

require_once "classes/users_packages.php";

require_once "classes/packages.php";

require_once "include/payments.php";

require_once "classes/coupons.php";

require_once "classes/alerts.php";

require_once "classes/pictures.php";



global $db;

global $lng;

$smarty = new Smarty;

$smarty = common($smarty);

$smarty->assign("lng",$lng);

$smarty->assign("section","other");



global $config_debug;

$payment = new payment("free");

$info='';

$payment->process();

$info = $payment->getInfo();



$smarty->assign("info",$info);



$db->close();

if($db->error!='') { $db_error = $db->getError(); $smarty->assign('db_error',$db_error); }



$smarty->display('payment_return.html');

close();

?>





Thanks in advance.

PS: I also attached the newad.php (copied in txt) - this is the file with the steps to add an ad, and the problem could be also at step 6 - 7, final ones.

firepages
07-18-2012, 01:00 AM
would have to see the 'newad.html' template to be of much help

I find from time to time that if a smarty error makes no sense, clearing the cached template can sometimes fix the error

Delysid
07-18-2012, 06:22 AM
I attached the newad.html file.

Thanks.

MarkR
07-18-2012, 11:05 AM
{elseif $v.type=="google_maps"}

<tr><td class="left_form">{$v.name}:</td> <td class="right_form"> {if $tmp[$v.caption]}

<input type="hidden" name="{$v.caption}" id="{$v.caption}" value="{$tmp[$v.caption]}">

<div id="gm_{$v.caption}" style="width: 450px; height: 400px"></div>

{/if}</td></tr>



{elseif $v.type=='checkbox_group'}


Before the '{elseif $v.type=='checkbox_group'}' you are closing the if statement. Get rid of the {/if}.

Delysid
07-18-2012, 04:08 PM
{elseif $v.type=="google_maps"}

<tr><td class="left_form">{$v.name}:</td> <td class="right_form"> {if $tmp[$v.caption]}

<input type="hidden" name="{$v.caption}" id="{$v.caption}" value="{$tmp[$v.caption]}">

<div id="gm_{$v.caption}" style="width: 450px; height: 400px"></div>

{/if}</td></tr>



{elseif $v.type=='checkbox_group'}


Before the '{elseif $v.type=='checkbox_group'}' you are closing the if statement. Get rid of the {/if}.

Doesn't solve it... the {/if} closes the statement started by {if $tmp[$v.caption]}. After removing it i got a new error, from the begining.

Thanks anyway. :(

Delysid
07-18-2012, 05:55 PM
Thank you guys for your will to help!

Just solved it... it was something wrong in some info templates. I changed a few files in the database and it worked.

Good Luck!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum