wdLite Installer

05 Feb 2009 02:56

Today I've worked on an installer for wdLite. It's a little too late to write about, I'll give it a short presentation on my blog tomorrow.

Good night

Comments: 1

Working On wdLite

03 Feb 2009 00:54

A few days ago I started working on wdLite — a lite version of Wikidot.

The primary aim of this project is to make installation dead simple and server requirements really small.

Server requirements

wdLite should be installable on:

  • Apache with PHP5 (no safe mode or other limitations) and PostgreSQL on Linux boxes

PHP and PostgreSQL should be already configured to work with each other. You should have a PostgreSQL database and "user/password/database"-based access to it. Wikidot will create tables, but won't create a database. You should either create it as root or have root created it for you before (this process might be automatic on webhosting services with PHP/PostgreSQL).

This configuration should include a whole bunch of virtual hosting providers.


The installation process should be no harder than this:

  • Get a zip or checkout the newest version from repository
  • Upload the directory to the server
  • Adjust directory permissions
  • Go to install.php script with your browser
  • Supply mail and PostgreSQL credentials
  • Choose your wiki name and create users
  • Enjoy your new wiki

What are the differences between "full" Wikidot installation and wdLite


  • only one wiki
  • no page revision diffs
  • more limited page size
  • lower security (especially for IE users)
  • works only with Apache
  • some features disabled or non-working
  • memcached disabled
  • karma disabled
  • notifications disabled

Better than full version, because

  • works with Apache
  • works on any HTTP port (not only 80)
  • works within any directory (also in user directory accessible like http://myserver.com/~quake/something/really/deep/wikidot)
  • easier installation with a web interface
  • no root-access needed
  • works well with GMail to send mails from the service
  • easily installable on Ubuntu
  • the easiest method to start developing with Wikidot
  • no need to manually compile additional software

Current work progress

I'm about to pre-release this software, to let you test it.

I have to:

  • create a list of things that need to work before a final 1.0 release.
  • redirect / to /?/
  • create install.php

Things that work already:

  • logging in/out
  • displaying pages
  • editing pages
  • saving pages
  • some basic modules
  • uploading and displaying files
  • navigation (links are rewritten from absolute to relative)

How does it work

The wdLite is based on Wikidot OpenSource. It contains wikidot, index.php and a bunch of helpers scripts. The index.php file is a hacky PHP script that

  • converts URL-s like http://some.server.com/some/url/?/front:page to http://www.some.server.com/front:page
  • tricks Wikidot software to think that the Wikidot domain is some.server.com and the main wiki is www.some.server.com
  • sets a bunch of system variables Wikidot relies on, like $_SERVER['REQUEST_URI'], $_SERVER['QUERY_STRING']
  • runs a proper one from Wikidot scripts
  • … or serves (more like redirects to) a static file
  • catches the script output
  • runs some transformation on caught output (like converting the links from http://www.some-server.com/some:other-page to ?/some:other-page)
  • sends the data back to browser

The script is more a dirty hack than a version of Wikidot, but this is intentional. We don't want to mantain to many versions of Wikidot. Having this dirty script "only using without modyfing" Wikidot software makes it quite independent from changes in Wikidot. This means the same wdLite script will work for a newer version of Wikidot (=less maintaining work).

Comments: 2

Wikidot API

22 Jan 2009 18:57

A few days ago I started working on Wikidot API. The API will be a standardized way to access the Wikidot.com service in a programmable way (i.e. not using a browser) to retrieve, create and update information stored on Wikidot, including site browsing, page editing and commenting.

In simple words this will allow people to write applications that connect to Wikidot.com and perform some actions for the user that runs the application.

Technically, the Wikidot.com API is an XML-RPC service exporting methods from a few especially designed classes.

To connect to an XML-RPC service, you must know its endpoint, which is a regular URL (http:// or https://) address. We decided to use HTTPS to secure the channel from the very start.

The operations we are going to support are:


  • site.categories
  • site.pages
  • page.get

Above ones are already implemented. Using the API calls you get retrieve almost all data you stored on the Wikidot.com sites!


  • page.save

This will be the basic method to update the content on your site. We plan several other methods, but this is the one that is the most important.


  • page.comments
  • page.comment

They will be used to get and post comments on a given page. Using reply_to parameter, there is a possibility to reply to a particular comment.


  • forum.groups
  • forum.categories
  • forum.threads
  • forum.post

This bunch of methods are going to give you full access to the forums you have started on Wikidot.

How to use the API

We haven't yet enabled the API access to the main Wikidot.com server, but testing the API with Python XML-RPC library is as easy as this:

>>> from xmlrpclib import ServerProxy
>>> s = ServerProxy('SOME-URL')
>>> s.system.listMethods()
['system.listMethods', 'system.methodHelp', 'system.methodSignature', 'system.multicall', 'site.pages', 'site.categories', 'page.get']
>>> print s.system.methodHelp('site.pages')
Get pages from a site
Argument array keys:
 site: site to get pages from
 category: category to get pages from (optional)
>>> s.site.categories({'site': 'gamemaker'})
['project', 'rpg', '_default', 'action', 'admin', 'badge', 'beginner', 'contests', 'error', 'event', 'example', 'forum', 'gamemaker', 'gml', 'gmlcode', 'gmupload', 'help', 'ide', 'include', 'mamber', 'member', 'nav', 'portal', 'resource', 'search', 'system', 'talk', 'template', 'tutorial', 'video-tutorial', 'wiki', 'challenge', 'howto', 'recent-changes', 'scratch-pad', 'helpdesk', 'helprequest', 'default', 'testimonial', 'testimonials']
>>> [p['name'] for p in s.site.pages({'site': 'gamemaker', 'category': 'badge'})]
['cool', 'flux', 'c-team', 'gml', 'member', 'madman', 'not-a-noob', 'f-madman', 'start', 'break-it']
>>> print s.page.get({'site': 'gamemaker', 'page': 'badge:cool'})['source']
[[table style="width:98%;margin-right:auto;margin-left:auto;margin-bottom:1%;"]][[row]][[cell style="width:360px;"]]
[[div class="error-block"]]
Included page "include:cool-badge" does not exist ([/include:cool-badge/edit/true create it now])
The Cool Badge is given to people who make something really cool.
[[cell style="vertical-align:top;border:1px solid #ddd;padding:1%;"]]
+++ Display Code
[[table class="code"]][[row]][[cell]]
@@[[include include:cool-badge member=member name]]@@
+++ Tag
[[table style="border:1px solid #ddd;padding:1%;margin-right:auto;margin-left:auto;margin-bottom:1%;width:98%;"]][[row]][[cell]]
++ Earn It
* Program something really cool using gml
* Make a really cool game
+++ Tips
* Make sure you post your examples and games on the [[[forum:start|forum]]]. Otherwise no one can see it and nominate you for the cool badge.
[[table style="border:1px solid #ddd;padding:1%;margin-right:auto;margin-left:auto; width:98%;"]][[row]][[cell]]
++ Members Who Have Earned the Cool Badge
[[module ListPages category="member" order="titleAsc" tag="cool-badge" perPage="100" separate="false"]]
* %%linked_title%%

A few words of explanation:

  • first we import ServerProxy class from XML-RPC library,
  • then we construct the ServerProxy object s supplying the endpoint URL (SOME-URL in this case, as we don't have yet decided what the URL is going to be)
  • we can see a list of methods by calling system.listMethods on the ServerProxy object
  • we get a help message for a method by calling system.methodHelp
  • then we get categories of site gamemaker (yeah, it's a part of the wikicomplete.info)
  • then we call site.pages method (specifying site and category parameters), but instead of displaying the whole list of structures that describe pages, we only display their names
  • calling page.get returns an array with the information about a page, including:
    • wiki source, array key: source
    • generated HTML, array key: html
    • array with various meta-data, array key: meta
  • we call page.get passing as the argument array that specifies site and page name, get the page object, but displays only what's stored under the source array key

As you see playing with this is really easy as is browsing the available methods and using them.


We've chosen this protocol because it is an easy way to develop both server and client in almost any programming language. Also it gives some flexibility in passed arguments and return values.

We use struct XML-RPC type as the argument and return value type, which is mapped to associative array or dictionary in client (and server) libraries. Each API method gets a bunch of required and optional parameters, that are basically values stored in the struct passed to API methods.

For example site.pages gets a struct with the following keys:

  • site (site name to get pages from) — required
  • category (category to get pages from) — optional

This means, you have to create an associative array (when using PHP) or a dictionary (using Python) and pass it as the method argument:

$pages = $server->site->pages(array("site" => "my-site", "category" => "my-category"));
# Python
pages = server.site.pages({"site": "my-site", "category": "my-category"})

Using other programming languages, you'll end with something similar. You can almost always create the array/dictionary in-place, so having this convention is not a big deal.


I'm working on a filesystem based access to Wikidot site (using FUSE and Python).

We plan having a Wikidot application for iPhone.

A save-it-directly-on-wikidot plugin would be a nice thing for various text editors (and probably other applications).

And probably there are billions of other ways to use this API we're not even aware of. If you have any, feel free to leave a comment.

Comments: 2

Hand-made jewelery

19 Jan 2009 14:33

I would like to show you a few pieces of jewelery my fiancée has made.


We're looking for your comments!

Comments: 6

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License