summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-27 23:15:50 +0000
committerSteven Barth <steven@midlink.org>2008-03-27 23:15:50 +0000
commit080d926497657c6828d73fc27f10bd0a4d98d260 (patch)
tree952b667dfce996fa51f133978bea1371a1caf23b
parent077db659bbcb7cee6bbc4c4dbaed9776261190a0 (diff)
* Removed old examples
-rw-r--r--examples/ffluci/controller/admin/index.lua15
-rw-r--r--examples/ffluci/controller/public/example-action.lua49
-rw-r--r--examples/ffluci/controller/public/example-simpleview.lua27
-rw-r--r--examples/ffluci/controller/public/index.lua32
-rw-r--r--examples/ffluci/i18n/example-simpleview.de6
-rwxr-xr-xexamples/ffluci/view/example-simpleview/foo.htm3
-rwxr-xr-xexamples/ffluci/view/example-simpleview/index.htm6
-rw-r--r--examples/ffluci/view/hello.htm1
8 files changed, 0 insertions, 139 deletions
diff --git a/examples/ffluci/controller/admin/index.lua b/examples/ffluci/controller/admin/index.lua
deleted file mode 100644
index 9aec94c86..000000000
--- a/examples/ffluci/controller/admin/index.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-module(..., package.seeall)
-
-function dispatcher(request)
- require("ffluci.template").render("header")
- print("Hello there, Mr. Administrator")
- require("ffluci.template").render("footer")
-end
-
-menu = {
- descr = "Administrative",
- order = 10,
- entries = {
- {action = "index", descr = "Hello"}
- }
-} \ No newline at end of file
diff --git a/examples/ffluci/controller/public/example-action.lua b/examples/ffluci/controller/public/example-action.lua
deleted file mode 100644
index 538f5d9d0..000000000
--- a/examples/ffluci/controller/public/example-action.lua
+++ /dev/null
@@ -1,49 +0,0 @@
--- This example demonstrates the action dispatcher which invokes
--- an appropriate action function named action_"action"
-
--- This example consists of:
--- ffluci/controller/index/example-action.lua (this file)
-
--- Try the following address(es) in your browser:
--- ffluci/index/example-action
--- ffluci/index/example-action/sp
--- ffluci/index/example-action/redir
-
-module(..., package.seeall)
-
-dispatcher = require("ffluci.dispatcher").action
-
-menu = {
- descr = "Example Action",
- order = 30,
- entries = {
- {action = "index", descr = "Action-Dispatcher Example"},
- {action = "sp", descr = "Simple View Template Stealing"},
- {action = "redir", descr = "Hello World Redirector"}
- }
-}
-
-function action_index()
- require("ffluci.template").render("header")
- local formvalue = require("ffluci.http").formvalue
-
- local x = formvalue("x", nil, true)
-
- print(x and "x*x: "..tostring(x*x) or "Set ?x= any number")
- require("ffluci.template").render("footer")
-end
-
-function action_sp()
- require("ffluci.http")
- require("ffluci.i18n")
- require("ffluci.config")
- require("ffluci.template")
-
- -- Try uncommenting the next line
- -- ffluci.i18n.loadc("example-simpleview")
- ffluci.template.render("example-simpleview/index")
-end
-
-function action_redir()
- require("ffluci.http").request_redirect("public", "index", "foobar")
-end \ No newline at end of file
diff --git a/examples/ffluci/controller/public/example-simpleview.lua b/examples/ffluci/controller/public/example-simpleview.lua
deleted file mode 100644
index 61f4ad32c..000000000
--- a/examples/ffluci/controller/public/example-simpleview.lua
+++ /dev/null
@@ -1,27 +0,0 @@
--- This example demonstrates the simple view dispatcher which is the
--- most simple way to provide content as it directly renders the
--- associated template
-
--- This example consists of:
--- ffluci/controller/index/example-simpleview.lua (this file)
--- ffluci/view/example-simpleview/index.htm (the template for action "index")
--- ffluci/view/example-simpleview/foo.htm (the template for action "foo")
--- ffluci/i18n/example-simpleview.de (the german language file for this module)
-
--- Try the following address(es) in your browser:
--- ffluci/index/example-simpleview
--- ffluci/index/example-simpleview/index
--- ffluci/index/example-simpleview/foo
-
-module(..., package.seeall)
-
-dispatcher = require("ffluci.dispatcher").simpleview
-
-menu = {
- descr = "Example Simpleview",
- order = 20,
- entries = {
- {action = "index", descr = "Simpleview Index"},
- {action = "foo", descr = "Simpleview Foo"}
- }
-} \ No newline at end of file
diff --git a/examples/ffluci/controller/public/index.lua b/examples/ffluci/controller/public/index.lua
deleted file mode 100644
index 4498c77ed..000000000
--- a/examples/ffluci/controller/public/index.lua
+++ /dev/null
@@ -1,32 +0,0 @@
--- This is a very simple example Hello World FFLuCI controller
--- See the other examples for more automated controllers
-
--- Initialise Lua module system
-module(..., package.seeall)
-
--- This is the module dispatcher. It implements the last step of the
--- dispatching process.
-function dispatcher(request)
- require("ffluci.template").render("header")
- print("<h2>Hello World!</h2>")
- for k,v in pairs(request) do
- print("<div>" .. k .. ": " .. v .. "</div>")
- end
- require("ffluci.template").render("footer")
-end
-
--- The following part is optional it could be useful for menu generators
--- An example menu generator is implemented in the template "menu"
-
-menu = {
- -- This is the menu item description
- descr = "Hello World",
-
- -- This is the order level of the menu entry (lowest goes first)
- order = 10,
-
- -- A list of menu entries in the form action => "description"
- entries = {
- {action = "index", descr = "Hello World"},
- }
-} \ No newline at end of file
diff --git a/examples/ffluci/i18n/example-simpleview.de b/examples/ffluci/i18n/example-simpleview.de
deleted file mode 100644
index db2bee0cf..000000000
--- a/examples/ffluci/i18n/example-simpleview.de
+++ /dev/null
@@ -1,6 +0,0 @@
-descr = [[Dies ist das Simple View-Beispiel.<br />
-Dieses Template ist: ffluci/view/example-simpleview/index.htm und gehoert
-zur Aktion "index".<br />
-Diese Uebersetzung ist: ffluci/i18n/example-simpleview.de]]
-
-lan = "Die LAN IP-Adresse des Routers lautet:" \ No newline at end of file
diff --git a/examples/ffluci/view/example-simpleview/foo.htm b/examples/ffluci/view/example-simpleview/foo.htm
deleted file mode 100755
index a0df536f1..000000000
--- a/examples/ffluci/view/example-simpleview/foo.htm
+++ /dev/null
@@ -1,3 +0,0 @@
-<%+header%>
-<h1>bar</h1>
-<%+footer%> \ No newline at end of file
diff --git a/examples/ffluci/view/example-simpleview/index.htm b/examples/ffluci/view/example-simpleview/index.htm
deleted file mode 100755
index ffe1ccf71..000000000
--- a/examples/ffluci/view/example-simpleview/index.htm
+++ /dev/null
@@ -1,6 +0,0 @@
-<%+header%>
-<p><%:descr This is the Simple View-Example.<br />
-This template is ffluci/view/example-simpleview/index.htm and belongs
-to the index-Action.%></p>
-<p><%:lan The router's LAN IP-Address is:%> <%~network.lan.ipaddr%></p>
-<%+footer%> \ No newline at end of file
diff --git a/examples/ffluci/view/hello.htm b/examples/ffluci/view/hello.htm
deleted file mode 100644
index 8231b61f9..000000000
--- a/examples/ffluci/view/hello.htm
+++ /dev/null
@@ -1 +0,0 @@
-A very little Hello <%=muh%>