Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Subclassing Sysplugins

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
AvengerDE
Smarty n00b


Joined: 02 Mar 2016
Posts: 4

PostPosted: Wed Mar 02, 2016 1:21 pm    Post subject: Subclassing Sysplugins Reply with quote

How can I subclass Sysplugins in oder to enhance/modify methods?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Mar 03, 2016 9:17 pm    Post subject: Reply with quote

What exactly you are trying to achieve?…
Back to top
View user's profile Send private message
AvengerDE
Smarty n00b


Joined: 02 Mar 2016
Posts: 4

PostPosted: Fri Mar 04, 2016 4:39 am    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Mar 04, 2016 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message
AvengerDE
Smarty n00b


Joined: 02 Mar 2016
Posts: 4

PostPosted: Fri Mar 04, 2016 6:59 am    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Mar 04, 2016 7:17 am    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Mar 04, 2016 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
AvengerDE
Smarty n00b


Joined: 02 Mar 2016
Posts: 4

PostPosted: Sat Mar 05, 2016 4:52 am    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Mar 05, 2016 8:45 am    Post subject: Reply with quote

I still don't see the reason to even start doing these changes.
Care to clarify?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


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