Last modified: 2012-10-29 17:24:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9091 - Request Hook in Cite.php function stack
Request Hook in Cite.php function stack
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Brion Vibber
Depends on:
  Show dependency treegraph
Reported: 2007-02-24 22:49 UTC by Jim Hu
Modified: 2012-10-29 17:24 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Jim Hu 2007-02-24 22:49:17 UTC
For an extension to Cite that I am working on (, I added the following hook to Cite.php at the 
beginning of the function stack:

wfRunHooks( 'CiteBeforeStackEntry', array( &$key, &$str ) );

I am using this to do additional processing of $key and $str.  The functionality of my extension, which I am calling ProcessCite.php for now, can be seen at

In brief, ProcessCite:
1) fetches, caches, and formats reference info for citations to papers in the NLM PubMed database, using PubMed's E-Utilities web service.  
2) fetches reference information from a list of commonly used shortcuts stored in a specific wiki page
3) allows more concise markup of these kinds of citations
4) disambiguates several ways in which citations might be entered into Cite.

ProcessCite is written with biomedical/genomics wikis in mind, but and I think that other Cite extensions could be written along the same lines.
Comment 1 Siebrand Mazeland 2008-08-12 14:36:26 UTC
To brion for comments.
Comment 2 Steve Sanbeg 2008-08-12 19:09:59 UTC
Wouldn't it be almost as easy for your extension to subclass Cite?  Then you could provide whatever hooks you wanted by overriding the appropriate methods.  The structure shouldn't change too often, so the maintenance shouldn't be too involved.
Comment 3 Jim Hu 2008-08-12 21:39:07 UTC
Interesting alternative.  But it seems like it could be more baroque to have my extension just to provide hooks into Cite, and then have other extensions depend on that, instead of just adding one line of code to Cite.
Comment 4 Brion Vibber 2008-11-21 18:18:07 UTC
Bumping --

Cite has gotten a bit more complicated, with support for multiple groups. If this is still required, where should it go and what parameters should it take?
Comment 5 Jim Hu 2008-11-21 19:03:45 UTC
Thanks Brion, 

I will look at the version of Cite in svn to try to answer these questions.

Note You need to log in before you can comment on or make changes to this bug.