Difference between revisions of "Mediawiki"

From Wiki2
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{:setup mediawiki}}




==mediawiki==
==mediawiki==
===[[mobilefrontend]]===
==[[mobilefrontend]]==
===[http://www.mediawiki.org/wiki/Manual:Collapsible_elements collapsable elements]===
===[http://www.mediawiki.org/wiki/Manual:Collapsible_elements collapsable elements]===



Latest revision as of 14:10, 31 December 2013

setup mediawiki

mysql

back to database

getRemoteDb.sh

#!/bin/sh
echo "getting database $1"
read -p "Enter Your Password: "  pwd
echo "Welcome $pwd!"

mysqldump -h sitebuilt.net -uroot -p$pwd --opt $1 > $1.sql
mysql -uroot -p$pwd $1 < $1.sql

setup MYSQL

1. in phpmyadmin create the databases

2. put the databases in /var/backups/my. go there and run

  mysql -p -u root sitebuil_wikidb < sitebuil_wikidb.sql
  mysql -p -u root sitebuil_wrdp1 < sitebuil_wrdp1.sql
  mysql -p -u root sitebuil_wuffdb < sitebuil_wuffdb.sql
  mysql -p -u root taxplans < taxplans.sql
  mysql -p -u root webeshoppin < webeshoppin.sql
  mysql -p -u root pathbost_h211 < pathbost_h211.sql
  mysql -p -u root pathbost_h311 < pathbost_h311.sql
  mysql -p -u root pathbost_h409 < pathbost_h409.sql
  mysql -p -u root pathbost_h409 < pathbost_h409.sql

get the latest from using wget, extract and rename

tar -xvf meediwiki...

change directory name \

mv mediawiki... wiki

mediawiki rewrite rules

if you want a setup like http://wiki.sitebuilt.net/Tobin ...

1. create subdomain in /etc/sites-available as in these directions

<VirtualHost *:80>
 ServerName wiki.sitebuilt.net
 DocumentRoot /home/wiki/public_html
 # Other directives here
</VirtualHost>

2. got0 http://shorturls.redwerks.org/ and follow the directions which ends up with in /etc/sites-available/wiki add

   RewriteEngine On
   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
   RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/wiki/index.php [L]
   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
   RewriteRule ^/?wiki/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/wiki/thumb.php?f=$1&width=$2 [L,QSA,B]
   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
   RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
   RewriteRule ^/?wiki/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/wiki/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

and at the bottom of localsettings.php add

 $wgScriptPath = "/wiki";
 $wgScriptExtension = ".php";
 $wgArticlePath = "/$1";


mediawiki

mobilefrontend

collapsable elements

mailto:mediawiki-l@lists.wikimedia.org

bot

mediawiki API
creating a bot
login bot (MrMcKenna bh)
append21.html (gets error badtoken)

Trying to send stuff to api.php to append to a page. Eventually I want to append to the main page of all users. First I'll us a POST form then I'll try multiple POSTS without a form using this snippet


http://www.linux.com/archive/feature/54334

bulk import to users

http://pathboston.com/forms/bulk.html then from terminal ssh'd to pathboston.com

cd public_html/hum310/maintenance/
php importUserSubpage.php --title test

will put a page with that title on each user page

Don't transclude especially not sources:biblio

mediawiki upgrade

  • cp -r mediawiki-1.16.0/* /home/pathbost/public_html/hum08 - copy new vwrsion right over old
  • from /maintainance run: php update.php

then get rid of all the revisions

  • SpecialDeleteOldRevisions2 in code/mediawiki/extensions on mac, add this...
$wgGroupPermissions['sysop']['DeleteOldRevisions'] = true;
require_once( $IP.'/extensions/SpecialDeleteOldRevisions2/SpecialDeleteOldRevisions2.php');


old info

http://www.g-loaded.eu/2006/09/05/mediawiki-upgrade-procedure/ easy way:

  • goto maintainance directory and run php dumpBackup.php --current> dumfile.xml
  • on new site install wiki, put dumpfile.xml on its maintenance dir run php importDump.php dumfile.xml

mediawiki images

Does the user running the apache httpd instance ($ ps ax | grep httpd) have permission to write to images? Dan

mediawiki css

  • sitewide changes go in Mediawiki:Monobook.css
  • user changes go in User:MrMcKenna/monobook.css

lynx

Moving_from_shared_to_VPS

compiling PH w /scripts/easyapache

!! You can change how PHP is configured. As root, simply execute:

   /usr/local/cpanel/bin/rebuild_phpconf --help

for more information.