Topic on Project:Support desk

ExtDev : Which hooks to page pre-rendering ?

1
Kallys (talkcontribs)

Hi all,

I'm currently developping an extension for mediawiki and need your help please. I tried few things by my own and search around a bit but I didn't find anything about my issue.

My problem is the following : I try to add dynamic content at beginning of some pages (based on some database extended informations). Currently, I use the "onArticleAfterFetchContentObject" hook in order to add my dynamic content before any parser (it's important because my dynamic content contains wikitext !). It works great, except one thing : after editing an article, user is redirected to the article without calling "onArticleAfterFetchContentObject". This makes sense, because content doesn't need to be reloaded from database after an edit, but this causes my dynamic content isn't added to the page unless someone purge it...

Now, I'm not sure about what I should do to solve this issue. Should I try to force purge after each edit ? How ? Should I try to add my dynamic content after an edit too ? How ? Should I try to find another hook to add my dynamic content and manually apply parser on it ? How ? (dynamic content only contains basic wikitext like bold and italic)

I want to precise that storing this dynamic content into a magic word into the article is not feasible. And by the way, I found it strange that even if "onArticleAfterFetchContentObject" hook is called where user is on edit.php, added dynamic content isn't shown in html textarea, but I didn't investiguate on it.

Thanks and sorry for my awkward english.

Reply to "ExtDev : Which hooks to page pre-rendering ?"