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

Search found 1746 matches
Smarty Forum Index
Author Message
  Topic: Something I don't understand with assigning values
AnrDaemon

Replies: 2
Views: 984

PostForum: General   Posted: Sun Jun 13, 2021 3:01 am   Subject: Something I don't understand with assigning values
Why you are creating table in PHP?
Do that in Smarty.
  Topic: Fatal error: Uncaught Error: Class Smarty_Internal_Template
AnrDaemon

Replies: 3
Views: 1238

PostForum: Installation and Setup   Posted: Wed Jun 09, 2021 4:34 pm   Subject: Fatal error: Uncaught Error: Class Smarty_Internal_Template
If this is a new project, just use [url=https://getcomposer.org/]Composer already.
Will make everything way simpler.
  Topic: Image output
AnrDaemon

Replies: 1
Views: 244

PostForum: General   Posted: Sun Jun 06, 2021 9:04 pm   Subject: Image output
https://bfy.tw/R3nV
  Topic: Generating carriage return/line feeds in Word documents
AnrDaemon

Replies: 1
Views: 227

PostForum: General   Posted: Sat Jun 05, 2021 11:04 pm   Subject: Generating carriage return/line feeds in Word documents
Add {$smarty.version} somewhere in your template to be sure.
  Topic: Fatal error: Uncaught Error: Class Smarty_Internal_Template
AnrDaemon

Replies: 3
Views: 1238

PostForum: Installation and Setup   Posted: Sat Jun 05, 2021 11:01 pm   Subject: Fatal error: Uncaught Error: Class Smarty_Internal_Template
How did you load Smarty? That's rather strange.
You don't have to include anything manually, Smarty is using autoloader for years now.
  Topic: Accessing constants in .tpl
AnrDaemon

Replies: 2
Views: 1429

PostForum: Documentation   Posted: Sun May 30, 2021 8:09 am   Subject: Accessing constants in .tpl
Many people think that direct access to constants was an oversight in design. Way too easy to have a conflict with template functions/blocks.
  Topic: Please update Requirements sections of Smarty Documentation
AnrDaemon

Replies: 2
Views: 7805

PostForum: Documentation   Posted: Sun May 30, 2021 8:08 am   Subject: Please update Requirements sections of Smarty Documentation
https://www.php.net/eol
  Topic: Trouble assigning SUB array
AnrDaemon

Replies: 2
Views: 1537

PostForum: General   Posted: Sun May 30, 2021 8:02 am   Subject: Trouble assigning SUB array
I don't understand your problem.

PHP: {$smarty.const.PHP_VERSION}
Smarty: {$smarty.version}

{$arr['x']['y']['z']="t"}
&# ...
  Topic: Smarty 3.1.39 is released
AnrDaemon

Replies: 0
Views: 2563

PostForum: Announcements   Posted: Sun May 23, 2021 8:56 am   Subject: Smarty 3.1.39 is released
[url=https://github.com/smarty-php/smarty/releases/tag/v3.1.39]Smarty 3.1.39 is released (Feb 17, 2021), containing two security patches.

* Prevent access to $smarty.template_object in sandbox mod ...
  Topic: {strip} render has no space between attributes
AnrDaemon

Replies: 2
Views: 2471

PostForum: Smarty 3   Posted: Fri May 21, 2021 7:19 pm   Subject: {strip} render has no space between attributes
{strip} is a compile-time modifier. The problem is caused by the fact PHP eats the end-of-line mark after "?>" tag. Look into compiled template to understand it.

The solution is to eit ...
  Topic: Capture not working as expected
AnrDaemon

Replies: 1
Views: 455

PostForum: General   Posted: Fri May 21, 2021 1:51 pm   Subject: Capture not working as expected
Unable to reproduce.<?php

require_once __DIR__ . '/smarty-config.php';

$smarty->assign([
'Data' => ['link' => 'xxx'],
]);

$smarty->display(__FIL ...
  Topic: Setting Compile Directory to a non-file system Stream
AnrDaemon

Replies: 7
Views: 785

PostForum: General   Posted: Wed May 19, 2021 11:52 am   Subject: Setting Compile Directory to a non-file system Stream
By setting allow_url_include = On as you recommended I can get a test include to work just fine with my stream wrapper.
And any other stream wrapper including HTTP. Do you realize you just created a ...
  Topic: Setting Compile Directory to a non-file system Stream
AnrDaemon

Replies: 7
Views: 785

PostForum: General   Posted: Sun May 16, 2021 7:29 pm   Subject: Setting Compile Directory to a non-file system Stream
Yet again: compiled template is a regular PHP code.
It is not read using file access functions, it is directly executed (see Smarty_Template_Compiled::loadCompiledTemplate).
  Topic: Problem with print_r
AnrDaemon

Replies: 2
Views: 500

PostForum: General   Posted: Sat May 15, 2021 11:38 am   Subject: Problem with print_r
1. $var|print_r:true
2. Indentation is a function of the user agent.
If you render to HTML, use HTML tags for presentation.
  Topic: Find array value without foreach?
AnrDaemon

Replies: 3
Views: 542

PostForum: General   Posted: Sat May 15, 2021 11:37 am   Subject: Find array value without foreach?
<pre>{$variable|print_r:true}</pre>
 
Page 1 of 117 Goto page 1, 2, 3 ... 115, 116, 117  Next
All times are GMT
Jump to:  


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