Author |
Message |
Topic: My contribution, a "range" function |
clone46
Replies: 0
Views: 11492
|
Forum: Plugins Posted: Thu Jun 19, 2014 9:04 pm Subject: My contribution, a "range" function |
Hi!
Here's a helpful function used in situations where you two values and need output like:
1 - 2 dogs
1 dog
4-5 cats
Often times this is a little bit trickier than it sounds.
Example us ... |
Topic: Advice for delimiters between optionally visible items |
clone46
Replies: 1
Views: 4044
|
Forum: General Posted: Wed Jun 18, 2014 11:09 pm Subject: Advice for delimiters between optionally visible items |
Hello,
I have a situation that looks something like this:
{if $foo != '1234'}
{$foo},
{/if}
{if $bar != '54'}
{$bar},
{/if} ... |
Topic: Small addition to documentation |
clone46
Replies: 0
Views: 17167
|
Forum: Documentation Posted: Thu Nov 01, 2012 6:33 pm Subject: Small addition to documentation |
It might be nice to add under the foreach documentation:
If you are using the {foreach $myArray as $myKey => $myValue} syntax, operators such as @last or @first should be applied to $myValue. F ... |
Topic: Unable to write file: smarty_internal_write_file.php ? |
clone46
Replies: 5
Views: 11956
|
Forum: General Posted: Tue Dec 27, 2011 1:49 am Subject: Unable to write file: smarty_internal_write_file.php ? |
Wait, I take it back. The original filename was only 166 characters long. Maybe there's a nuance in the rename() function that freaks out when the entire file path plus the file name are longer than ... |
Topic: Unable to write file: smarty_internal_write_file.php ? |
clone46
Replies: 5
Views: 11956
|
Forum: General Posted: Tue Dec 27, 2011 1:42 am Subject: Unable to write file: smarty_internal_write_file.php ? |
I figured it out. Windows XP has a 255 character limit for filenames. Maybe a feature request would be for Smarty to reduce templates_c filenames to ensure that they are less than 255 characters. :- ... |
Topic: Unable to write file: smarty_internal_write_file.php ? |
clone46
Replies: 5
Views: 11956
|
Forum: General Posted: Mon Dec 26, 2011 11:56 pm Subject: Unable to write file: smarty_internal_write_file.php ? |
Hello!
I'm working with XAMPP on a Windows XP box. I've got a similar development environment on a Windows 7 box running XAMPP with no problems. However, on my Windows XP box, I'm getting the fol ... |
Topic: Problems with template function and caching |
clone46
Replies: 3
Views: 7238
|
Forum: General Posted: Mon Dec 19, 2011 8:52 pm Subject: Problems with template function and caching |
I really wanted to default some of those function parameters, and I ended up doing it like this:
// $ORDER, $COUNT, $DIRECTION, and $OFFSET are assigned to the smarty template
{function ... |
Topic: Problems with template function and caching |
clone46
Replies: 3
Views: 7238
|
Forum: General Posted: Mon Dec 19, 2011 5:18 pm Subject: Problems with template function and caching |
Ah, thanks! |
Topic: We love Smarty |
clone46
Replies: 2
Views: 47044
|
Forum: Testimonials Posted: Sat Dec 17, 2011 12:54 am Subject: We love Smarty |
Hello! At my current job (Graphic Language), we're using Smarty 3 and we love the new template inheritance. Recent sites that we've built using smarty include:
http://www.graphiclanguage.net
htt ... |
Topic: Problems with template function and caching |
clone46
Replies: 3
Views: 7238
|
Forum: General Posted: Sat Dec 17, 2011 12:32 am Subject: Problems with template function and caching |
Hello!
I have a function in my template that looks like:
{function build_link order=$ORDER count=$COUNT direction=$DIRECTION offset=$OFFSET}
/leads/list?order={$order} ... |
Topic: 'unless' statement, like Perl's |
clone46
Replies: 2
Views: 11768
|
Forum: Feature Requests Posted: Thu Dec 02, 2010 7:52 pm Subject: 'unless' statement, like Perl's |
Yup, it's just "syntactic sugar". mmmm... candy. |
Topic: 'unless' statement, like Perl's |
clone46
Replies: 2
Views: 11768
|
Forum: Feature Requests Posted: Thu Dec 02, 2010 5:46 pm Subject: 'unless' statement, like Perl's |
Hello!
I would love to see the addition of the 'unless' statement. It's basically the same as "if not". It would work something like this:
{unless $foo == 6}
do something
{/unless ... |
Topic: Controller for smarty? |
clone46
Replies: 0
Views: 5754
|
Forum: General Posted: Sun Feb 18, 2007 2:48 am Subject: Controller for smarty? |
Hello! I love Smarty and I've used it in conjunction with EZSql for a few personal projects. We're evaluating it at work but we have some unique requirements. We work on multiple sites that have alm ... |
Topic: Queries question... calling queries within smarty loop |
clone46
Replies: 1
Views: 5697
|
Forum: General Posted: Thu Sep 14, 2006 6:54 am Subject: Queries question... calling queries within smarty loop |
PS: I realize that there's an error in my examples. A better example would be that I wish to print all users, plus how many posts that they posted. The code would then look more like:
{fore ... |
Topic: Queries question... calling queries within smarty loop |
clone46
Replies: 1
Views: 5697
|
Forum: General Posted: Thu Sep 14, 2006 4:45 am Subject: Queries question... calling queries within smarty loop |
Hello!
I'm using Smarty and EQSQL. I also program in Coldfusion. Although I love Smarty, there's a few things that are easy in Coldfusion and difficult in Smarty. Let's pretend that I'm outputtin ... |
|