Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Fatal error: Smarty Error - unexpected {elseif}

    Fatal error: Smarty error: [in evaluated template line 15]: 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 /free_return.php:

    Code:
    <?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.
    Attached Files Attached Files

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,058
    Thanks
    10
    Thanked 96 Times in 94 Posts
    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
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I attached the newad.html file.

    Thanks.
    Attached Files Attached Files

  • #4
    New Coder
    Join Date
    Sep 2011
    Posts
    80
    Thanks
    0
    Thanked 13 Times in 12 Posts
    PHP Code:
    {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}.

  • #5
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by MarkR View Post
    PHP Code:
    {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.

  • #6
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thanks

    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!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •