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

Difference between revisions of "Appropedia:Site development/archive (Admin tasks)"

From Appropedia
Jump to: navigation, search
(Completed Tasks: importing wikigreen images... 7 hours gone.)
(renaming Chris)
Line 1: Line 1:
 
=Current Work=
 
=Current Work=
==Renaming a user==
 
;Put the following [http://wiki.evernex.com/index.php?title=ExtensionFunctions.php file] in the root wiki directory:
 
:ExtensionsFunctions.php 
 
 
;Put the following [http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Renameuser/ three files] into the includes directory:
 
: SpecialRenameuser.i18n.php
 
: SpecialRenameuser.php
 
: SpecialRenameuser_body.php
 
 
;add the following line to Localconfig.php:
 
: <tt>include_once('includes/SpecialRenameuser.php') ; </tt>
 
 
;Move user page (and talk page) to the new username
 
 
;How to rewrite old signatures?  A bot maybe.
 
  
;See http://www.buildcapacity.org/User:Singkong2005 for work so far.
 
 
=Completed Tasks=
 
=Completed Tasks=
 
==Import Images from WikiGreen==
 
==Import Images from WikiGreen==
Line 33: Line 17:
 
# In addition, something happened to the importImages.php file in transport, so I redownloaded it, and everything worked.
 
# In addition, something happened to the importImages.php file in transport, so I redownloaded it, and everything worked.
  
 +
==Renaming a user==
 +
# Download the three files at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Renameuser/
 +
#* ''SpecialRenameuser.i18n.php'', ''SpecialRenameuser.php'', ''SpecialRenameuser_body.php''
 +
# Copy these three files to the /includes directory
 +
# Download the ''[http://wiki.evernex.com/index.php?title=ExtensionFunctions.php ExtensionFunctions.php]''
 +
# Copy the ''ExtensionFunctions.php'' to the main directory
 +
# Add the following line to the ''LocalSettings.php'' near the other require_once lines.
 +
#* <code>include_once('includes/SpecialRenameuser.php'); #LRG 1_14_07 used for renaming users
 +
# Log in and navigate to [[Special:Renameuser]]</code>
 +
# Manually move the '''Userpage''' and any '''Userpage/subpages'''.
 +
 +
:I wrote this up in a more general form at http://meta.wikimedia.org/wiki/Renameuser
 +
:How to rewrite old signatures?  A bot maybe.
 +
:See [[User:Chriswaterguy]] / [[User:Singkong2005]] for an example.
 
==Site Map==
 
==Site Map==
 
*[http://www.mediawiki.org/wiki/Extension:Google_Sitemap Google Sitemap extension]
 
*[http://www.mediawiki.org/wiki/Extension:Google_Sitemap Google Sitemap extension]

Revision as of 16:06, 15 January 2007

Current Work

Completed Tasks

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 (www.xxcopy.com)
    • 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 www.wikigreen.org 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.

Renaming a user

  1. Download the three files at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Renameuser/
    • 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 http://meta.wikimedia.org/wiki/Renameuser
How to rewrite old signatures? A bot maybe.
See User:Chriswaterguy / User:Singkong2005 for an example.

Site Map

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

Short URLs

  • See wikimedia and User:Helge.at
  • 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

AWStats

Some specifics after installing AWstats. See http://wiki.dreamhost.com/index.php/AWStats_Installation for nice instructions.

Perl to run the page

perl /home/lonny1/awstats/tools/awstats_buildstaticpages.pl  -config=appropedia.org -update \  -awstatsprog=/home/lonny1/awstats/cgi-bin/awstats.pl  -dir=/home/lonny1/appropedia.org/statistics/

Changes to log file

LogFile="/home/lonny1/logs/appropedia.org/http/access.log"
LogFormat="%host %other %other %time1 %methodurl %code %bytesd %refererquot %uaquot"
SiteDomain="appropedia.org"
HostAliases="www.appropedia.org"
DNSLookup=0
DirData="/home/lonny1/awstats/data/"
DirIcons="icon"
SaveDatabaseFilesWithPermissionsForEveryone=0
DefaultFile="index.php index.html"

Cron -e

One every hour on the fifteen minute mark.

15 0 * * * perl /home/lonny1/awstats/tools/awstats_buildstaticpages.pl
-config=appropedia.org -update
-awstatsprog=/home/lonny1/awstats/cgi-bin/awstats.pl
-dir=/home/lonny1/appropedia.org/statistics/

Once per day at 3am:

0 3 * * * perl /home/lonny1/awstats/tools/awstats_buildstaticpages.pl
-config=buildcapacity.org -update
-awstatsprog=/home/lonny1/awstats/cgi-bin/awstats.pl
-dir=/home/lonny1/buildcapacity.org/statistics/

Future steps

  • Password protect the folder [1].

More Notes

Still not working correctly.