View previous topic :: View next topic |
Author |
Message |
AvengerDE Smarty n00b
Joined: 02 Mar 2016 Posts: 4
|
Posted: Wed Mar 02, 2016 1:21 pm Post subject: Subclassing Sysplugins |
|
|
How can I subclass Sysplugins in oder to enhance/modify methods? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Mar 03, 2016 9:17 pm Post subject: |
|
|
What exactly you are trying to achieve?… |
|
Back to top |
|
AvengerDE Smarty n00b
Joined: 02 Mar 2016 Posts: 4
|
Posted: Fri Mar 04, 2016 4:39 am Post subject: |
|
|
AnrDaemon wrote: | What exactly you are trying to achieve?… |
I would like to modify the behaviour of some sysplugins classes...
e.g, I would like to modífy the compiled files name, so that the template name is in front of it instead of the end.... |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Mar 04, 2016 6:56 am Post subject: |
|
|
Subclassing the Sysplugins is currently not possible.
And messing around with the filenames will have many side effects, Don't touch it. |
|
Back to top |
|
AvengerDE Smarty n00b
Joined: 02 Mar 2016 Posts: 4
|
Posted: Fri Mar 04, 2016 6:59 am Post subject: |
|
|
U.Tews wrote: | Subclassing the Sysplugins is currently not possible.
And messing around with the filenames will have many side effects, Don't touch it. |
I have modified it in the sourcecode directly, and that works perfectly well.... |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Mar 04, 2016 7:17 am Post subject: |
|
|
AvengerDE wrote: | I would like to modífy the compiled files name, so that the template name is in front of it instead of the end.... |
That's pointless. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Mar 04, 2016 5:13 pm Post subject: |
|
|
Are you really sure that also methods like $smarty->clearCompiledTemplate() are working?
Note that the basename() function used on modified file name will no longer return expected results.
If you enable $use_sub_dirs it will not have the intended effect.
It could fail. Same could happen if you use $compile_id's
These are just some examples of possible problems.
There might be many more. |
|
Back to top |
|
AvengerDE Smarty n00b
Joined: 02 Mar 2016 Posts: 4
|
Posted: Sat Mar 05, 2016 4:52 am Post subject: |
|
|
U.Tews wrote: | Are you really sure that also methods like $smarty->clearCompiledTemplate() are working?
Note that the basename() function used on modified file name will no longer return expected results.
If you enable $use_sub_dirs it will not have the intended effect.
It could fail. Same could happen if you use $compile_id's
These are just some examples of possible problems.
There might be many more. | It is definitely working in a complex shop system! |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Mar 05, 2016 8:45 am Post subject: |
|
|
I still don't see the reason to even start doing these changes.
Care to clarify? |
|
Back to top |
|
|