Author |
Message |
Topic: regex_replace ersetzt nur letzten Match |
Celeb
Replies: 3
Views: 9718
|
Forum: Language: German Posted: Mon Dec 29, 2008 9:17 am Subject: regex_replace ersetzt nur letzten Match |
Versuch mal den Modifier m:
m (PCRE_MULTILINE)
By default, PCRE treats the subject string as consisting of a single "line" of characters (even if it actually contains several newlines ... |
Topic: Missing javascript |
Celeb
Replies: 3
Views: 8711
|
Forum: Bugs Posted: Mon Dec 29, 2008 8:59 am Subject: Missing javascript |
So you're assigning everything but the JavaScript to Smarty and are surprised, that everything but the JavaScript shows up in the output? |
Topic: Using @count with a multidimensional array in a loop |
Celeb
Replies: 3
Views: 9820
|
Forum: General Posted: Mon Dec 29, 2008 8:54 am Subject: Using @count with a multidimensional array in a loop |
What does
{$vehicles.trucks.$space|@print_r}
output? |
Topic: Appending a url to a value in html_options |
Celeb
Replies: 1
Views: 5408
|
Forum: General Posted: Mon Dec 29, 2008 8:49 am Subject: Appending a url to a value in html_options |
You either have to modify your $menu array to already contain the values you want, or create a modifier that modifies your array the way you want it or just prepend it in the PHP file processing the s ... |
Topic: Pass 3-dim Array to Template |
Celeb
Replies: 2
Views: 6226
|
Forum: General Posted: Mon Dec 29, 2008 8:47 am Subject: Pass 3-dim Array to Template |
A 2-dimensional associative array suffices:
array(
array(
'name' => '...',
'short' => '...',
'link' => '...'),
array(
'name' => '...',
's ... |
Topic: Smarty Paginate - Session not being updated |
Celeb
Replies: 3
Views: 7744
|
Forum: General Posted: Mon Dec 29, 2008 8:42 am Subject: Smarty Paginate - Session not being updated |
Are you sure, you're checking the $_SESSION variable after connect() and not before? connect() is where the magic should happen.
Also make sure you're using SmartyPaginate::getCurrentIndex() and Sm ... |
Topic: Associative multi dimensional array |
Celeb
Replies: 1
Views: 4784
|
Forum: General Posted: Mon Dec 29, 2008 8:27 am Subject: Associative multi dimensional array |
Try this:
<input type="text" name="Currency[{$countryId}]" value="{$smarty.post.Currency.$countryId}" /> |
Topic: Smarty variables |
Celeb
Replies: 1
Views: 4823
|
Forum: General Posted: Mon Dec 29, 2008 8:24 am Subject: Smarty variables |
You need to assign() them prior to your display() call.
http://www.smarty.net/manual/en/api.assign.php |
Topic: Using Objects |
Celeb
Replies: 2
Views: 5337
|
Forum: General Posted: Mon Dec 29, 2008 8:22 am Subject: Using Objects |
Something like this will most likely not be interpreted as you intend it by the compiler:
{include file="header.tpl" title="$user->firstName's Dashboard"}
try this ... |
Topic: Can Smarty compile PHP into binary code? |
Celeb
Replies: 3
Views: 6889
|
Forum: General Posted: Mon Dec 29, 2008 8:20 am Subject: Can Smarty compile PHP into binary code? |
Smarty only compiles into PHP code. This means that templated only need to be parsed once (for variable replacements etc) but need to be interpreted on every call by the PHP interpreter.
Smarty 3 w ... |
Topic: NEWBIE: Very confused as to file references |
Celeb
Replies: 3
Views: 7507
|
Forum: Installation and Setup Posted: Mon Dec 29, 2008 8:17 am Subject: NEWBIE: Very confused as to file references |
The best way would be to use absolute filepaths. For this you need the file path to your public_html folder. The magic PHP constant __FILE__ should contain that path. |
Topic: Extending Smarty |
Celeb
Replies: 2
Views: 6352
|
Forum: Installation and Setup Posted: Mon Dec 29, 2008 8:11 am Subject: Extending Smarty |
It's a common thing to extend the Smarty class.
However, to set custom include paths you don't need to. A file like this - included in every file that uses Smarty - suffices:
include '/path/to/Smart ... |
Topic: How can i give my smarty vars ? |
Celeb
Replies: 6
Views: 11174
|
Forum: Smarty Development Posted: Wed Dec 17, 2008 9:44 pm Subject: How can i give my smarty vars ? |
Here i'm using an {include file="header.tpl"} function....
{include_php file="libs/client/part/header.tpl"}
No, you're not. |
Topic: div position in smarty |
Celeb
Replies: 1
Views: 10241
|
Forum: Tips and Tricks Posted: Wed Dec 17, 2008 12:27 pm Subject: div position in smarty |
Please refrain from posting the same question twice. You won't get twice as many answers if you do.
Also note, that "Tips and Tricks" is not for support questions.
Link to the thread in ... |
Topic: Missing javascript |
Celeb
Replies: 3
Views: 8711
|
Forum: Bugs Posted: Wed Dec 17, 2008 12:25 pm Subject: Missing javascript |
How do you call that function? |
|