Extension talk:WhiteList

Resolved Issues
''' This page contains only unresolved issues. Visit the archive to see issues which have been resolved. '''

Question:
Hi, I'm sorry for this question, but what are you talking about? I can't find any file called Common.css or Common.js in my MediaWiki Installation folder. I'm using MediaWiki Version 1.13 -- kMax, 14:16, 28 August 2008 (UTC)
 * What are the exact names of the files?
 * Where should I find them?
 * Why do I have to edit them?
 * They aren't files, they are pages. Type Mediawiki:Common.js or Mediawiki:Common.css into your wiki's search bar, click 'go', edit the page, and the sections shown below. You need to edit the files to enable the show/hide functionality we take advantage of. --Msul01 14:28, 28 August 2008 (UTC)
 * Hi Msul01, thank you for answering! -- kMax 11:46, 29 August 2008 (UTC)

''Verify that your MediaWiki:Common.css and MediaWiki:Common.js pages contain a section on Dynamic Navigation Bars. If they do not, or if those pages simply do not exist, then copy the pages from Wikipedia MediaWiki:Common.css and MediaWiki:Common.js.''
 * Huh? Not even the MediaWiki:Common.css has a section about Dynamic Navigation Bars currently. Also, I think we should suggest just copying that section, rather than the entire page. That can get too big, and there's a lot of extraneous extensions that are not installed on smaller Wikis. --Liface 12:18, 7 April 2008 (UTC)
 * Good point without any answer yet ?! Anyway to get it fixed ? --MoBO 16:48, 11.07.2008 (GMT+1)
 * Here are the sections in question. I'll add them to the main page with better instructions, but could someone make sure that only including these sections works? We should update these to use collapsable tables instead, since NavFrame was deprecated in favor of Collapsible_tables in Nov. 2007. (This explains why these sections were removed from Wikipedia's Common.css/js files... --Msul01 14:39, 23 July 2008 (UTC)

Common.css
/* Standard Navigationsleisten, aka box hiding thingy from .de. Documentation at NavFrame. */ div.Boxmerge, div.NavFrame { margin: 0px; padding: 4px; border: 1px solid #aaa; text-align: center; border-collapse: collapse; font-size: 95%; } div.Boxmerge div.NavFrame { border-style: none; border-style: hidden; } div.NavFrame + div.NavFrame { border-top-style: none; border-top-style: hidden; } div.NavPic { background-color: #fff; margin: 0px; padding: 2px; float: left; } div.NavFrame div.NavHead { height: 1.6em; font-weight: bold; background-color: #ccf; position:relative; } div.NavFrame p { font-size: 100%; } div.NavFrame div.NavContent { font-size: 100%; } div.NavFrame div.NavContent p { font-size: 100%; } div.NavEnd { margin: 0px; padding: 0px; line-height: 1px; clear: both; } a.NavToggle { position:absolute; top:0px; right:3px; font-weight:normal; font-size:smaller; }

Common.js
/** Dynamic Navigation Bars (experimental) ************************************* * *  Description: See NavFrame. * Maintainers: UNMAINTAINED */ // set up the words in your language var NavigationBarHide = '[' + collapseCaption + ']'; var NavigationBarShow = '[' + expandCaption + ']'; // shows and hides content and picture (if available) of navigation bars // Parameters: //    indexNavigationBar: the index of navigation bar to be toggled function toggleNavigationBar(indexNavigationBar) {    var NavToggle = document.getElementById("NavToggle" + indexNavigationBar); var NavFrame = document.getElementById("NavFrame" + indexNavigationBar); if (!NavFrame || !NavToggle) { return false; }    // if shown now if (NavToggle.firstChild.data == NavigationBarHide) { for (                var NavChild = NavFrame.firstChild;                 NavChild != null;                 NavChild = NavChild.nextSibling             ) { if ( hasClass( NavChild, 'NavPic' ) ) { NavChild.style.display = 'none'; }            if ( hasClass( NavChild, 'NavContent') ) { NavChild.style.display = 'none'; }        }     NavToggle.firstChild.data = NavigationBarShow; // if hidden now } else if (NavToggle.firstChild.data == NavigationBarShow) { for (                var NavChild = NavFrame.firstChild;                 NavChild != null;                 NavChild = NavChild.nextSibling             ) { if (hasClass(NavChild, 'NavPic')) { NavChild.style.display = 'block'; }            if (hasClass(NavChild, 'NavContent')) { NavChild.style.display = 'block'; }        }     NavToggle.firstChild.data = NavigationBarHide; } }  // adds show/hide-button to navigation bars function createNavigationBarToggleButton {    var indexNavigationBar = 0; // iterate over all -elements var divs = document.getElementsByTagName("div"); for(            var i=0;              NavFrame = divs[i];              i++         ) { // if found a navigation bar if (hasClass(NavFrame, "NavFrame")) { indexNavigationBar++; var NavToggle = document.createElement("a"); NavToggle.className = 'NavToggle'; NavToggle.setAttribute('id', 'NavToggle' + indexNavigationBar); NavToggle.setAttribute('href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');'); var NavToggleText = document.createTextNode(NavigationBarHide); for (                 var NavChild = NavFrame.firstChild;                  NavChild != null;                  NavChild = NavChild.nextSibling                 ) { if ( hasClass( NavChild, 'NavPic' ) || hasClass( NavChild, 'NavContent' ) ) { if (NavChild.style.display == 'none') { NavToggleText = document.createTextNode(NavigationBarShow); break; }                }             }             NavToggle.appendChild(NavToggleText); // Find the NavHead and attach the toggle link (Must be this complicated because Moz's firstChild handling is borked) for(              var j=0;                j < NavFrame.childNodes.length;                j++             ) { if (hasClass(NavFrame.childNodes[j], "NavHead")) { NavFrame.childNodes[j].appendChild(NavToggle); }            }             NavFrame.setAttribute('id', 'NavFrame' + indexNavigationBar); }    }  }  addOnloadHook( createNavigationBarToggleButton );

Error
I'm getting an error: Fatal error: Class 'SpecialUserStats' not found in C:\wamp\www\sicherheitselektronik\extensions\WhiteList\SpecialWhitelistEdit_body.php on line 428

I suppose this is because I didn't install GNUplot or Extension:UsageStatistics, however I don't want the calendar functionality enabled. How do I comment this out or disable it? --Liface 13:36, 7 April 2008 (UTC)
 * You are correct. This is because you did not install the UsageStatistics extension. Right now, there is no easy way to remove this dependency shy of changing the extension code. However, I will make this configurable in the next version of the extension. Please stay tuned for updates. --Gri6507 13:58, 7 April 2008 (UTC)
 * Ah, okay, I misunderstood the installation instructions. I installed UsageStatistics, but I still have this bug (which was present before): http://img150.imageshack.us/img150/1786/screenshotzl4.png. It seems to be just taking the text in the database instead of converting it into any meaningful format. Any ideas? --Liface 11:14, 8 April 2008 (UTC)
 * I wouldn't quite call it a bug; just a lack of functionality :-). The problem is that it doesn't appear that there are i18n translations available for your locale. What locale is your account set for? Take a look at SpecialWhitelistEdit.i18n.php to see which translations are already available. My guess is that this extension is still missing the translations for your locale. You are very welcome to create the translation yourself. It is very easy - simply follow the format you see in the file. When you have it finished, please post it here and I will submit it to SVN. --Gri6507 12:35, 8 April 2008 (UTC)
 * The requirement for the UsageStatistics extension has been made optional as of v0.8.6 --Gri6507 13:01, 14 April 2008 (UTC)

Error with Phrases in MediaWiki 1.12
I had a problem that non of the phrases showed up. I just got the <...> crap.

I tracked it down to this.

Error
In file includes/MessageCache.php, Line 712 and 713 use the variable '$messages'. This '$messages' varbible is pulled from the i18n file. The i18n file for this hack though uses the varible '$allMessages' and not '$messages' as it seems MediaWiki wants you to.

Fix
Open file SpecialWhitelistEdit.i18n.php and SpecialWhitelistEdit_body.php and replace all instances of '$allMessages' with '$messages'.

Good catch, thanks for providing the fix. There's a note in 1.9 saying that $allMessages is no longer needed, and someone probably pulled it out since then. We'll make this fix with the next update. --Msul01 14:43, 23 July 2008 (UTC)

generated user stylesheet is forbidden
Upon accessing a wiki using the restricted user, Firebug shows me two errors. One of them is invalid syntax at the doctype line, but it is not relevant.

The second error is while trying to load an external stylesheet. The URL is: index.php?title=-&action=raw&gen=css&maxage=18000&smaxage=0 I think it should be a good idea to let the restricted users access this CSS file.

--CrazyTerabyte 17:59, 13 August 2008 (UTC)

Localized namespaces
Currently, looks like the namespace names are not "normalized" (or whatever is the term for this) for different languages. I mean, my wiki has Portuguese as the default language. Then, I need to write this at my conf file: $wgWhitelistOverride['always']['read'] = array( "Especial:Userlogout" ); If I type "Special:Userlogout", then it does not work.

I wonder how hard things might become for users whose namespaces don't have plain ASCII chars.

I think it should be possible to normalize namespace names. --CrazyTerabyte 18:04, 13 August 2008 (UTC)

syntax error in SpecialWhitelistEdit_body.php
After activating the WhiteList extension in LocalSettings.php the following message occurs: Parse error: syntax error, unexpected '}' in /srv/www/htdocs/wiki/extensions/WhiteList/SpecialWhitelistEdit_body.php on line 755 But my SpecialWhitelistEdit_body.php does only contain 749 lines! cat SpecialWhitelistEdit_body.php | wc -l 749

I'm not closed enough to the php to fix it on my own. Sorry. --, KMax 09:47, 2 September 2008 (UTC)


 * What version of the extension was this regarding? Currently, in v 0.10.0, the file SpecialWhitelistEdit_body.php contains 747 lines. --Gri6507 20:51, 16 September 2008 (UTC)

Archive planning
We are currently maintaining compability for older versions of Mediawiki (1.9+, I think) in the current code. Several users have suggested branching for older versions, and removing code for backward compablity in an effort to keep the code base clean. See User_talk:Siebrand and User:Aaron Schulz's code review.

Updating site and future development plans
I am in the process of splitting the Extension:WhiteList page into multiple pages for the sake of readability. I have also posted a proposal for the next major revision of the extension on the future development page. Please take a look, comment, and/or volunteer to help us out. Thanks! --Msul01 22:55, 11 November 2008 (UTC)