Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Search found 25 matches
Smarty Forum Index
Author Message
  Topic: {IF} {ELSE} Statements

Replies: 6
Views: 43557

PostForum: Plugins   Posted: Fri Mar 09, 2007 6:30 pm   Subject: {IF} {ELSE} Statements
You should be more respectful, not everyone knows everything, get lost dumbass
  Topic: {IF} {ELSE} Statements

Replies: 6
Views: 43557

PostForum: Plugins   Posted: Fri Mar 09, 2007 4:09 pm   Subject: {IF} {ELSE} Statements
You're using invalid Smarty syntax, you can't use '==', you should use 'eq'

{if $foo eq 1}
  Topic: have a smarty something like isset() in php?

Replies: 2
Views: 4162

PostForum: General   Posted: Tue Mar 06, 2007 4:01 pm   Subject: have a smarty something like isset() in php?
You can mix PHP and Smarty functions together Smile
  Topic: Smarty error: unable to read resource

Replies: 6
Views: 11727

PostForum: Installation and Setup   Posted: Wed Feb 28, 2007 4:43 pm   Subject: Smarty error: unable to read resource
<link type="text/css" rel="stylesheet" href="{#CSS_DIR#}/general.css" media="all" >

You don't need the "/"

The variable definiti ...
  Topic: opposite a negative/positive number?

Replies: 2
Views: 12632

PostForum: General   Posted: Wed Feb 28, 2007 4:39 pm   Subject: opposite a negative/positive number?
The mathematical function being

  Topic: AJAX plugins....any help??

Replies: 4
Views: 7742

PostForum: Plugins   Posted: Thu Feb 22, 2007 4:53 pm   Subject: AJAX plugins....any help??

<script type="text/javascript" src="js/yahoo.js"></script>

  Topic: Adding images problem

Replies: 4
Views: 4914

PostForum: General   Posted: Tue Feb 13, 2007 9:22 am   Subject: Adding images problem
$t->assign('html_image_file', '');

That's just defining a variable, you need to actually put it into play for it to do anything Smile

{html_image file=$html_ ...
  Topic: PHP und Smarty template " IF ELSE " Problem

Replies: 1
Views: 3806

PostForum: General   Posted: Sun Feb 11, 2007 9:28 am   Subject: PHP und Smarty template " IF ELSE " Problem

$tpl->display( 'whois.tpl' );
$tpl->assign( 'Domainfrei', $frei);
$tpl->assign( 'Domainbelegt', $belegt);

I think you should assign them before you display the page Confused

Übersetz ...
  Topic: New Plugin: contains

Replies: 7
Views: 36787

PostForum: Plugins   Posted: Sun Feb 11, 2007 8:54 am   Subject: New Plugin: contains
About: contains() finds the number of times a phrase is found in a string, and counts how many times it was found.
Usage: {$foo|contains:"bar"}
Optional Arguments: By default it isn't case ...
  Topic: My Framework (Rate It)

Replies: 4
Views: 25296

PostForum: Frameworks   Posted: Sun Feb 11, 2007 5:06 am   Subject: My Framework (Rate It)
Ok, it's uploaded to my server at:

Have fun, I hope you find it useful Smile

- You do not need to edit anything to test it, just upload it to your web ...
  Topic: Alternating Row Colors

Replies: 8
Views: 51564

PostForum: Tips and Tricks   Posted: Sun Feb 04, 2007 2:39 pm   Subject: Alternating Row Colors
Maybe {cycle} should support more than 2 entries Smile
  Topic: Weird template problem

Replies: 3
Views: 4515

PostForum: General   Posted: Fri Feb 02, 2007 4:29 pm   Subject: Weird template problem
Maybe you are seeing linebreaks and returns?
  Topic: Smarty based Textbox problem

Replies: 4
Views: 7607

PostForum: General   Posted: Fri Feb 02, 2007 4:28 pm   Subject: Smarty based Textbox problem
Section should do the trick..

{assion var='i' value=1}
{section name=tb loop=$results}
<input type="text" name="textbox_{$i++}" value=&quo ...
  Topic: Help ! How to this {array[$row][0]} ???

Replies: 5
Views: 5687

PostForum: General   Posted: Thu Feb 01, 2007 6:37 pm   Subject: Help ! How to this {array[$row][0]} ???
If you want, you can just use PHP, you can use the {php} tag to seperate Smarty and PHP stuff

{* Smarty Stuff *}

/* PHP Stuff */
{/php& ...
  Topic: notempty plugin (shorthand conditional statement)

Replies: 6
Views: 12762

PostForum: Plugins   Posted: Thu Feb 01, 2007 6:33 pm   Subject: notempty plugin (shorthand conditional statement)
You may want to use count_characters:

{* Example: {$foo|count_characters} *}

{if $foo|count_characters > 0}


Also, for default just ...
Page 1 of 2 Goto page 1, 2  Next
All times are GMT
Jump to:  

Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP