Plug-ins patch (edit & add) - Printable Version +- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com) +-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html) +--- Forum: OpenDocMan Patches (https://forum.opendocman.com/forum-10.html) +--- Thread: Plug-ins patch (edit & add) (/thread-415.html) |
Plug-ins patch (edit & add) - sokac - 05-29-2011 This patch is allowing developers to get file id from own plugin. [attachment=0] Here are changes in methods Plugin_class.php (not included in patch) Code: /* Re: Plug-ins patch (edit & add) - Stephen - 05-29-2011 I think I need to edit add.php and edit.php as well. Something like this: add.php Code: callPluginMethod('onAfterAdd',$fileId); This will ensure the current $fileid is passed to the onAfterAdd method automatically. Does that make sense? Re: Plug-ins patch (edit & add) - sokac - 05-29-2011 Affected files are (see in patch): add.php edit.php functions.php As you can see, callPluginMethod('onAfterAdd'); was changed to callPluginMethod('onAfterAdd', $fileId); (and for onBeforeEdit and onAfterEdit). Changes in Plugin_class.php are optional (for documentation) Patch.diff: Code: diff -urB opendocman-unstable-daily-orig/add.php opendocman-unstable-daily/add.php Re: Plug-ins patch (edit & add) - Stephen - 05-29-2011 Great, the changes I am committing are basically the same changes that you have here but with some minor differences in variable naming. Re: Plug-ins patch (edit & add) - Stephen - 05-29-2011 I just committed the changes to the SVN trunk. Please let me know if everything works for you. Re: Plug-ins patch (edit & add) - sokac - 05-29-2011 Great, it works Re: Plug-ins patch (edit & add) - mohsinj677 - 12-14-2013 Sounds like you have a typo. Try grabbing v1.2.6.4, it contains a more permanent attempt at solving the mime issue. |