User "NeilK" changed the status of MediaWiki.r90526.

Old Status: new
New Status: fixme

User "NeilK" also posted a comment on MediaWiki.r90526.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90526#c18600
Commit summary:

add hook and function for rewriting links external links to have a link to the 
archived version

Comment:

1) don't use a global for $wgWhatToCallArchive -- what you want to do is create 
your own messages file and then the translatewiki people will pick that up and 
add the translations for you. 

- create a ArchiveLinks.i18n.php file (look at others for what they're supposed 
to look like... just start the english section, others will add more)
- in ArchiveLinks.php, add your .i18n.php to 
$wgExtensionMessagesFiles['ArchiveLinks'] 
- use wfMsg() to get the string into your HTML

More info here - http://www.mediawiki.org/wiki/Localisation

Hopefully, this is the one and only thing you have to localize, though.

2) Some people prefer it if you use the includes/Html.php functions to create 
all your HTML. Less chance of someone sneaking evil HTML into your code. It can 
be super-verbose. You'll have an easier time with production review if you do 
it that way.

3) You've added two config globals so far. Not a serious problem, but try to 
avoid adding globals... one way is to have a global like $wgArchiveLinksConfig 
that is an array of values, you can add anything into that.


_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to