Extension talk:Interwiki/Archive 1

Just a note to say that this works with 1.5 too! Thanks.

Database?
Maybe I'm doing something wrong, but is it supposed to produce the database tables for me, or do I have to create them? I keep getting errors that the table it wants doesn't exist. I don't mind editing them manually, but there doesn't appear to be any instructions for doing so... --69.250.40.75 03:09, 23 December 2005 (UTC)

Function error
Doesn't work in the new version(1.5.7) of wikimedia.

I get Fatal error: Call to undefined function: includable in /extensions/SpecialInterwiki.php on line 65 --Sgrayban 14:37, 24 March 2006 (UTC)


 * Me too, but mine's: Fatal error: Call to a member function on a non-object in /includes/SkinTemplate.php on line 306 - 154.20.86.196 05:25, 16 April 2006 (UTC)
 * Me too - Mediawiki 1.6.3, php 5.1.2, my error is: PHP Fatal error: Call to a member function getID on a non-object in /usr/local/www/data-dist/mediawiki/includes/SkinTemplate.php on line 306, referer: http://wiki.bitparts.org/index.php/Special:Specialpages 71.11.157.24 04:32, 20 April 2006 (UTC)
 * I also get this error: Fatal error: Call to a member function on a non-object in /includes/SkinTemplate.php on line 306 --68.220.84.93 21:29, 21 April 2006 (UTC)

Security fixes
The original version of this code had some bugs, including some security issues:
 * cross-site request forging
 * cross-site scripting via HTML/JavaScript injection
 * SQL injection

Additionally some of the HTML output wasn't well-formed so it would break XML-strict browsers when the wiki is configured for sending the 'real' XHTML Content-Type.

I've made some corrections to the copy on the wiki page:
 * Use of the edit token to protect against forged form submissions
 * Escaping of HTML output to protect against JavaScript injection/XSS
 * Switched from manual SQL (missing escaping) to the database query builder functions which provide safety automatically

Also the bug running on current 1.6 versions is fixed by adding the call to $this->setHeaders. --brion 08:26, 22 April 2006 (UTC)

SVN?
Anyone know what the process is on getting this into svn? It seems it would be of much more benefit there. --Ymmotrojam 17:47, 17 August 2006 (UTC)
 * Seconded. This is such a basic feature it ought to be at least in the Extensions Subversion repository, and probably in the main SVN. I don't know how to request that but I imagine Bugzilla is as good a way as any. Unfortunately Wikimedia's Bugzilla is down right now. --Kingboyk 17:31, 4 January 2007 (UTC)

Read-only version
Upon reflection, this doesn't really fulfill my need. To manipulate the interwiki list I just use phpMyAdmin or MS Access. What I would like - and I think this ought to be built-in Mediawiki - is a read-only list of interwiki links for the benefit of the users.

Anyway I'll have a play and maybe will come up with something I can post back here. --Kingboyk 19:59, 4 January 2007 (UTC)
 * OK, it's read only for those without privileges ("developer" group in my install). Works fine on 1.8.2 (r18799). --Kingboyk 20:15, 4 January 2007 (UTC)

Dutch translation
If you are interested in more translations, this is the Dutch (nl) translation: $wgSpecialInterwikiMessages['nl'] = array(       'interwiki' => 'Interwikidata bekijken en wijzigen',        'interwiki_delquestion' => '"$1" aan het verwijderen',        'interwiki_deleted' =>  '$1 is succesvol verwijderd van de interwikitabel.',        'interwiki_prefix' => 'Prefix',        'interwiki_prefix2' => 'Prefix:',        'interwiki_url' => 'URL',        'interwiki_local' => 'Local',        'interwiki_trans' => 'Trans',        'interwiki_delete' => 'Verwijderen',        'interwiki_yes' => 'Ja',        'interwiki_delfailed' => '$1 kon niet worden verwijderd van de interwikitabel.',        'interwiki_added' => '$1 is succesvol toegevoegd aan de interwikitabel.',        'interwiki_addfailed' => '$1 kon niet worden toegevoegd aan de interwikitabel.',        'interwiki_log_added' => 'Voegde "$1" ($2) (local: $3) (trans: $4) toe aan de interwikitabel: $5',        'interwiki_alreadyexists' => '$1 bestaat al in de interwikitabel!', 'interwiki_log_deleted' => 'Verwijderde prefix "$1" van de interwikitabel: $2', 'interwiki_add' => '*Een interwikiprefix toevoegen', 'interwiki_show' => '*Alle interwikiprefixen bekijken', 'interwiki_logpagename' => 'Logboek interwikitabel', 'interwiki_logpagetext' => 'Dit is een logboek van wijzigingen aan de interwikitabel.', 'interwiki_logentry' => '', 'interwiki_reasonfield' => 'Reden', 'interwiki_addtext' => 'Een interwikiprefix toevoegen', 'interwiki_delbutton' => 'Verwijderen', 'interwiki_addbutton' => 'Toevoegen', SPQRobin 12:51, 2 September 2007 (UTC)

How to add the translation file
I've added the SpecialInterwiki.i18n.php file, and I have to change something in the SpecialInterwiki.php file, but I don't know what. The information for this is unclear :-( SPQRobin 14:09, 22 September 2007 (UTC)


 * The necessary update to SpecialInterwiki.php is presented as a diff(1) - and not even one in unified format -, so I agree, it's unclear. Basically, though, all you need to do is replace the two blocks of lines marked with exclamation marks with the versions below. First of all,


 * becomes


 * And second, the entire block of $wgMessageCache->addMessage calls get replaced by:


 * Hope this helps. :) (Assuming you still need help with this, but if not, well, maybe the next person who's got the same problem will find this useful.) -- Schneelocke 17:33, 10 October 2007 (UTC)
 * This works. Thanks! SPQRobin 15:46, 12 October 2007 (UTC)

Suggestions
Here's a few things I'd suggest for this extension - any thoughts?


 * The warning message for empty interwiki tables should use the message cache.
 * The i18n patch should be integrated into the file.
 * The "add" form for new interwiki prefixes needs to be de-uglified.
 * The "add successful" message should present the interwiki table again for further edits (having to go back in your browser is annoying and breaks your workflow).

-- Schneelocke 17:41, 10 October 2007 (UTC)


 * I agree with you, except the i18n file should stay separately from the main file, but it should be mentioned in the main file by default (so there aren't problems like mine above :p). SPQRobin 15:46, 12 October 2007 (UTC)