My Versions: MediaWiki: 1.16.5, PHP: 5.2.17, MySQL: 5.1.61

Centre Align Column in TableEdit

I have a table like this. How can I horizontally centre align the text in the Price column?

{| class="wikitable"
! Product
! Code<br/>
! Stock<br/>
! Price (not incl. [[Shipping Rates|Shipping]])
! Description
| WWE Raw 1993 Bluray (Complete Season)
| R1<br/>
| In Stock<br/>
| £10
| Red disc

External Links - Dissalow for everyone except AdminsEdit

I have a music wiki but I also have links within the wiki to MP3s on the site (not stored within the wiki). For security reasons I want to block people from adding external links but I want to allow links to YouTube. So I would like to be able to configure a list of domains that are allowed to be linked to.

With SpamRegex I can block external links like below, however it also blocks admins such as myself. Is there any way via an extension or otherwise that I can allow myself to add external links?

They also shouldn't be able to modify existing external links that I've posted.

# Block ALL external links
$wgSpamRegex = "/http:\/\//";

I would also like to be able to hide a list of links like you can with a soundtrack table. However will this be less search engine friendly?

I would want to allow YouTube links however or be able to enter domains which can be linked to.


Do search engines see the username links on forum pages?

Google CheckoutEdit

I want an add to cart button similar to the example below but with no menu - it justs add 1 item to the cart for the price I specify. I would like to add the weight of the item to the button.

Add to Cart Button

<html><input value="52" class="product-price" type="hidden"><input value="Product Name" class="product-title" type="hidden"><select class="product-attr-custom"><option selected="selected" googlecart-set-product-price="52" value="European Union">European Union: £52</option><option googlecart-set-product-price="58" value="Rest of the World">Rest of the World: £58</option></select></html>

View Cart Button

Below is my current View Cart Button. I would like for the cart to determine the shipping price to be added onto the price of the item(s) based on the weight of all the items in the cart. I should be able to enter a shipping price for the UK and a differnet shipping price for the rest of the world. I would also like the cart to be be able to determine what country the buyer is in so it automatically shows the buyer the correct shipping price. If that's not possible then I could have a drop-down menu in the add-to-cart button showing an option for "UK" and "Rest of the World" and then the cart would know what shipping price to show. There should also be a minimum shipping fee.

<script id='googlecart-script' type='text/javascript' src='' integration='jscart-wizard' post-cart-to-sandbox='false' currency='GBP' productWeightUnits='KG'></script>


 .override #googlecart-widget-head {
   background-color: white; border: 0px dotted #AAAAAA


I would like to make it so that my cart will add a shipping price based on the total weight of all the items in the cart. How can I do that?

Hide Navigation Menu with ShortcutEdit

I added the Javscript on the following page:

This is what I added to MediaWiki:Common.js:

/** Hide Left Navigation when you press F11 *********************************************************

document.onkeydown = function( e ) {
        if( e == null ) e = event
        if( testKey( e, 122 ) ) { //F11
                appendCSS('#column-content {margin: 0 0 .6em 0;} #content {margin: 2.8em 0 0 0;} #p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search {display:none;} #p-cactions {left: .1em;} #footer {display:none;}');
                return false;

function testKey( e, intKeyCode ) {
        if( window.createPopup )
                return e.keyCode == intKeyCode
                return e.which == intKeyCode

/** Collapsible tables *********************************************************
 *  Description: Allows tables to be collapsed, showing only the header. See
 *  Maintainers: [[en:User:R. Koot]]
var autoCollapse = 2;
var collapseCaption = 'hide';
var expandCaption = 'show';
function collapseTable( tableIndex ) {
        var Button = document.getElementById( 'collapseButton' + tableIndex );
        var Table = document.getElementById( 'collapsibleTable' + tableIndex );
        if ( !Table || !Button ) {
                return false;
        var Rows = Table.rows;
        if ( == collapseCaption ) {
                for ( var i = 1; i < Rows.length; i++ ) {
                        Rows[i].style.display = 'none';
       = expandCaption;
        } else {
                for ( var i = 1; i < Rows.length; i++ ) {
                        Rows[i].style.display = Rows[0].style.display;
       = collapseCaption;
function createCollapseButtons() {
        var tableIndex = 0;
        var NavigationBoxes = new Object();
        var Tables = document.getElementsByTagName( 'table' );
        for ( var i = 0; i < Tables.length; i++ ) {
                if ( hasClass( Tables[i], 'collapsible' ) ) {
                        /* only add button and increment count if there is a header row to work with */
                        var HeaderRow = Tables[i].getElementsByTagName( 'tr' )[0];
                        if ( !HeaderRow ) {
                        var Header = HeaderRow.getElementsByTagName( 'th' )[0];
                        if ( !Header ) {
                        NavigationBoxes[tableIndex] = Tables[i];
                        Tables[i].setAttribute( 'id', 'collapsibleTable' + tableIndex );
                        var Button = document.createElement( 'span' );
                        var ButtonLink = document.createElement( 'a' );
                        var ButtonText = document.createTextNode( collapseCaption );
                        Button.className = 'collapseButton'; // Styles are declared in [[MediaWiki:Common.css]]
                        ButtonLink.setAttribute( 'id', 'collapseButton' + tableIndex );
                        ButtonLink.setAttribute( 'href', "javascript:collapseTable(" + tableIndex + ");" );
                        ButtonLink.appendChild( ButtonText );
                        Button.appendChild( document.createTextNode( '[' ) );
                        Button.appendChild( ButtonLink );
                        Button.appendChild( document.createTextNode( ']' ) );
                        Header.insertBefore( Button, Header.childNodes[0] );
        for ( var i = 0;  i < tableIndex; i++ ) {
                if ( hasClass( NavigationBoxes[i], 'collapsed' ) || ( tableIndex >= autoCollapse && hasClass( NavigationBoxes[i], 'autocollapse' ) ) ) {
                        collapseTable( i );
                } else if ( hasClass( NavigationBoxes[i], 'innercollapse' ) ) {
                        var element = NavigationBoxes[i];
                        while ( element = element.parentNode ) {
                                if ( hasClass( element, 'outercollapse' ) ) {
                                        collapseTable( i );
addOnloadHook( createCollapseButtons );
/** Test if an element has a certain class **************************************
 * Description: Uses regular expressions and caching for better performance.
 * Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
var hasClass = ( function() {
        var reCache = {};
        return function( element, className ) {
                return ( reCache[className] ? reCache[className] : ( reCache[className] = new RegExp( "(?:\\s|^)" + className + "(?:\\s|$)" ) ) ).test( element.className );

However when I press F11 it shows the site in Fullscreen and it doesn't hide the menu.


As far as I know my htaccess file is correct. So why when I opened cPanel's Hotlink Protection page and I added zip did it give an error and remove my hotlink protection rules?

Need correct htacess file. Also need to prevent Google showing links to non-existent pages in search. Also prevent it showing links to file directories. Also get links already shown in search removed.

Should I have an htaccess file in my public html folder in addition to my domain folder?

Non-Existant Pages show in GoogleEdit

Can I just Right-click the Music folder in cPanel and choose Managed Indexing. Then disable indexing so people can't see the files when browsing that directory on my website. Will that prevent the files showing in Google?

Searching for: Baroque (Saturn) Original Soundtrack on Google will show both the page name and a page with nothing on it. Searching for Time Stalkers (Dreamcast) Climax Landers Original Soundtrack takes me to directory of that soundtrack Searching for Sakura Taisen 5 Episode 0 - Samurai Girl of the Wild West takes me to directory.

Search Google for "Busin - Wizardry Alternative Original Soundtrack Album" to make sure a non-existent page in my site doesn't come up. 25th March = it did show up. Test again on 25th April

I couldn't find an answer about wildcards when searching on Google.

Is this the correct way to disallow crawling of pages which have "Template" at the start of the page name?

Disallow: /Template*

So would the above also prevent pages which have the following at the start of their names from being crawled?

Template: Template_talk:

Also I have a directory in the root of my site called "Game Music" which has subfolders with MP3s in (there are no webpages inside it). Google is showing non-existant pages from that directory in search results when I search for an album name. For example, try searching for the following on Google: Baroque (Saturn) Original Soundtrack

On the 1st results page you'll see 2 links to my site. The 1st link takes you to the actual page I have made. The 2nd link takes you to a non-existant page called: "Game Music/B/Baroque/001. Baroque (Saturn) Original soundtrack"

The 1st page has download links to MP3s in the following location: "Game Music/B/Baroque/001. Baroque (Saturn) Original soundtrack"

Forgetting about the robots file for a second, why is google showing non-existant pages in search results? I use MediaWiki which is the software that Wikipedia uses to build it's website. I don't know if this is the correct term or not, but the pages are virtual paths - the pages are stored in an MySQL database - does this have something to do with the problem?

I tried the following a month ago but the non-existant pages are still showing in search results:

Disallow: /Game Music/

Is there a problem with there being a space in the directory name?

Would this work to block everything in that directory from being indexed?

Disallow: /Game*

Rating BarEdit

1. I want to be able to list soundtracks which have 2000 tag or 2001 tag. So I can display 1 list of everything with those tags. I also want to be able to not have the namespace show in top lists such as in the wanted section. Get Yahoo Media Player to work in Mediawiki

2. Is there any way to have a setting in a rating list so I could have it sorted by alphabetical order instead of having to click the sort button?

3. Also at the moment I've got my list in the following order: Rating, Page Name, Vote Count. Is there anyway I could add numbering to the list so I could have a top chart list like this:

1, Rating, Page Name 1, Vote Count 2, Rating, Page Name 2, Vote Count

So the highest rated page will have the number 1 next to it, the next highest has number 2 and so on.

4. Also when you look at a page with a rating bar on it is says the 70 instead of 70% for example. I would like it to show the percentage sign

5. I only allow people who are in a donator group to vote. However I would like to allow all users to vote in a specific namespace.

6. I would like to remove the namespace prefix from pages in top lists

Search Doesn't Work ProperlyEdit

When searching for a word the search results don't return the most relevant results instead the relevance is in order of the page creation date. Is this normal behaviour? Is there any way I can fix it?

Some examples:

Searching for "Puzzle Bobble" doesn't show "Puzzle Bobble" at the top. Searching for "Mission" doesn't show "Mission Impossible" at the top. Searching for "Last Battle" doesn't show "Last Battle" at the top. It only appears on the 2nd page of the search results.

Mission Impossible is not at the top Searching for last battle doesn't show this page: Last Battle Soundtrack, The (SNES) The Last Battle Game Music. Searching for Last story doesn’t show Last Story at the top Searching for Lagoon doesn't show Lagoon at the top. It's in order of page creation Searching for like life isn't at top of the page megami tensei nine = at bottom of page puzzle bobble = at bottom of page

Extension:MWSearch is that Wikipedia uses but that relies on Extension:Lucene-search which is too difficult to install.


I want the sort extension fixed so it does actually list stuff in order