HomePhabricator

Adding a bunch of hooks from wikiHow into DifferenceEngine

Authored by ashley on Jun 21 2016, 6:36 PM.

Description

Adding a bunch of hooks from wikiHow into DifferenceEngine

These hooks allow things such as:

  • adding CSS(/JS) into the OutputPage when viewing diffs
  • adding extra HTML content (such as avatars) into diff views
  • hiding the bottom "mark as patrolled" link
  • altering the parser output that is used by DifferenceEngine
  • and more

Example extension using these hooks is wikiHow's
/extensions/wikihow/hooks/, specifically the file DiffHooks.php (but the
hooks are setup in WikihowHooks.php).

Live example of the DiffHooks stuff in action can be found at wikiHow.com,
for example:
http://www.wikihow.com/index.php?title=Set-Your-Homepage&diff=17112892&oldid=15888129
(user avatars, additional CSS, changes to the old/new revision header
texts/links)

Change-Id: Icbc987fa4806e7bfc66743375301912b428dc348