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 24 matches
Smarty Forum Index
Author Message
  Topic: SmartyML missing feature
mateusfig

Replies: 0
Views: 3541

PostForum: General   Posted: Sat Sep 23, 2006 10:38 pm   Subject: SmartyML missing feature
anybody does know implement a modification of SmartyMl to process things like this?

My name is %s

This would print:

My name is David

Is there any place where anybody teach to implement th ...
  Topic: best way to build a multi-language site with smarty
mateusfig

Replies: 210
Views: 1195347

PostForum: Tips and Tricks   Posted: Wed Sep 20, 2006 9:21 pm   Subject: best way to build a multi-language site with smarty
So I am using http://smarty.incutio.com/?page=SmartyMultilanguageSupport as meantioned above. Ehh... I'm using it because I wrote the script Wink

It works quite well for me and it's fast. If so ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 8:23 pm   Subject: Read Template from Variable as Resource
Why the SmartyML class dont works after use this trick? I tested SmartyML separated and it works normal. Any hint/idea?

Fatal error: Call to a member function on a non-object in .......\smartyML.cl ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 6:20 pm   Subject: Read Template from Variable as Resource
sounds like the timestamp isn't working right or something, and the new data isn't getting recompiled.

Use md5($source) as the compile_id, see how that works.

Yes, now its working Laughing after u ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 5:45 pm   Subject: Read Template from Variable as Resource
I got new problems. The stuff works but when the value of $variable (the one w/ the source code) changes, the first sis printed still. I deleted the compiled files from compile directory myself, then ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 4:55 pm   Subject: Read Template from Variable as Resource
hey, i got to make it work!! wow, great!

i fixed my fault w/ the "resources functions", placing them in the right place. Afer it i removed the Website extends SmartyML to Website extends ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 4:04 pm   Subject: Read Template from Variable as Resource
Another option, you can extend the Smarty class and make display_var() functionality (UNTESTED):




this is the error i got when i try use your last example:
Warning: call_user_func_array(): F ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 2:51 pm   Subject: Read Template from Variable as Resource
You'll need to create a custum resource to do this. Here is a complete working example:
false if the tpl var is not assigned, etc. Adjust as you see fit.

This will generate the output:

TEST ten ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 1:58 pm   Subject: Read Template from Variable as Resource
http://smarty.php.net/manual/en/language.function.eval.php

Thanks but I could not understand still how to use this. All I need is like this: this->display($variableTemplate);

I need this to ...
  Topic: Read Template from Variable as Resource
mateusfig

Replies: 19
Views: 41486

PostForum: General   Posted: Wed Sep 20, 2006 1:38 pm   Subject: Read Template from Variable as Resource
I need compile my templates from a VARIABLE as resource and not a file file.tpl or something like this! Then I don't want pass a path, just get the codig from a variable.

I look for this in the ent ...
  Topic: Multiple/Styles : Suggestions of Best Practice?
mateusfig

Replies: 19
Views: 199286

PostForum: General   Posted: Sat Sep 09, 2006 2:36 pm   Subject: Multiple/Styles : Suggestions of Best Practice?
Hello, i posted this in another thread but just 1 guy replied me and he said he use this structure (except he dont use Modules folders). seems other thread is a little died and, well, this one here is ...
  Topic: directory structure / multi-theme
mateusfig

Replies: 7
Views: 11269

PostForum: General   Posted: Sat Sep 09, 2006 1:43 pm   Subject: directory structure / multi-theme
I think, it's the best structure.
Tough I have nop modules, but pure templates, I like this structure also. Mine is like that:


-|project_root
--|LIB
---| ...
---| ...
---| ...
--|TEMPLATES ...
  Topic: directory structure / multi-theme
mateusfig

Replies: 7
Views: 11269

PostForum: General   Posted: Fri Sep 08, 2006 7:45 pm   Subject: website struct
what about this structure:


-|project_root
--|LIB
---| ...
---| ...
---| ...
--|MODULES
---|mod_1
---|mod_2
--|TEMPLATES
---|tpl_cache
---|tpl_config
---|tpl_compile
--|THEMES
---|the ...
  Topic: directory structure / multi-theme
mateusfig

Replies: 7
Views: 11269

PostForum: General   Posted: Tue Sep 05, 2006 9:28 pm   Subject: directory structure / multi-theme
why nobody reply? please anybody could help me on this too?
________
[URL=http://www.yamaha-tech.com/wiki/Yamaha_YZF-R1]Yamaha Yzf-R1 History
  Topic: Fetch vs. Display()
mateusfig

Replies: 7
Views: 19919

PostForum: General   Posted: Tue Sep 05, 2006 8:09 pm   Subject: Fetch vs. Display()
If you do this:

$output resides in memory, until you either unset() it or the script terminates. If you do this:





Thats all. Great information, u recalled me about the unset() function wh ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT
Jump to:  


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