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

Search found 175 matches
Smarty Forum Index
Author Message
  Topic: Something wrong with the installation
bsmither

Replies: 5
Views: 123

PostForum: Installation and Setup   Posted: Sun Jun 10, 2018 2:47 pm   Subject: Something wrong with the installation
Is the PHP constant SMARTY_DIR defined anywhere?
  Topic: Why some modifiers syntax is not working?
bsmither

Replies: 1
Views: 44

PostForum: Smarty 3   Posted: Fri Jun 08, 2018 6:06 pm   Subject: Why some modifiers syntax is not working?
What are you using to view the output?

If a text editor, there should be white sapce and line endings.

If a web browser, leading white space and most line endings are removed. Elsewhere, sequenc ...
  Topic: Anti Click Jacking
bsmither

Replies: 4
Views: 67

PostForum: General   Posted: Fri Jun 08, 2018 5:46 pm   Subject: Anti Click Jacking
In this statement:<style id="antiClickjack">body{display:none !important;}</style>you have unescaped braces.
  Topic: Prestashop 1.6 issue
bsmither

Replies: 1
Views: 78

PostForum: General   Posted: Thu May 31, 2018 7:45 am   Subject: Prestashop 1.6 issue
That should be because Smarty was given a custom function file that has gone missing.

One possible sequence of actions where this could happen is if the application installation has its own include ...
  Topic: displaying array values in a custom HTML table
bsmither

Replies: 6
Views: 156

PostForum: General   Posted: Wed May 23, 2018 7:44 pm   Subject: displaying array values in a custom HTML table
Typically, the code you would be wanting to find is:
$Smarty->assign("Rows",$the_array_of_row_data);where $Smarty is the instantiated class object.
  Topic: displaying array values in a custom HTML table
bsmither

Replies: 6
Views: 156

PostForum: General   Posted: Wed May 23, 2018 5:17 am   Subject: displaying array values in a custom HTML table
It seems the PHP code is not populating $Rows is the way you are wanting.

For example, in $Row, you are wanting the first array element to be:
$Row["Id"] = "10"

But the PHP ...
  Topic: Check if radio button is Checked
bsmither

Replies: 4
Views: 115

PostForum: General   Posted: Mon May 21, 2018 4:09 am   Subject: Check if radio button is Checked
I would say it is possible, but very convoluted, and incredibly inappropriate.

Once Smarty has rendered the template and has submitted the final content to stdout or to a variable, your PHP code th ...
  Topic: syntax error: unbalanced parenthesis in if statement
bsmither

Replies: 7
Views: 236

PostForum: General   Posted: Tue May 08, 2018 4:10 pm   Subject: syntax error: unbalanced parenthesis in if statement
At the end of the template, add {debug}.

When the page is delivered to the browser, the browser will want to popup a window. Let it do so.

Scan the left pane of the window for the $klausurchange ...
  Topic: syntax error: unbalanced parenthesis in if statement
bsmither

Replies: 7
Views: 236

PostForum: General   Posted: Mon May 07, 2018 5:46 pm   Subject: syntax error: unbalanced parenthesis in if statement
Try changing:
{if (isset($_POST['muendl']))}to{if $smarty.post.muendl}
  Topic: Smarty: Time-Modifications
bsmither

Replies: 6
Views: 320

PostForum: General   Posted: Sat May 05, 2018 6:48 am   Subject: Smarty: Time-Modifications
You can try:
{"`$getRow.date` -`$getRow.time`"|strtotime|date_format:"%c"}
You will need to make sure the 'time' string is understandable to PHP.

I think "1 ...
  Topic: Suggestions on how to wrap my smarty vars with a function
bsmither

Replies: 3
Views: 226

PostForum: General   Posted: Wed May 02, 2018 10:36 pm   Subject: Suggestions on how to wrap my smarty vars with a function
If you are interested in an example, see:
https://github.com/markhughes/HTMLMinify-Smarty

Even though this is an output filter (changes the final string), it isn't simple. It demonstrates how elab ...
  Topic: Suggestions on how to wrap my smarty vars with a function
bsmither

Replies: 3
Views: 226

PostForum: General   Posted: Wed May 02, 2018 9:58 pm   Subject: Suggestions on how to wrap my smarty vars with a function
This template code manipulation is something you want to appear in Smarty's rendered output?

If so, you may be interested in a filter. See the docs about: registerFilter()
  Topic: Smarty Pagination
bsmither

Replies: 1
Views: 181

PostForum: General   Posted: Tue May 01, 2018 2:38 am   Subject: Smarty Pagination
According to the docs, this will cause that limit to be used:
{paginate_middle page_limit="5"}
This is supposed to then show, for example:
prev
  Topic: Post back issue
bsmither

Replies: 1
Views: 464

PostForum: Smarty Development   Posted: Tue Mar 20, 2018 2:18 am   Subject: Post back issue
This is "chained selects" and is javascript powered. This all happens in the user's browser, and is past the point of Smarty compiling the template.

See: https://appelsiini.net/projects/c ...
  Topic: Is user accessing page via https or http
bsmither

Replies: 26
Views: 27387

PostForum: Smarty Development   Posted: Thu Mar 15, 2018 1:05 am   Subject: Is user accessing page via https or http
According to your initial post, the Smarty object is named $smarty, not $Smarty.

If you used $Smarty, then PHP probably crashed because $Smarty is a non-object.

If your code uses $smarty (lower- ...
 
Page 1 of 12 Goto page 1, 2, 3 ... 10, 11, 12  Next
All times are GMT
Jump to:  


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