Add /pet/ to get emails inside <a href="mailto"> tags without <html>. Fix
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 30 Oct 2008 20:38:28 +0000 (21:38 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 30 Oct 2008 20:39:35 +0000 (21:39 +0100)
links in footer, add links on xnet footer.

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/poison.php
templates/skin/common.footer.tpl
templates/xnet/skin.tpl

index b012756..4aa51a3 100644 (file)
@@ -28,6 +28,7 @@ class PoisonModule extends PLModule
         return array(
             'pe'          => $this->make_hook('poison', AUTH_PUBLIC, 'user', NO_HTTPS),
             'pem'         => $this->make_hook('mailto', AUTH_PUBLIC, 'user', NO_HTTPS),
+            'pet'         => $this->make_hook('tags',   AUTH_PUBLIC, 'user', NO_HTTPS),
             // 'per'         => $this->make_hook('rand', AUTH_PUBLIC, 'user', NO_HTTPS),
         );
     }
@@ -46,6 +47,23 @@ class PoisonModule extends PLModule
         exit;
     }
 
+    function handler_tags(&$page, $seed = null, $count = 20)
+    {
+        global $globals;
+
+        $this->load('poison.inc.php');
+        if ($seed == null) {
+            $seed = time();
+        }
+        $emails = get_poison_emails($seed, $count);
+
+        foreach ($emails as $email) {
+            echo "<a href=\"mailto:$email\" >$email</a>". "\n";
+        }
+        echo '<a href="' . $globals->baseurl . '/pem/' . md5($seed) . '">suite</a>';
+        exit;
+    }
+
     function handler_mailto(&$page, $seed = null, $count = 20)
     {
         global $globals;
index 5488929..708acbd 100644 (file)
@@ -35,8 +35,8 @@
 {/if}
 </div>
 <div class="pem">
-  <a href="{$globals->baseurl}/em/{$platal->pl_self()|replace:'/':'_'}/200">Liste1</a>
-  <a href="{$globals->baseurl}/em/{$platal->pl_self()|replace:'/':'_'}/400">Liste2</a>
+  <a href="{$globals->baseurl}/pem/{$platal->pl_self()|replace:'/':'_'}/200">Liste1</a>
+  <a href="{$globals->baseurl}/pem/{$platal->pl_self()|replace:'/':'_'}/400">Liste2</a>
   <!--
   {poison count=20}
   -->
index bbdc9af..4bf4f96 100644 (file)
@@ -30,6 +30,7 @@
     <link rel="apple-touch-icon" href="images/logo-xnet.png" type="image/png" />
 
     <link rel="stylesheet" type="text/css" href="css/xnet.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="css/base.css" media="screen" />
 
     <link rel="bookmark" href="http://www.polytechnique.fr/"        title="| École polytechnique" />
     <link rel="bookmark" href="http://www.polytechnique.edu/"       title="| Institutionnal site" />
           {/if}
           <br />
           Plat/al {#globals.version#} - © Copyright 2000-2008 <a href="http://x-org.polytechnique.org/">Association Polytechnique.org</a>
+          <div class="pem">
+            <a href="{$globals->baseurl}/pem/{$platal->pl_self()|replace:'/':'_'}/200">Liste1</a>
+            <a href="{$globals->baseurl}/pem/{$platal->pl_self()|replace:'/':'_'}/400">Liste2</a>
+            <!--
+            {poison count=20}
+            -->
+          </div>
         </td>
       </tr>
     {/if}