Hooks are run in the order in which they're listed in the
$wgHooks['whatever'] array.
The order you list your require_once() lines in your LocalSettings.php
file is the easiest way to make something run first.
Alternatively, instead of:
$wgHooks['whatever'][] = 'myWhateverHook';
You could try this:
array_unshift( $wgHooks['whatever'], 'myWhateverHook' );
Which should put 'myWhateverHook' at the front of the list.
-- Jim R. Wilson (jimbojw)
On Feb 19, 2008 3:42 PM, Andreas Rindler <mediawiki(a)jenandi.com> wrote:
Hi,
I have two extensions (SelectCategoryTagCloud and FCKeditor) that both
use the following hook to access the content of the edit page input
box:
$wgHooks['EditPage::showEditForm:initial']
How can I control which extension gets to do its work first?
I would like SelectCategoryTagCloud to strip out all existing category
links in the wiki text (and consequently put it in the second input
box for category assignment) and then have FCKeditor use the rest of
the text to display in the wysiwyg editor. And when the user saves the
page, I would like to reverse the order. First, FCKeditor stores the
wikitext and then SelectCategoryTagCloud adds the categories selected
by the user at the bottom of the wiki text. So the database always
stores wiki text.
Any thoughts?
Thanks,
Andi
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l