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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11091, the corresponding Phabricator task for complete and up-to-date bug report information.
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)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Brion Vibber
http://ecoliwiki.net/colipedia/index....
:
Depends on:
Blocks:
  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: ---


Attachments

Description Jim Hu 2007-02-24 22:49:17 UTC
For an extension to Cite that I am working on (http://www.mediawiki.org/wiki/Extension:ProcessCite), 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 
http://ecoliwiki.net/colipedia/index.php/Help:References

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.


Navigation
Links