OXID Community Forum> Overriding oxUtilsPic::resizeImage() |
Login |
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Reply |
|
|
Thread Tools | Display Modes |
|
|
|
Hello,
I want to replace / override oxUtilsPic::resizeImage() in the manner PHP Code:
|
|||
|
__________________
Raywww.stahlwarenhaus-hebsacker.de______________._.__Tipps zur Forensuche www.haller-stahlwaren.de____________________._____Tipps zum Forum _________________________________________._____Forum für Dummies _________________________________________._____Theme-Styler |
||||
|
Hello,
thanks for this valuable information! How ever, as I need to work with a productive shop of v 4.4 that will not be updated tll 2012, I would still need an way to override resizeImage(). Thanks a lot |
|||
|
oxUtilsPic should be overloadable in usual way. Could you post the complete code and steps you tried?
__________________
Frank www.zunderweb.de - Zunderweb IT Beratung Ajax Multifilter XL - Turbo für den Attributfilter |
|||
|
Hello,
I resorted to extend _resize(), but would extend anythink that gives the desired result. In /modules/ is the file myresize.php : PHP Code:
Last edited by Szilagyi; 10-02-2011 at 03:46 PM. |
|||
|
Well i tried with a 4.4.4 and it exits. Maybe oxutilspic is instantiated too early, in this case it would help to add this to config.inc.php (but you also need the line in system/modules):
PHP Code:
__________________
Frank www.zunderweb.de - Zunderweb IT Beratung Ajax Multifilter XL - Turbo für den Attributfilter |
|||
|
Thanks for your effrots. I did try that, but had no success so far. How ever, as my change seems to be depreciated in a future update, I decided to hardcode it into the oxUtilsPic.php file.
The shop I work on has dozens of modules, but none for oxUtilsPic. Does it make any difference in what order they appear in that modules-textarea in the admin? Thanks again Zsolt |
|||
|
No i don't think the order makes any difference. Oxutilspic is a singleton, it is created only once with the first call to oxutilspic::getInstance, "oxnew" is used there, so if your module is present in config-array "aModules" at this time it should work. If you want to figure this out some day, you could debug oxutilsobject and see what is happening there.
__________________
Frank www.zunderweb.de - Zunderweb IT Beratung Ajax Multifilter XL - Turbo für den Attributfilter |
|||
| Reply |
| Bookmarks |
| Tags |
| overriding, oxutilspicresizeimage |
| Thread Tools | |
| Display Modes | |
|
Nicht Sichtbar
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Design Patterns - function overriding in moduls | barthama | Developers | 2 | 04-26-2011 12:59 PM |