Fixes in carnet rss
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 22 Nov 2006 08:56:04 +0000 (08:56 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 22 Nov 2006 08:56:04 +0000 (08:56 +0000)
Allow the use of icons in rss feeds

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1124 839d8a87-29fc-0310-9880-83ba4fa771e5

plugins/compiler.icon.php
templates/carnet/rss.tpl

index f7478c6..acbaa03 100644 (file)
@@ -28,8 +28,13 @@ function smarty_compiler_icon($tag_attrs, &$compiler)
     }
 
     $name = htmlentities(trim($name, '\'"'), ENT_QUOTES);
+    $name = "images/icons/$name.gif";
+    if ($full) {
+        global $globals;
+        $name = $globals->baseurl . '/' . $name;
+    }
 
-    return "?><img src='images/icons/$name.gif' alt='' $title /><?php";
+    return "?><img src='$name' alt='' $title /><?php";
 }
 
 /* vim: set expandtab: */
index a956511..f0551bc 100644 (file)
       <link>{#globals.baseurl#}/profile/private/{$x.bestalias}</link>
       <description><![CDATA[
         {if !$x.contact and !$x.dcd}
-        &bull; 
         <a href="{#globals.baseurl#}/carnet/contacts?action=ajouter&amp;user={$x.bestalias}">
-          {icon name=add title="Ajouter"}Ajouter &agrave; mes contacts
+          {icon name=add title="Ajouter" full=true} Ajouter &agrave; mes contacts
         </a><br />
         {/if}
         {if !$x.dcd}
-        &bull; 
         <a href="{#globals.baseurl#}/vcard/{$x.bestalias}.vcf">
-          T&eacute;l&eacute;charger la carte de visite &eacute;lectronique
+          {icon name=vcard title="Carte de visite" full=true} T&eacute;l&eacute;charger la carte de visite &eacute;lectronique
         </a>
         {/if}
         ]]></description>