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 17 matches
Smarty Forum Index
Author Message
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Thu Feb 14, 2019 1:59 pm   Subject: Can't get Smarty to register new plugin
You need to EITHER
a) load the file defining the necessary callable and register plugin
OR
b) place the specifically named file defining a specifically named callable into one of the configured Plu ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Wed Feb 13, 2019 9:34 pm   Subject: Can't get Smarty to register new plugin
Then fix your layout or Smarty initialization.
You have a working example before you, step through it with a debugger and see how it differs from your code.

Well it is actually working (I added al ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Tue Feb 12, 2019 2:33 pm   Subject: Can't get Smarty to register new plugin
Both works, if you did not notice.
Fetch the forum-27741 branch and run testcase yourself.

Not for me:
Fatal error: Uncaught --> Smarty: Plugin 't' not callable <-- thrown in /usr/l ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Tue Feb 12, 2019 1:16 pm   Subject: Can't get Smarty to register new plugin
Works like a charm, just as I said.


Yes, when calling the local one, but when you try and call the plugin you get the error.

$smarty->registerPlugin('block', 't', 'smarty_block_t'); ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Mon Feb 11, 2019 2:49 pm   Subject: Can't get Smarty to register new plugin
Sorry, the archiver says the file is incomplete.

https://drive.google.com/open?id=1zB_bR5XXbznCvjvtqQo-9UXwONkMDtfB
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Fri Feb 08, 2019 2:02 pm   Subject: Can't get Smarty to register new plugin
Did you want me to do that or are the files at http://www.filedropper.com/testblockplugintar enough?
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Thu Feb 07, 2019 8:20 pm   Subject: Can't get Smarty to register new plugin
FYI testing Smarty 3.1.33 with PHP 5.6.40
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Thu Feb 07, 2019 7:55 pm   Subject: Can't get Smarty to register new plugin
I did create a git account. Don't have composer but not sure it would be needed in this case to replicate.

I have uploaded the files here: http://www.filedropper.com/testblockplugintar

This is ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Thu Feb 07, 2019 3:39 pm   Subject: Can't get Smarty to register new plugin
Thanks AnrDaemon. Not sure if I am doing this correctly, but I tried to push the new branch like this:

git push https://github.com/AnrDaemon/test-001.git testblockplugin


Got an error:
re ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Thu Feb 07, 2019 2:31 pm   Subject: Can't get Smarty to register new plugin
I have also noticed that the documentation for block functions is not consitant. When looking function do_translation ($params, $content, $smarty, &$repeat, $template)

But when you loo ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Wed Feb 06, 2019 8:57 pm   Subject: Can't get Smarty to register new plugin
I have created a new directory for custom plugins as suggested. Still getting the error that it is not callable. When I create a test function like this it works:

function Zsmarty_block_t ($p ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Wed Feb 06, 2019 7:13 pm   Subject: Can't get Smarty to register new plugin
If you correctly place your files in a directory loadable by Smarty's plugin system, you don't need to register anything.
This is further reinforced by the function names.


But it should still fu ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Tue Feb 05, 2019 12:16 pm   Subject: Can't get Smarty to register new plugin
I have tried all those combinations - with smarty_, with and without smarty_block, etc. When I change the registerPlugin code to this:
$tpl->registerPlugin('block','tzz','smarty_block_t') ...
  Topic: Can't get Smarty to register new plugin
strafford

Replies: 23
Views: 78230

PostForum: Installation and Setup   Posted: Mon Feb 04, 2019 7:01 pm   Subject: Can't get Smarty to register new plugin
I must be missing some piece of the setup. I think Smarty is setup correctly as nothing comes up when using $tpl->testInstall() - all tests return 'OK'.

I show my plugin dir with getPluginsDir ...
  Topic: how to assign/overwrite the value of an input in template
strafford

Replies: 3
Views: 5205

PostForum: General   Posted: Thu Jun 28, 2018 3:59 pm   Subject: how to assign/overwrite the value of an input in template
I am using a template variable to display everything.

As for your reference to https://www.smarty.net/docs/en/api.get.template.vars.tpl yes I can get the values, but I want to then assign/change ...
 
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