Monday, October 18, 2010

Media Wiki - Upload file configuration

To enable uploading of files on media wiki, first enable the settings on PHP.INI

file_uploads = On

Then on your LocalSettings.php (under wiki site root folder), apply these changes:

Turn on the file upload:

$wgEnableUploads   = true

Set your upload directory. This is where your uploaded files will be saved:

$wgUploadDirectory = "c:/Sites/PHP/mediawiki-1.16.0/uploads";

Set your upload url. This is the url to use for downloading your files.

$wgUploadPath  = $wgScriptPath."/uploads";
For example: http://wiki.mysite.com/uploads/myfile.txt.

To modify the file types that can be uploaded:
$wgFileExtensions = array_merge($wgFileExtensions, array('doc', 'xls'));



To access the upload page, add this string on the url:

index.php?title=Special:Upload

For example:

http://wiki.mysite.com/index.php?title=Special:Upload


If you want some advanced configurations on file uploads such as setting upload size limit, file types, etc, you can find it on their media wiki's website.

Media Wiki - Edit navigation/menu

Add this string on your url: index.php?title=MediaWiki:Sidebar

For example:

http://wiki.mysite.com/index.php?title=MediaWiki:Sidebar

Saturday, October 09, 2010

10/10/10 - Once in a thousand year

10/10/10... I declare this day, the Binary Day....

If you're 42 years old, then this must be your lucky day.

If you have 42 wives, or 42 children, or anything that is 42, then most probably you or your descendants will be lucky for the next thousand years!

101010 = 42

Just blogging a once-in-a-thousand-year date format... 10/10/10

Thursday, September 30, 2010

List IIS application pool

Start Menu -> Run -> type cmd -> Press Enter key

type: iisapp pool

Press Enter

Monday, August 30, 2010

Regular Expression Minimum Digits / Phone Number

This regular expression will check string that contains at least 7 number of digits:

(\D?\d\D?){7,}

For example:

123456 = false
12ad34g5a6 = false
1234567 = true
1m2m3m4m5m6m7 = true

This can also be used to validate or check phone numbers (at least 7 digits)

(([\(\-\+\s]?\d[\)\-\+\s]?){7,})\d?$

(+971) 372 - 6202
(+971) 3726202
(971) 3726202
971-372-6202
9713726202