hello world ! mw_hello.0.1
authordj3c1t <dj3c1t@free.fr>
Thu, 13 Dec 2012 21:14:43 +0000 (22:14 +0100)
committerdj3c1t <dj3c1t@free.fr>
Thu, 13 Dec 2012 21:14:43 +0000 (22:14 +0100)
app/mods/hello/index.php [new file with mode: 0644]
mw_hello.php
out/dist/layouts/hello.xml [new file with mode: 0644]
out/dist/views/hello/index.php [new file with mode: 0644]

diff --git a/app/mods/hello/index.php b/app/mods/hello/index.php
new file mode 100644 (file)
index 0000000..06b56df
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+  class mw_hello_index extends mw_mod{
+
+    function index(&$env){
+    }
+
+  }
+
+?>
\ No newline at end of file
index 16580a4..dc385c3 100644 (file)
@@ -7,26 +7,11 @@
     }
 
     function description(){
-      return "Un plugin qui affiche une page Hello World ! avec une citation alĂ©atoire";
-    }
-
-    function install($env){
-      return true;
-    }
-
-    function uninstall($env){
-      return true;
-    }
-
-    function enable($env){
-      return true;
-    }
-
-    function disable($env){
-      return true;
+      return "Un plugin qui affiche une page Hello World !";
     }
 
     function init($env){
+      $env->set_link("menu_top/hello", $env->url("hello"), "Hello");
       return true;
     }
 
diff --git a/out/dist/layouts/hello.xml b/out/dist/layouts/hello.xml
new file mode 100644 (file)
index 0000000..64819b7
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layout>
+
+  <hello page="index.php">
+    <index>
+      <index content="views/hello/index.php" />
+    </index>
+  </hello>
+
+</layout>
\ No newline at end of file
diff --git a/out/dist/views/hello/index.php b/out/dist/views/hello/index.php
new file mode 100644 (file)
index 0000000..baaeb54
--- /dev/null
@@ -0,0 +1 @@
+<h2>Hello World !</h2>
\ No newline at end of file