Conceptual_Model (000002)

Sputnik is a wiki in the sense that it is committed to the wiki data model of versioned pages. A page is basic unit of Sputnik. Almost everything is a page. Each page has history and most can be modified by any user who has an account. Internally, each page consists of two parts: metadata and content. The metadata typically includes the following fields:

  • "title" (the name of the page as shown to the user)
  • "author" (the user who created this version)
  • "summary" (the summary of the change from the previous version)

Each page also has content. When a page is used as a regular wiki page, the content is assumed to be text formatted with Markdown. However, depending on your configuration, the content of a page can be anything, and having the content be set Lua code would be particularly common.

Each page supports a set of actions. The following actions are built-in and thus apply to all pages (they can be overriden, though):

Basic

  • PAGE_NAME.show - display the page as HTML, with a navigation bar, etc.
  • PAGE_NAME.edit - display the basic edit form for the page
  • PAGE_NAME.save - save the page (when submitted by the basic form)
  • PAGE_NAME.history - show page history
  • PAGE_NAME.diff - show a diff from an earlier version

Advanced

  • PAGENAME.showinner - display just the content part of HTML.
  • PAGENAME.editraw - display the form that allows altering the underlying representation of the page
  • PAGENAME.saveraw - save the page (when submitted by the "raw" form)
  • PAGE_NAME.code - show the content of the page "as is", wrapped in the standard HTML (nav bar, etc.)
  • PAGE_NAME.raw - show the content of the page "as is" - in plain text

Some of the actions take additional parameters, which may be optional. E.g., PAGE_NAME.show takes an optional "version" parameter that specifies which version of the page should be shown. The parameters are encoded as CGI parameters, and the page name and it's action are passed as a single CGI parameter "p". E.g.:

http://.../kepler.cgi/.../sputnik.lua?p=Sputnik.show&version=2007-05-04%2012:53:34

However, the "show" action is default and thus can be omitted, so instead we can use:

http://.../kepler.cgi/.../sputnik.lua?p=Sputnik&version=2007-05-04%2012:53:34

Or, if we are using URL-rewriting:

http://www.freewisdom.org/projects/sputnik/Sputnik&version=2007-05-04%2012:53:34

Actions can be overridden and new actions can be added to specific pages. E.g., the Special:RSS page has a special ".rss" action which returns the RSS feed for the wiki.

Powered by Sputnik | XHTML 1.1