Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 322 matches
Smarty Forum Index
Author Message
  Topic: potential upgrade questions
bsmither

Replies: 1
Views: 12247

PostForum: General   Posted: Thu May 12, 2022 10:11 pm   Subject: potential upgrade questions
Smarty does its thing on source files at the server. The source files can be anything.

The only consideration that the programmer needs to be aware of, is that the source file must not mimic Smarty ...
  Topic: Fatal error: Uncaught 'Smarty_Internal_Method_Assign_By_Ref'
bsmither

Replies: 2
Views: 67723

PostForum: Bugs   Posted: Fri Apr 15, 2022 11:59 pm   Subject: Fatal error: Uncaught 'Smarty_Internal_Method_Assign_By_Ref'
Is it possible you have a custom plugin, or more likely, PHP code that uses a '$smarty->assign_by_ref()' function?

See:https://github.com/smarty-php/smarty/pull/249
https://www.smarty.n ...
  Topic: Validate an URL
bsmither

Replies: 4
Views: 71447

PostForum: Smarty Development   Posted: Wed Apr 06, 2022 3:34 am   Subject: Validate an URL
What would be your essential test?

For example, you say "the link is dead". Do you mean that the database did not give a URL for this product? That is, an empty response?

Then, {if $ur ...
  Topic: use DEBUG within tempalte?
bsmither

Replies: 2
Views: 13272

PostForum: General   Posted: Mon Apr 04, 2022 6:57 am   Subject: use DEBUG within tempalte?
You might consider reviewing this:
https://www.smarty.net/docs/en/variable.debugging.ctrl.tpl
If you have access to the underlying script, you can setup the control to be true only on your IP ad ...
  Topic: trying to Add dynamic canonical tags
bsmither

Replies: 3
Views: 14707

PostForum: General   Posted: Sat Mar 26, 2022 8:12 pm   Subject: trying to Add dynamic canonical tags
You will want the Smarty equivalent:
<link rel='canonical' href="https://www.domainname.com{$smarty.server.REQUEST_URI}">

https://www.smarty.net/docs/en/language. ...
  Topic: strftime() is deprecated
bsmither

Replies: 1
Views: 12099

PostForum: Bugs   Posted: Wed Mar 16, 2022 12:37 am   Subject: strftime() is deprecated
Yup. See:
https://github.com/smarty-php/smarty/issues/671
https://github.com/smarty-php/smarty/issues/672
https://github.com/smarty-php/smarty/pull/678
https://github.com/smarty-ph ...
  Topic: A lot of PHP errors after patching to Prestashop 1.7.8.4
bsmither

Replies: 6
Views: 20171

PostForum: General   Posted: Thu Mar 10, 2022 6:08 pm   Subject: A lot of PHP errors after patching to Prestashop 1.7.8.4
I downloaded Prestashop 1.7.8.4 and had the computer scan the files for:
htmall
None were found.

Also scanned for was:
|escape:
and there are plenty of instances of this in the code, but none h ...
  Topic: A lot of PHP errors after patching to Prestashop 1.7.8.4
bsmither

Replies: 6
Views: 20171

PostForum: General   Posted: Wed Mar 09, 2022 8:39 pm   Subject: A lot of PHP errors after patching to Prestashop 1.7.8.4
Again:
The part of the error message that says:
returning unmodified string in ..............
If the dots represent the name of the template file, you may be able to fix it yourself.
  Topic: A lot of PHP errors after patching to Prestashop 1.7.8.4
bsmither

Replies: 6
Views: 20171

PostForum: General   Posted: Wed Mar 09, 2022 5:39 am   Subject: A lot of PHP errors after patching to Prestashop 1.7.8.4
The 'escape' modifier:
html, htmlall, url, urlpathinfo, quotes, hex, hexentity, javascript, mail
Your error message says the type requested is "htmall" which is a misspelling.

You will ...
  Topic: Check in a foreach if 2 or more items have the same value
bsmither

Replies: 5
Views: 18093

PostForum: General   Posted: Tue Mar 08, 2022 5:11 pm   Subject: Check in a foreach if 2 or more items have the same value
Please use the array given in the OP to describe EXACTLY what you want to see, using the names of the array elements.

(I don't know what your first, second, and third selects are supposed to be wit ...
  Topic: Check in a foreach if 2 or more items have the same value
bsmither

Replies: 5
Views: 18093

PostForum: General   Posted: Tue Mar 08, 2022 2:12 am   Subject: Check in a foreach if 2 or more items have the same value
It does.

"Products in Category 4" has a drop-down that has products 1 and 4. "Products in Category 8" has a drop-down that has products 5 and 7.

If this is not what you want, ...
  Topic: Check in a foreach if 2 or more items have the same value
bsmither

Replies: 5
Views: 18093

PostForum: General   Posted: Mon Mar 07, 2022 5:45 am   Subject: Check in a foreach if 2 or more items have the same value
Try this:
Products:
<select>
{foreach $products as $similar}
<option value="{$similar.prod_id}">Product {$similar.prod_id}</option> ...
  Topic: loop over users in select
bsmither

Replies: 1
Views: 12677

PostForum: General   Posted: Mon Mar 07, 2022 5:08 am   Subject: loop over users in select
The Smarty documentation will say to use the {foreach} structure:
<select id="id_lokal" name="id_lokal" required>
{foreach $USERS as $user}<option value={ ...
  Topic: Is it possible to convert date to timestamp ?
bsmither

Replies: 1
Views: 12638

PostForum: General   Posted: Wed Mar 02, 2022 2:12 am   Subject: Is it possible to convert date to timestamp ?
You are making an assignment to $fin. Are you then asking Smarty to display the value of $fin?
The missing statement {$fin|default:'Huh?'} may be what you want.
  Topic: using a variable as part of another variable name to get val
bsmither

Replies: 2
Views: 13545

PostForum: General   Posted: Sun Dec 19, 2021 5:25 am   Subject: using a variable as part of another variable name to get val
Works for me: Smarty 3.1.33.

PHP:$pricelevel['ID'] = "5056";
$smarty->assign("Price_5056", "999");
$smarty->assign("pricelevel", ...
 
Page 1 of 22 Goto page 1, 2, 3 ... 20, 21, 22  Next
All times are GMT
Jump to:  


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