Login
or
register
Start
Introduction
Features
Demos
Why Lua?
What is Kepler?
Sightings
License
Sandbox
Whodunit?
Install
Installation
Basic Configuration
Custom Installation
Deployment
Troubleshooting
Problems
Tweak
Configuration
More Parameters
Styles
Templates
I18n
Plugins
Storage
Markup
Authentication
Spam
Track
News
Releases
Project Planning
Recent Wiki Edits
Edits by Recent Users
Talk
Mailing List(s)
This Wiki
Report a Bug
Grok
Basic Concepts
Saci
Versium
Actions
WSAPI
LuaRocks
Hack
Source
Rocks
Architecture
Guided Tour
"Earth"
Coding Standard
Tasks
Demos
Anonymous users must enter
captcha
below.
Don't put anything here
Page Parameters
Don't put anything here
Page Name (for URL)
Page Title
Don't put anything here
Don't put anything here
Show Advanced Options
Don't put anything here
Category
Prototype
Don't put anything here
Page Content
<span class="teaser"> This site is running Sputnik, so if you want to see what Sputnik looks like when used as a wiki, just click around this site or try editing the [[Sandbox]]. If you want to see what <i>other</i> things Sputnik can be made to do, here are some more examples. </span> ## A Photo Album [[Demo Album]] is an example of a node storing photos. The photos can be of different size. The only thing that is stored in the actual node is a Lua table with the photos and a few extra parameters. The page looks like a photo album because it has it's `prototype` set to [[@Album]] (see the [[@Album.raw|source]]), which in turn sets `templates` field to [[_templates_for_album|_templates\_for\_album]], and sets it's actions to functions from [sputnik.actions.album](http://gitorious.org/projects/sputnik/repos/mainline/blobs/master/sputnik-examples%2Flua%2Fsputnik%2Factions%2Falbum.lua). This node provides an example of how to use custom actions to display data stored in the node as Lua tables and how to use prototypes. (The source code for this examples is available in the "sputnik-example" directory in the [[Source|code repository]].) ## A Configurable World Clock [[World Clock]] uses a template set stored at [[_templates_for_world_clock]] and the code in [sputnik.actions.worldclock](http://code.google.com/p/sputnik-wiki/source/browse/trunk/rocks/sputnik-worldclock/lua/sputnik/actions/worldclock.lua). It uses a combination of two actions. The first action, which replaces `show` generates Javascript which then uses [AHAH](http://microformats.org/wiki/rest/ahah) to call in the output of another action (`.show_content`) every few seconds and to replace a content of a div with it. (The `.show_content` action returns just an HTML fragment containing the clock as it is at the moment.) (The source code for this examples is available in the "sputnik-example" directory in the [[Source|code repository]].) ## A Bug Tracker Ticket [[Tickets]]: This is a simple bug tracker, which consists of <del>44</del> 120 [lines of code](http://gitorious.org/projects/sputnik/repos/mainline/blobs/master/sputnik-tickets%2Flua%2Fsputnik%2Factions%2Ftickets.lua), a prototype node ([[@Ticket]], see the [[@Ticket.raw|source]]) and an index node [[Tickets]]. The index node displays a list of nodes that start with "Ticket:" together with their status. It also contains a link to create new "Ticket:" nodes. Each such node gets its prototype automatically set to [[@Ticket]], which gives the nodes custom UI: their edit form has controls for fields that cannot be set for normal nodes. (Additionally, just for the heck of it, @Ticket removes the distinction between viewing and editing the node - i.e., you are always in the edit mode. This plugin is also available as a rock (`luarocks install sputnik-tickets`). This shows an example of: custom edit UI, automatic creation of nodes of a particular type, packaging add-ons as luarocks. (The source code for this examples is available in the "sputnik-tickets" directory in the [[Source|code repository]].) ## LuaUsers [[LuaUsers]] links to two wikis that showcase a "mod" that completely changes the look and feel, replacing the markup format. The first of those wikis (http://sputnik.freewisdom.org/luausers/wiki/, login as "lua" with password "wiki") aims to replicate the existing [Lua-Users wiki](http://sputnik.freewisdom.org/luausers/wiki/). ## Slideshows [[Slideshow Demo]] displays as any other page _or_ as a slideshow. (Requires [FullerScreen](https://addons.mozilla.org/en-US/firefox/addon/4650). The HTML was borrowed from [S9](http://slideshow.rubyforge.org/).) ## GraphViz [[Graphviz Demo]] shows an example of dynamically generating PNG, GIF or SVG images based on a graph stored in a body of a node.
About this Edit
Minor Edit
Edit Summary
Powered by
Sputnik
|
XHTML 1.1