Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2519
SpecialTemplatePrefix.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 8:59 PM
2014-11-21 20:59:42 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
SpecialTemplatePrefix.patch
View Options
Index: phase3/includes/Parser.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Parser.php,v
retrieving revision 1.553
diff -u -r1.553 Parser.php
--- phase3/includes/Parser.php 30 Dec 2005 11:10:51 -0000 1.553
+++ phase3/includes/Parser.php 31 Dec 2005 19:05:30 -0000
@@ -2458,6 +2458,19 @@
}
}
+ # Variable/template prefix hooks
+ # $part1 is the name (foo:bar)
+ # $args is anything afterwards
+ # $hook_ret is your parsed value
+ # $noparse is whether we shouldn't parse further (default to fal
se)
+ # $nowiki is if the content isn't wikitext (default to false)
+ # We can't use the MagicWord pattern established above because we don't know which ones we should do.
+ $hook_ret = '';
+ if ( !$found && !wfRunHooks('ParserHandleSpecialPrefix', array($part1, $args, &$hook_ret, &$noparse, &$nowiki))) {
+ $text = $linestart . $hook_ret;
+ $found = true;
+ }
+
# Template table test
# Did we encounter this template already? If yes, it is in the cache
Index: phase3/includes/SpecialVersion.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/SpecialVersion.php,v
retrieving revision 1.37
diff -u -r1.37 SpecialVersion.php
--- phase3/includes/SpecialVersion.php 29 Dec 2005 20:27:25 -0000 1.37
+++ phase3/includes/SpecialVersion.php 31 Dec 2005 19:05:30 -0000
@@ -100,6 +100,7 @@
'specialpage' => 'Special pages',
'parserhook' => 'Parser hooks',
'variable' => 'Variables',
+ 'prefix' => 'Special prefixes',
'other' => 'Other',
);
wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2095
Default Alt Text
SpecialTemplatePrefix.patch (2 KB)
Attached To
Mode
T6294: Special template prefix extensions
Attached
Detach File
Event Timeline
Log In to Comment