I do like your idea to ask the MW team to commit a
few hook entry points.
Yeah - the reason I say ask the group is that /sometimes/ it really is
possible to reach something that seems inaccessible. I've used
combinations Parser functions for example to replace the MediaWiki
parser with Textile and Markdown for example - it's ugly (probably to
Michael's dismay), but it works :/
If you go the route of creating your own hook, even if the hook
doesn't get added, your patching procedure becomes even more
upgrade-safe since it'll probably be a one-line change. It'll also
prompt you to try to reduce the number of different locations where
changes need to be made. Nothing kills upgradability like shotgun
surgery.
-- Jim
On Thu, May 1, 2008 at 4:19 PM, Daniel Barrett <danb(a)vistaprint.com> wrote:
> Thanks Jim. One comment on what you wrote:
>
> >Avoid modifying MediaWiki core code LIKE THE PLAGUE (there, fixed that
> >for you). If you find you can't do what you need to given existing
> >hooks, either ask on a list like this one, or insert a new
> >wfRunHooks() call and hook into it - then ask someone in the group to
> >commit it for you.
>
> I agree that one should avoid modifying the MW core code, but in practice, it can be
done well, very robustly. I have been working with a modified codebase for over a year and
MW upgrades are still trivial. I usually need ~15-30 minutes to merge the 2-3
modifications that don't merge automatically. And 30 minutes every 3 months is a good
investment. In my upcoming MW book, I describe the method (but still warn in big letters
not to modify the core code).
>
I do like your idea to ask the MW team to commit a
few hook entry points.
>
> DanB
>
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l(a)lists.wikimedia.org
>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>