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

Search found 541 matches
Smarty Forum Index
Author Message
  Topic: Issue with javascript function not being run in a template
douglassdavis

Replies: 3
Views: 2810

PostForum: General   Posted: Tue Dec 16, 2014 5:12 am   Subject: Issue with javascript function not being run in a template
was that the code that is served to your browser? if not, what code is served to your browser?
  Topic: security issue: escaping strings in event handlers
douglassdavis

Replies: 0
Views: 3253

PostForum: Plugins   Posted: Thu Dec 11, 2014 5:40 am   Subject: security issue: escaping strings in event handlers
I noticed that there is no option in the escape modifier to sufficiently escape an untrusted string added to an event handler such as onclick.

For the example below, say that $user_input is untru ...
  Topic: Using Javascript in .tpl file to select a $smarty variable?
douglassdavis

Replies: 3
Views: 3492

PostForum: General   Posted: Sat Aug 16, 2014 2:46 am   Subject: Using Javascript in .tpl file to select a $smarty variable?
You may be able to use json_encode, depending on what you are trying to do.

as an example, you could do something like this


<script type="text/javascript">
var myArray = & ...
  Topic: New variable modifier: Rewrite_URL
douglassdavis

Replies: 10
Views: 15474

PostForum: Plugins   Posted: Sat May 24, 2014 3:55 pm   Subject: Re: Useful plugin
See also comment at bottom here:

http://www.smarty.net/forums/viewtopic.php?t=4356
  Topic: Text Insertion in script Files
douglassdavis

Replies: 15
Views: 13403

PostForum: Smarty Development   Posted: Thu Jan 16, 2014 3:34 am   Subject: Re: Text insertion in javascript
still sounds like what I said before. The browser can't find the js file.

The URL should be relative to the location of the html file requested by the browser (not relative to the tpl file).

...
  Topic: Text Insertion in script Files
douglassdavis

Replies: 15
Views: 13403

PostForum: Smarty Development   Posted: Wed Jan 15, 2014 9:31 pm   Subject: Re: Text Insertion in script Files
Maybe I don't understand "Will it be possible to insert with Smarty text into this file?"

But, the first method doesn't "insert"any text. The browser requests the file ../js/Co ...
  Topic: Are there benefits using Smarty against using PHP directly?
douglassdavis

Replies: 9
Views: 10947

PostForum: Smarty Development   Posted: Mon Jan 13, 2014 8:51 pm   Subject: Are there benefits using Smarty against using PHP directly?
See smarty site:
http://www.smarty.net/about_smarty
http://www.smarty.net/why_use
  Topic: Smarty creates errors for each CSS tag
douglassdavis

Replies: 2
Views: 5926

PostForum: Installation and Setup   Posted: Thu Jan 09, 2014 6:35 pm   Subject: Re: Smarty creates errors for each CSS tag
See http://www.smarty.net/docsv2/en/language.function.literal
  Topic: Smarty 3.1.16 capture append foreach problem
douglassdavis

Replies: 2
Views: 2235

PostForum: General   Posted: Sat Dec 28, 2013 6:24 am   Subject: Re: Smarty 3.1.16 capture append foreach problem
Hey Community,

i have the following code:

main.tpl:


[{include file="test.tpl"}]

[{capture append="foo"}]
bar
[{/ca ...
  Topic: [FALSE ALARM] Security Bug Confirm
douglassdavis

Replies: 4
Views: 5051

PostForum: Bugs   Posted: Sun Dec 08, 2013 7:45 am   Subject: [FALSE ALARM] Security Bug Confirm
PHP code assigned to variables will not be executed.

Ok. You are right. I thought it was running PHP code as well. But, at first I had not put backslashes before the quotes:


$var ="< ...
  Topic: [FALSE ALARM] Security Bug Confirm
douglassdavis

Replies: 4
Views: 5051

PostForum: Bugs   Posted: Sat Dec 07, 2013 6:32 pm   Subject: [FALSE ALARM] Security Bug Confirm
I'm curious so, if it was


$googleStatisticsCode = "<?php phpinfo(); ?>";


and test.tpl was still


<html>
{$googleStatististicCode nofilter}
</ ...
  Topic: Modifier add_url_param
douglassdavis

Replies: 11
Views: 38323

PostForum: Plugins   Posted: Wed Dec 04, 2013 4:11 pm   Subject: another version
I made a different version of this (still smarty 2). Just in case it is useful, I decided to post it. Note that it can set and unset (by setting to null) parameters. It also handles parameters that ...
  Topic: Getting values to HTML
douglassdavis

Replies: 1
Views: 2212

PostForum: General   Posted: Sun Sep 01, 2013 10:04 pm   Subject: Re: Getting values to HTML
How do i easily get a variable stored in smarty Global directly into HTML code?

also can someone explain this line for me:
{if !$GLOBAL.config.website.api.disabled}<tr><td>API Key: < ...
  Topic: Remove shopware.php from canonical tag
douglassdavis

Replies: 3
Views: 3430

PostForum: General   Posted: Fri Aug 23, 2013 11:42 am   Subject: Re: Remove shopware.php from canonical tag

that looks like something that is done using apache rewrites. That is a complicated topic though. You can google "apache rewrite"

Thank you, douglassdavis.
I think that can't be a ap ...
  Topic: Remove shopware.php from canonical tag
douglassdavis

Replies: 3
Views: 3430

PostForum: General   Posted: Mon Aug 19, 2013 4:25 pm   Subject: Re: Remove shopware.php from canonical tag
Hello,
in filtered category pages of my shop the canonical tag is defined. The URL to the main category page is given. That's fine, but the URL is not completely correct, it has the "shopware.ph ...
 
Page 1 of 37 Goto page 1, 2, 3 ... 35, 36, 37  Next
All times are GMT
Jump to:  


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