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.
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    New Coder
    Join Date
    Jul 2013
    Location
    Chicago, IL USA
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Nope: I still got this "Syntax Error in template "gc_script:_adv_camp_manage" on line 50 "{~if($cat[0] == "[" && $cat[1] == "A" && $cat[2] == "D" && $cat[3] == "V" && $cat[4] == "]")~}" PHP function 'if' not allowed by security setting"

    I guess that 'if' is also a security no-no... I appreciate the help though :-)

    Ok, I'm switching to making the foreach statement conditional on $cat containing '[ADV]' I'm scouring the web to find how this is done.

  2. #17
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Alright man, I gotta go to bed.

    Good Luck!
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  3. Users who have thanked whizard for this post:

    FreeCashPro (07-08-2013)

  4. #18
    New Coder
    Join Date
    Jul 2013
    Location
    Chicago, IL USA
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Ok, for the time being I just decided to comment our the whole foreach statement and hard code the two categories I wanted in there. It's not a graceful solution but it works perfectly.

    PHP Code:
    {~if is_array($categories) && count($categories)~}
      <
    tr>
        <
    td align="right"><b>Category</b></td>
        <
    td>
          <
    select name="category">
      <!-- {~foreach 
    item=cat from=$categories~}-->
            
            <!-- <
    option value="{~$cat~}"{~if $smarty.post.category==$cat~} selected="selected"{~/if~}>{~$cat~}</option> -->
            
                     <!-- {~/foreach~} -->
                    <
    option value="[ADV] Get Paid To (GPT) Sites - All Types">[ADVGet Paid To (GPTSites All Types</option>
                    <
    option value="[ADV] Miscellaneous Offers">[ADVMiscellaneous Offers</option>
          </
    select>
        </
    td>
      </
    tr>
    {~/if~} 


 
Page 2 of 2 FirstFirst 12

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
  •