Compdigitec Labs

Archive for September, 2008

Setting up a Wikipedia clone (part 2)

Sunday, September 28th, 2008

This is the second part to creating your own Wikipedia clone. If you haven’t already read done part 1, then you must do part 1 before continuing. This part deals with making your MediaWiki more Wikipedia-ish. Install the Cite extension to enable <ref> and <references />. Create a template with text that states that the […]

Creating a Wikipedia clone (part 1)

Thursday, September 25th, 2008

If you ever wanted to set up your own topic-specific or subject-specific Wikipedia┬«, then you’re in luck! We’re here to give you simple and easy to follow instruction on creating your own mini-Wikipedia┬«. Before you start: You need to have a web server with at least PHP5 and MySQL 4. You need to understand the […]

Using apt-get in Ubuntu Linux

Sunday, September 21st, 2008

If you ever need to install packages (built-in), but cannot use Synaptic, then here are some useful tips on using apt-get in Ubuntu: sudo apt-get install package – Installs package and it’s dependencies sudo apt-get remove package – Removes package, but you need to use #4 to remove unused dependencies sudo apt-get update – Updates […]

Enabling and in MediaWiki

Sunday, September 14th, 2008

If you have a MediaWiki installation and decide to make it Wikipedia-like, you will find that the <ref> tags and the <references /> tags don’t work like they do in Wikipedia. Below is a screenshot of the citation tags not working: To fix this problem, you need to install the Cite extenstion for MediaWiki. Below […]

SimpleXML – solution for XML manipulation in PHP

Sunday, September 7th, 2008

If you ever do get the need to manipulate (read/write) XML, you could try using the PHP DOM API, but it’s very difficult to use the DOM. An good extension-less way to access and manipulate XML instead is SimpleXML. It’s very easy to use compared to DOM and features a easy way to access attributes […]

How to get the initial help on sudo to reappear in Ubuntu

Thursday, September 4th, 2008

If you’ve used a new, fresh Ubuntu install, you’ll notice that the first time you open the terminal, you would get the following message before your first sudo (or su): To run a command as administrator (user “root”), use “sudo “. See “man sudo_root” for details. However, after your first sudo or su, this message […]

How to force mkdir to create a directory if there isn’t already one

Wednesday, September 3rd, 2008

If you’ve ever tried to make a directory if there isn’t one existing, you probably have bumped into the following error: mkdir: cannot create directory `the_directory’: File exists To fix this, use this instead to suppress error and create parent directories if needed: mkdir -p your_directory For more information, see the mkdir page at Wikipedia.

12 things you need to know about PHP

Tuesday, September 2nd, 2008

Are you still thinking that PHP is an web-only language or is “not a real language”? Well, that used to be true with PHP 2.0, but with PHP5, it’s not so true anymore. Here are 12 things you need to know about PHP: PHP is not only for the web. PHP used to be only […]