Get our free book (in Spanish or English) on rainwater now - To Catch the Rain.

Appropedia:Site development/archive (Admin tasks)

From Appropedia
Revision as of 14:13, 2 November 2007 by Chriswaterguy (Talk | Contributions) (Image upload...: == Special license namespace(s) ==)

Jump to: navigation, search

Suggested tasks

Enable Firefox users to add an Appropedia search to their toolbar

Currently if viewing Appropedia, and you select "Add Appropedia (English)" from the search menu, it comes back with the warning:

Download error
Firefox could not download the search plugin from

--Chriswaterguy · talk 19:05, 6 March 2007 (PST)

Wohoo! I think it is fixed. The code is somewhat undeveloped, and I think that there may be some functionality built into mediawiki (since there is already atom and rss feeds) that we are not using. For now the additional fix came just from excluding the rewrite of opensearch_desc.php, by adding to .htaccess the following code-
RewriteCond %{REQUEST_URI} !^/opensearch_desc.php
--Lonny 17:27, 11 May 2007 (PDT)

Add bigger edit toolbar

Add bigger edit toolbar, like Wikipedia now has. This includes a redirect button, which I'd find useful. There might be other useful things to add as well, in future, so it would be good to document here. --Chriswaterguy · talk 17:34, 30 April 2007 (PDT)

List poisoning for the wiki and/or forum?

Only if it's easy... Is it worth doing list poisoningDEPRECATED TEMPLATE - PLEASE USE {{W}} INSTEAD. on the wiki and/or forum? This could possibly reduce the impact of email harvestingDEPRECATED TEMPLATE - PLEASE USE {{W}} INSTEAD. by reducing the value of any list of email addresses harvested from the site. Not sure if it would actually make a difference... It also assumes that some people will not adequately encrypt their email addresses - a safe assumption, especially if we assume that sophisticated email harvesting bots can figure out basic encryption (e.g. fred AT domain DOT com, or use of NOSPAM as part of the address). The relevant lists of email addresses would need to be somewhere that's not noticeable/obtrusive to a human web surfer.

It would also be a bit of a contribution by us to the global spam problem. --Chriswaterguy · talk 22:46, 17 May 2007 (PDT)

Image upload...

Image uploading needs a wizard, or at the very least some prominent warning notices. Images are being uploaded without license and attribution info.

At the Wikmedia Commons upload page, Commons:Project:Upload, questions are asked in large font. Hard to miss. And on clicking through (if logged in) a further warning in red stands out from the other text, saying "If you do not provide suitable license and source information, your file will be deleted without further notice. Thanks for your understanding."

--Chriswaterguy · talk 07:48, 2 November 2007 (PDT)

Special license namespaces

A special namespace for non-commercial licenses, we should port good, relevant pages.

We need to get legal advice, but we're thinking that non-GFDL licensed content would:

  • have a clear notice at the top which:
    • highlighting that "this doc is controlled by non GFDL licensing"
    • names and links to the applicable license
    • warns against need to be a note about copy/pasting content from the non-GFDL content into other (presumably GFDL) pages.

Special license namespace(s)

Special namespace(s) for valuable material only available under non-GFDL licenses. In particular for non-commercial licenses - e.g. FAO content falls under this category.

We need to get legal advice, but we're thinking that non-GFDL licensed content would:

  • have a clear notice at the top,
    • highlighting that "this doc is controlled by non GFDL licensing"
    • naming and linking to the applicable license
    • warning against copy/pasting content from the non-GFDL content into GFDL pages.
  • be protected from edits because "all contributions are GFDL", and the other license may not allow divs. (If the license does allow divs but is non-commercial, one option is to allow edits, with contributions falling under that license. My - Chriswaterguy's - initial thoughts are to maintain the focus on the more open pages, i.e. GFDL. We could just suggest that relevant info be quoted, but not excessively, and cited. Paraphrasing and taking the ideas are also acceptable - again, its by far the best approach to cite the source.)

Note, if it's protected, with a warning against copying large sections, then there shouldn't be any derivs being made, and the "no-derivs" versions shouldn't be an issue. I.e. don't need a separate namespace for CC-nc-nd-sa and CC-nc-sa.

Name: NC: for non-commercial?

Current Work

Completed Tasks

Make redirects show in italic on Special:Allpages

Done - the fix is in the Common.css file.

Import Images from WikiGreen

These steps were completed for integrating WikiGreen (ExportWIkiSite) into Appropedia (ImportWIkiSite), but could be used to upload many photos from any repository:

  1. download images folder from ExportWikiSite
  2. Remove unwanted folders, such as temp, archive and thumb (these will be recreated)
  3. Flatten directory
    • I know that there is some way to do this with tar, or recursive copy, but I gave up and downloaded the freeware xxcopy (
    • xxcopy "C:\ImageFolder" "C:\ImageFolderFlat" /SG
    • Make sure to use /SG the one normally suggested renames augments the filenames.
  4. Check for duplicates with ImportWikiSite
    • Rename any duplicates, then (if you are importing pages as well) find reference to the old name in the imported pages and change name to the new name.
  5. Use importImages.php
    • For some reason the version show php5 but commands were being executed by php4 so I used: /usr/local/php5/bin/php importImages.php --user=Lonny --comment="From via Eric Blazek" ../WGImgFlat png
    • Do this for each filetype, e.g. jpg, gif, etc.
  6. In addition, something happened to the importImages.php file in transport, so I redownloaded it, and everything worked.

Import Pages from another wiki

How did we do that?

Renaming a user

  1. Download the three files at
    • SpecialRenameuser.i18n.php, SpecialRenameuser.php, SpecialRenameuser_body.php
  2. Copy these three files to the /includes directory
  3. Download the ExtensionFunctions.php
  4. Copy the ExtensionFunctions.php to the main directory
  5. Add the following line to the LocalSettings.php near the other require_once lines.
    • include_once('includes/SpecialRenameuser.php'); #LRG 1_14_07 used for renaming users
  6. Log in and navigate to Special:Renameuser
  7. Manually move the Userpage and any Userpage/subpages.
I wrote this up in a more general form at
How to rewrite old signatures? A bot maybe.
See User:Chriswaterguy / User:Singkong2005 for an example.

Site Map

Must visit Special:GoogleSitemap&limit=5500 often. Change limit to meet number of pages we want indexed.

Interwiki map

See Appropedia:Admin_tasks/Interwiki_map.

Automatic Domain and Database Backups


ImageMap Extension

Available to Mediawiki version 1.9. Allows us to have our featured project image lead to the project rather than the image info.

  1. Make a directory in extensions: ImageMap
    mkdir ~/
  2. Download all files from subversion the newly created ImageMap directory.
  3. Add the following line to LocalSettings.php
    require_once( "$IP/extensions/ImageMap/ImageMap.php" );

Find more detailed information here

CategoryTree extension

Details and download:

Follow instructions in the README file.

Important: Change the file permissions recursively for extensions/CategoryTree.

chmod -R 771 CategoryTree

--GoodSignal 15:20, 29 April 2007 (PDT)

New User Welcome Message

New users that register an email are automatically sent a confirmation code to validate their address. This seems like the appropriate place to add general Welcome to information.

Edit the confirmation/welcome message here: MediaWiki:Confirmemail body

Short URLs

  • See wikimedia and
  • Set path in LocalSettings.php to $wgArticlePath = "/$1";
  • Added .htaccess to root with the following content
RewriteEngine on

# Don't rewrite requests for files in MediaWiki subdirectories,
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins|extensions)
RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/nowiki
# include these last two lines if you use the analog stats
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteCond %{REQUEST_URI} !^/stats

RewriteRule ^(.*)$ index.php?title=$1 [QSA]

Input box


Some specifics after installing AWstats. See for nice instructions.

MediaWiki Upgrade 1.9.2


Perl to run the page

perl /home/lonny1/awstats/tools/ -update \  -awstatsprog=/home/lonny1/awstats/cgi-bin/  -dir=/home/lonny1/

Changes to log file

LogFormat="%host %other %other %time1 %methodurl %code %bytesd %refererquot %uaquot"
DefaultFile="index.php index.html"

Cron -e

One every hour on the fifteen minute mark.

15 0 * * * perl /home/lonny1/awstats/tools/ -update

Once per day at 3am:

0 3 * * * perl /home/lonny1/awstats/tools/ -update

Future steps

  • Password protect the folder [1].

More notes

Still not working correctly.

See also