[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 9697 – Adding InternalParseBeforeLinks Parser Hook for Semantic MediaWiki

Last modified: 2007-04-25 21:38:56 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 9697 - Adding InternalParseBeforeLinks Parser Hook for Semantic MediaWiki
Adding InternalParseBeforeLinks Parser Hook for Semantic MediaWiki
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-25 20:07 UTC by Jim R. Wilson
Modified: 2007-04-25 21:38 UTC (History)
0 users

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


Attachments
Patch to add hook + documentation (561 bytes, patch)
2007-04-25 20:10 UTC, Jim R. Wilson
Details
Patch to add hook (1.22 KB, patch)
2007-04-25 20:41 UTC, Jim R. Wilson
Details
Patch to add hook with all three params + hooks.txt and RELEASE-NOTES updates (1.71 KB, patch)
2007-04-25 20:59 UTC, Jim R. Wilson
Details

Description Jim R. Wilson 2007-04-25 20:07:50 UTC
As per the instructions in Semantic's INSTALL file:

Edit the file [wikipath]/includes/Parser.php. Insert the line
  wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text, null ) );
in the method "internalParse" right after the line
  $text = $this->replaceVariables( $text, $args );

This is the only hack required for full functionality of Semantic MW -
everything else is already achievable with existing hooks.

I will attach a patch shortly (from revision 20529).
Comment 1 Jim R. Wilson 2007-04-25 20:10:48 UTC
Created attachment 3525 [details]
Patch to add hook + documentation

Adds InternalParseBeforeLinks as per Semantic's INSTALL instructions.
Comment 2 Jim R. Wilson 2007-04-25 20:40:50 UTC
Comment on attachment 3525 [details]
Patch to add hook + documentation

Index: docs/hooks.txt
===================================================================
--- docs/hooks.txt	(revision 20529)
+++ docs/hooks.txt	(working copy)
@@ -388,6 +388,12 @@
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getFullURL()

+'InternalParseBeforeLinks': during Parser's internalParse method before links
but
+after noinclude/includeonly/onlyinclude and other processing.
+&$this: Parser object
+&$text: string containing partially parsed text
+&$this->mStripState: Parser's internal StripState object
+
 'LogPageValidTypes': action being logged. DEPRECATED: Use $wgLogTypes
 &$type: array of strings

Index: includes/Parser.php
===================================================================
--- includes/Parser.php (revision 20529)
+++ includes/Parser.php (working copy)
@@ -1000,6 +1000,7 @@
		$text = Sanitizer::removeHTMLtags( $text, array( &$this,
'attributeStripCallback' ) );

		$text = $this->replaceVariables( $text, $args );
+		wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text,
&$this->mStripState ) );

		// Tables need to come after variable replacement for things to
work
		// properly; putting them before other transformations should
keep
Comment 3 Jim R. Wilson 2007-04-25 20:41:31 UTC
Created attachment 3526 [details]
Patch to add hook

Better patch - now adds documentation in docs/hooks.txt
Comment 4 Jim R. Wilson 2007-04-25 20:59:21 UTC
Created attachment 3527 [details]
Patch to add hook with all three params + hooks.txt and RELEASE-NOTES updates

Thanks in advance to the dev that can commit this. :)
Comment 5 Jim R. Wilson 2007-04-25 21:38:56 UTC
Fixed in rev 21592

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


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011