User talk:Joe Beaudoin Jr.: Difference between revisions

Discussion page of User:Joe Beaudoin Jr.
m (Archiving 3 thread(s) (older than 10d) to User talk:Joe Beaudoin Jr./Archive6.)
Line 8: Line 8:


{{newsection link}}
{{newsection link}}
== Times publicity ==
Do you guys run statistics software (e.g. AWStat) that can tell whether we've gotten any more traffic from timesonline.co.uk due to their coverage of us? --[[User:Catrope|Catrope]]<sup>([[User talk:Catrope|Talk to me]] or [[Special:Emailuser/Catrope|e-mail me]])</sup> 16:25, 19 August 2007 (CDT)
: I just checked. We have Webalizer installed and monitoring frakr.com, but we never enabled it for the battlestarwiki.org, more out of laziness if anything... and the fact that we had to disable the stats software on our old, old server when the site was being besieged. I've just enabled it now, since we can handle it now. So we'll see. -- [[User:Joe Beaudoin Jr.|Joe Beaudoin]] <sup>[[User talk:Joe Beaudoin Jr.|So say we all]] - [[Battlestar Wiki:Site support|Donate]] - [http://www.sanctuarywiki.org Sanctuary Wiki &mdash; ''New'']</sup> 16:32, 19 August 2007 (CDT)
::I had to add that to the "news" on the Main Page. We don't get that much opportunity for self-aggrandizement, and the wiki community should be proud to be noticed. :) --[[User:Spencerian|Spencerian]] 20:14, 19 August 2007 (CDT)
:::Cool. :-) -- [[User:Joe Beaudoin Jr.|Joe Beaudoin]] <sup>[[User talk:Joe Beaudoin Jr.|So say we all]] - [[Battlestar Wiki:Site support|Donate]] - [http://www.sanctuarywiki.org Sanctuary Wiki &mdash; ''New'']</sup> 21:51, 19 August 2007 (CDT)
== Saw your note on marveldatabase ==
Hi Joe,
long time no chat.  I see you've been busy - I'm an avid reader of your blog.
I saw your comments about our new skins at marveldatabase.com.  I'd be happy to walk you through all the current functionality and the new stuff that's coming too!
[http://world.wikia.com/wiki/User:Gil Gil] ([http://world.wikia.com/wiki/User_talk:Gil Talk ]) from Wikia
: Hi Gil! I've replied on your World Wikia page, [http://world.wikia.com/wiki/User_talk:Gil#Marvel_Database_Skin_and_other_things here]. -- [[User:Joe Beaudoin Jr.|Joe Beaudoin]] <sup>[[User talk:Joe Beaudoin Jr.|So say we all]] - [[Battlestar Wiki:Site support|Donate]] - [http://www.sanctuarywiki.org Sanctuary Wiki &mdash; ''New'']</sup> 17:54, 20 August 2007 (CDT)
== Foreign Wikis ==
I thought you might wanna know the following things:
* The Chinese Wiki is [http://zh.battlestarwiki.org/wiki/%E9%A6%96%E9%A1%B5 not working]. You (or Shane) might wanna check whether it's running the latest version of MediaWiki (1.10), 'cause AFAIK the cur table (which the error message complains is missing) is something of the past. I'll check mediawiki.org later, as it's offline now.
* The [[fr:|French Wiki]] is at 93 articles now, nice addition to our milestone list ;)
--[[User:Catrope|Catrope]]<sup>([[User talk:Catrope|Talk to me]] or [[Special:Emailuser/Catrope|e-mail me]])</sup> 09:09, 23 August 2007 (CDT)
: The Chinese Wiki has been a known issue; something occurred with the databases it used when we've upgraded to 1.10. Just FYI, all the wikis run 1.10, since we use only one instance of the software (via symlinking), and when that instance is updated, all the wikis are simultaneously updated. Shane was trying to figure it out, and it's something on my list, but it's a low priority for me at the present time. (We may just take it offline until further notice.) -- [[User:Joe Beaudoin Jr.|Joe Beaudoin]] <sup>[[User talk:Joe Beaudoin Jr.|So say we all]] - [[Battlestar Wiki:Site support|Donate]] - [http://www.sanctuarywiki.org Sanctuary Wiki &mdash; ''New'']</sup> 10:31, 23 August 2007 (CDT)
::I see. You might wanna check whether you've got the settings right, i.e. that the bsgwiki_zh database actually exists, that the table names aren't prefixed, etc. If the nonexistent cur table proves to be your only problem, you could ask the folks on the #mediawiki channel on FreeNode for SQL code that'll create an empty cur table (it needn't have any content; since 1.5, all that info is stored in the page table). --[[User:Catrope|Catrope]]<sup>([[User talk:Catrope|Talk to me]] or [[Special:Emailuser/Catrope|e-mail me]])</sup> 10:52, 23 August 2007 (CDT)
:::I recreated the cur file from an old mediawiki install. That seems to have worked. Thanks! :-) -- [[User:Joe Beaudoin Jr.|Joe Beaudoin]] <sup>[[User talk:Joe Beaudoin Jr.|So say we all]] - [[Battlestar Wiki:Site support|Donate]] - [http://www.sanctuarywiki.org Sanctuary Wiki &mdash; ''New'']</sup> 12:13, 23 August 2007 (CDT)


== Feelin' Chicken ==
== Feelin' Chicken ==

Revision as of 20:08, 4 September 2007


Feelin' Chicken

8) Shane (T - C - E) 10:44, 27 August 2007 (CDT)

Indeed. -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 10:58, 27 August 2007 (CDT)

SkinTemplate.php

Nice job on the image tabs. If you can provide a diff between the MediaWiki 1.10 version of SkinTemplate.php and your modified version, I may be able to add this feature in MediaWiki 1.11 (I have commit access to the MediaWiki SVN). I may also be able to find a cleaner way of translating Bild: back to Image: (which should be possible). --Catrope(Talk to me or e-mail me) 16:24, 27 August 2007 (CDT)

Actually, all the work I did is between lines 801 and 889 of the file. I did not modify anything else outside that. Of course, any ways you can find to improve the addition would be great -- and even more so if you can get something like this committed in the next MediaWiki release. ;-) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 17:15, 27 August 2007 (CDT)
:o Commit Access? I been trying to get that for a while. Shane (T - C - E) 00:48, 28 August 2007 (CDT)
Whether you get it depends on what you want it for. Before summer break I've been helping out Yuri Astrakhan with his bot API (I intend to continue doing so now that school has started again), and at a certain point in time he suggested I start a new branch (called apiedit) for state-changing actions in the API and he requested commit access for me. Anyway, I'll look at ll. 801-889 some day this week and see if I can improve anything. When I'm done improving and all, I'll commit it to the trunk (mentioning your name, of course). Note, though, that it's possible some top guy at MediaWiki (like Rob Church, who is essentially in command of the MediaWiki code) decides this addition doesn't belong in the trunk (should be an extension or something like that) and takes it out again. Whatever happens, I'll keep you updated on the fate of your writing. --Catrope(Talk to me or e-mail me) 09:16, 28 August 2007 (CDT)

I've had a quick look at your code, and I think I can generalize it and make it easily configurable for other wikis. However, I have one question:

if ( !$istalk || $wgOut->showNewSectionLink() ) {
        if ( $isimage == NS_IMAGE || $wgOut->showNewSectionLink() ) {

This if construct looks very weird to me. Firstly, all talk pages show new section links, so the first if() doesn't exclude any pages at all. The second if() restricts the tabs to only those pages that are in the Image: namespace OR have a new section link (the + next to the edit tab) on them (i.e. all talk pages). In some weird way these tabs don't appear on all talk pages, so I'm missing something here. Could you explain why you wrote this if construct the way you wrote it and didn't just use

if($this->mTitle->getNamespace() == NS_IMAGE) {

? --Catrope(Talk to me or e-mail me) 08:20, 30 August 2007 (CDT)

That was a remnant of a test I was conducting... but I'm not sure now what exactly I was testing, only that something was being tested. (I think I was concerned about the tabs being repeated on the talk page as well, but seeing as the second if deals with that as well, it is, as you say, redundant.) You can remove it.
Coincidentally, I was thinking... is there a way to convert the links section on the image description page so that it can read the imagelinks table off the other databases? Ultimately, what I want is to show where the image is used across all wikis, regardless of what wiki the user is currently on. -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 11:46, 30 August 2007 (CDT)
The best way to do that is probably to write a simple PHP script that queries the imagelinks tables in all DBs and prints a (linked) list of titles that use a certain image. A link to this PHP script could then be added to the image tagging template(s). I would advise against trying to do this inside the MediaWiki code.
Meanwhile, I've rewritten your code to be much shorter and much easier to adapt to someone else's needs:
/**
 * Interwiki tabs above Image: pages
 * Original code by Joe Beaudoin Jr. from www.battlestarwiki.org (joe(AT)frakmedia(DOT)net)
 * Modified for more generic usage by Roan Kattouw (AKA Catrope) (roan(DOT)kattouw(AT)home(DOT)nl)
 * If you want to use this, you need to set $wgEnableInterwikiImageTabs to true in LocalSettings.php
 */
global $wgEnableInterwikiImageTabs, $wgInterwikiImageTabs;
if($wgEnableInterwikiImageTabs && $this->mTitle->getNamespace() == NS_IMAGE)
{
        $i = 0;
	foreach($wgInterwikiImageTabs as $prefix => $caption)
	{
		// Go to prefix:Image:title. Image: is automatically translated if necessary.
		$titleObj = Title::newFromText($prefix . ":Image:" . $this->mTitle->getText());
		if($titleObj->getFullURL() != $this->mTitle->getFullURL()) // Don't link to ourselves
			$content_actions['interwikitab-'.$i++] = array(
				'class' => false,
				'text' => $caption,
				'href' => $titleObj->getFullURL()
			);
	}
}
The two $wg* variables need to be set in LocalSettings.php, like so:
$wgEnableInterwikiImageTabs = true;
$wgInterwikiImageTabs = array('en' => 'English', 'de' => 'Deutsch', 'media' => 'Media repository');
The text before the => sign is the interwiki prefix to link to, the text after it is the tab caption. The code also checks whether one of the tabs links to the page currently being viewed, and hides it if so. In other words, the "Deutsch" tab won't show up when viewing an image on de:. --Catrope(Talk to me or e-mail me) 14:02, 30 August 2007 (CDT)
I'll file an enhancement request at MediaZilla tomorrow, so the MediaWiki community can decide whether this belongs in the trunk. It's possible that it has to go in an extension instead, in which case you and I will be able to call ourselves extension maintainers ;) Whatever happens, I'll keep you posted. --Catrope(Talk to me or e-mail me) 14:02, 30 August 2007 (CDT)
I've sent you an e-mail at your frakmedia.net address. Please read it and reply. --Catrope(Talk to me or e-mail me) 16:27, 30 August 2007 (CDT)
You've got mail. ;-) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 17:11, 30 August 2007 (CDT)

The extension has gone live. You can find it in SVN here, and the associated page on MediaWiki is here. --Catrope(Talk to me or e-mail me) 11:07, 31 August 2007 (CDT)

Sweet! W00t! :-) -- Joe Beaudoin So say we all - Donate - Sanctuary Wiki — New 11:29, 31 August 2007 (CDT)