plugins
authorx2000habouzit <x2000habouzit>
Sun, 25 Jan 2004 20:37:03 +0000 (20:37 +0000)
committerx2000habouzit <x2000habouzit>
Sun, 25 Jan 2004 20:37:03 +0000 (20:37 +0000)
plugins/block.only_public.php [new file with mode: 0644]
plugins/modifier.url.php [new file with mode: 0644]

diff --git a/plugins/block.only_public.php b/plugins/block.only_public.php
new file mode 100644 (file)
index 0000000..b01bc9d
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * File:     block.min_auth.php
+ * Type:     block
+ * Name:     min_auth
+ * Purpose:  
+ * -------------------------------------------------------------
+ */
+function smarty_block_only_public($params, $content, &$smarty)
+{
+    if( empty($content) || logged() )
+        return;
+    return $content;
+}
+?>
diff --git a/plugins/modifier.url.php b/plugins/modifier.url.php
new file mode 100644 (file)
index 0000000..f111a54
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+function smarty_modifier_url($string)
+{
+  $chemins = Array('.', '..', '/');
+  foreach ($chemins as $ch) {
+    if (file_exists("$ch/login.php") || file_exists("$ch/public/login.php"))
+      return "$ch/$string";
+  }
+  return "";
+}
+?>