smarty-php / smarty

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic.
Other
2.24k stars 705 forks source link

date('d.m.Y') - not work!!!!!!!!!! #896

Closed AlexJMcloud closed 1 year ago

AlexJMcloud commented 1 year ago

ruined even what worked normally. So use composer. Set up and come .... when you want to add something. Removed standard php compare functions. The date format is also done in one place. For what?????

wisskid commented 1 year ago

I have no idea what you are trying to say. Is there a bug?

If so, please let us know what version you are using, what happened (with steps to reproduce) and what you expected to happen.

AlexJMcloud commented 1 year ago

It's easier to write in the changes that you have completely removed support for php functions. I have installed version 5.0

AlexJMcloud commented 1 year ago

Although it is written in your concept: - you need to give the editing of the template to the secretary. Let him write whatever he wants. I didn’t put down the html tags, well, okay, let it just be a text.

AlexJMcloud commented 1 year ago

javascript can also be disabled.

scottchiefbaker commented 1 year ago

@AlexJMcloud is this a bug report or a rant? I'm not sure what the heck you're expecting here. Either get to the point, or move on.

cYbercOsmOnauT commented 1 year ago

First of all: As far as I know v5.0 is not released yet. You are working with a beta release at best. Right? Second: v4.x is still available and all you need to do is to remove your v5.0 Smarty directory and overwrite it with 4.x.

In my opinion you have a suggestion that something should stay. I understood that you want to be able to use PHP functions directly in a template. I don't like to work like this. A template is to show something. Data is created in the script(s). Correct me if I am wrong.

wisskid commented 1 year ago

@cYbercOsmOnauT you are not wrong. But you will still need to call some functions in your code. Luckily, smarty provides several modifiers for this and you can also add your own.

This is not necessary here, since we have the date_format modifier:

{$myVar|date_format:"%Y-%m-%d"}