Index: extensions/SmiliesSupport/admin.php
===================================================================
--- extensions/SmiliesSupport/admin.php	(revision 14525)
+++ extensions/SmiliesSupport/admin.php	(revision 14526)
@@ -4,5 +4,12 @@
 global $conf, $template;
 load_language('plugin.lang', SMILIES_PATH);
-$conf_smiliessupport = explode("," , $conf['smiliessupport']);
+
+if (strpos($conf['smiliessupport'],',') !== false)
+{
+  include(SMILIES_PATH .'maintain.inc.php');
+  plugin_activate();
+}
+
+$conf_smiliessupport = unserialize($conf['smiliessupport']);
 
 // Enregistrement de la configuration
@@ -10,18 +17,30 @@
 {
   // the smilies.txt file is not saved if the directory is changed
-  if (isset($_POST['text1']) AND $_POST['text1'] != $conf_smiliessupport[0]) 
+  if (isset($_POST['text1']) AND $_POST['text1'] != $conf_smiliessupport['folder']) 
   {
     $not_save_file = true;
+    
+    $handle = opendir(SMILIES_PATH.'smilies/'.$_POST['text1']);
+    $i = 0;
+    while (false !== ($file = readdir($handle)))
+    {
+      if ( $file != '.' AND $file != '..' AND in_array(get_extension($file), array('gif', 'jpg', 'png')) )
+      {
+        $_POST['text3'] = $file;
+        closedir($handle);
+        break;
+      }
+    }
   }
   
   // new configuration
   $conf_smiliessupport = array(
-    isset($_POST['text1']) ? $_POST['text1'] : 'plugins/SmiliesSupport/smilies_1',
-    isset($_POST['text2']) ? $_POST['text2'] : '6',
-    isset($_POST['text3']) ? $_POST['text3'] : 'smile.png',
+    'folder' => isset($_POST['text1']) ? $_POST['text1'] : 'crystal',
+    'cols' => isset($_POST['text2']) ? $_POST['text2'] : '6',
+    'representant' => isset($_POST['text3']) ? $_POST['text3'] : 'smile.png',
   );
   if (empty($_POST['text'])) $_POST['text'] = ':)    smile.png';
     
-  conf_update_param('smiliessupport', implode(",", $conf_smiliessupport));
+  conf_update_param('smiliessupport', serialize($conf_smiliessupport));
   array_push($page['infos'], l10n('Information data registered in database'));
   
@@ -29,5 +48,5 @@
   if (!isset($not_save_file)) 
   {
-    $smilies_file = PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/smilies.txt';      
+    $smilies_file = SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/smilies.txt';      
 
     if (file_exists($smilies_file)) {
@@ -42,20 +61,50 @@
 
 // check if the representant exists
-if (!file_exists(PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/'.$conf_smiliessupport[2])) {
-  array_push($page['errors'], l10n('File/directory read error').' : '.$conf_smiliessupport[0].'/'.$conf_smiliessupport[2]);
+if (!file_exists(SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$conf_smiliessupport['representant'])) {
+  array_push($page['errors'], l10n('File/directory read error').' : smilies/'.$conf_smiliessupport['folder'].'/'.$conf_smiliessupport['representant']);
 }
 
+// get available sets
+$sets = array();
+$handle = opendir(SMILIES_PATH.'smilies/');
+while (false !== ($file = readdir($handle)))
+{ 
+  if ( $file != '.' && $file != '..' && is_dir(SMILIES_PATH.'smilies/'.$file) )
+  {
+    $sets[$file] = $file;
+  }
+}
+closedir($handle);
+
+// get available smilies
+$smilies_table = $smilies = array();
+$handle = opendir(SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder']);
+$i = 1;
+while (false !== ($file = readdir($handle)))
+{
+  if ( $file != '.' AND $file != '..' AND in_array(get_extension($file), array('gif', 'jpg', 'png')) )
+  {
+    $smilies[$file] = $file;
+    $smilies_table[] = array(
+      'PATH' => SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$file,
+      'TITLE' => ':'.get_filename_wo_extension($file).':',
+      'TR' => ($i>0 AND $i%$conf_smiliessupport['cols'] == 0) ? '</tr><tr>' : null,
+    );
+    $i++;
+  }
+}
+closedir($handle);
+
 $template->assign(array(
-  'TEXT1_VALUE' => $conf_smiliessupport[0],
-  'TEXT2_VALUE' => $conf_smiliessupport[1],
-  'TEXT3_VALUE' => $conf_smiliessupport[2],
+  'TEXT1_VALUE' => $conf_smiliessupport['folder'],
+  'TEXT2_VALUE' => $conf_smiliessupport['cols'],
+  'TEXT3_VALUE' => $conf_smiliessupport['representant'],
+  'sets' => $sets,
+  'smiliesfiles' => $smilies_table,
+  'smilies' => $smilies,
 ));
 
-// build the table of smilies
-include_once(SMILIES_PATH . '/smiliessupport.inc.php');
-$template->assign('smiliesfiles', get_smilies($conf_smiliessupport));
-
 // get the content of definitions file
-$smilies_file = PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/smilies.txt';
+$smilies_file = SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/smilies.txt';
 if (file_exists($smilies_file)) {
   $content_file = file_get_contents($smilies_file);
Index: extensions/SmiliesSupport/main.inc.php
===================================================================
--- extensions/SmiliesSupport/main.inc.php	(revision 14525)
+++ extensions/SmiliesSupport/main.inc.php	(revision 14526)
@@ -22,7 +22,7 @@
   global $page, $pwg_loaded_plugins;
   
-  if (
-    !isset($pwg_loaded_plugins['bbcode_bar']) 
-    AND isset($page['body_id']) AND $page['body_id'] == 'thePicturePage'
+  // if BBCodeBar is installed let him manage smilies
+  if ( isset($page['body_id']) AND $page['body_id'] == 'thePicturePage'
+    AND !isset($pwg_loaded_plugins['bbcode_bar'])
   ) {
     set_smiliessupport();
Index: extensions/SmiliesSupport/maintain.inc.php
===================================================================
--- extensions/SmiliesSupport/maintain.inc.php	(revision 14525)
+++ extensions/SmiliesSupport/maintain.inc.php	(revision 14526)
@@ -4,10 +4,29 @@
 function plugin_install()
 {
+  conf_update_param('smiliessupport', 'plugins/SmiliesSupport/smilies_1,6,smile.png');
+}
+
+function plugin_activate()
+{
   global $conf;
-
-  if (!isset($conf['smiliessupport'])) {
-    $q = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-      VALUES ("smiliessupport","plugins/SmiliesSupport/smilies_1,6,smile.png","Parametres SmiliesSupport");';
-    pwg_query($q);
+  
+  if (strpos($conf['smiliessupport'],',') !== false)
+  {
+    $conf_smiliessupport = explode(',', $conf['smiliessupport']);
+    
+    switch ($conf_smiliessupport[0])
+    {
+      case 'plugins/SmiliesSupport/smilies': $conf_smiliessupport[0] = 'ipb'; break;
+      case 'plugins/SmiliesSupport/smilies_2': $conf_smiliessupport[0] = 'sylvia'; break;
+      default: $conf_smiliessupport[0] = 'crystal'; break;
+    }
+    
+    $new_smiliessupport =  array(
+      'folder'       => $conf_smiliessupport[0],
+      'cols'         => $conf_smiliessupport[1],
+      'representant' => $conf_smiliessupport[2],
+    );
+    
+    conf_update_param('smiliessupport', serialize($new_smiliessupport));
   }
 }
@@ -15,9 +34,5 @@
 function plugin_uninstall()
 {
-  global $conf;
-
-  if (isset($conf['smiliessupport'])) {
-    pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="smiliessupport" LIMIT 1;');
-  }
+  pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="smiliessupport" LIMIT 1;');
 }
 
Index: extensions/SmiliesSupport/smilies/crystal/index.php
===================================================================
--- extensions/SmiliesSupport/smilies/crystal/index.php	(revision 14526)
+++ extensions/SmiliesSupport/smilies/crystal/index.php	(revision 14526)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/SmiliesSupport/smilies/crystal/smilies.txt
===================================================================
--- extensions/SmiliesSupport/smilies/crystal/smilies.txt	(revision 14526)
+++ extensions/SmiliesSupport/smilies/crystal/smilies.txt	(revision 14526)
@@ -0,0 +1,27 @@
+:)		smile.png
+:-)		smile.png
+:D		biggrin.png
+:-D		biggrin.png
+;)		wink.png
+;-)		wink.png
+:P		razz.png
+:p		razz.png
+:-p		razz.png
+:-P		razz.png
+:(		sad.png
+:-(		sad.png
+;(		cry.png
+;-(		cry.png
+oO		eek.png
+Oo		eek.png
+OO		eek.png
+:o		surprised.png
+:O		surprised.png
+:-o		surprised.png
+:-O		surprised.png
+:s		confused.png
+:S		confused.png
+:|		neutral.png
+:-|		neutral.png
+<3		like.png
+^^		lol.png
Index: extensions/SmiliesSupport/smilies/ipb/index.php
===================================================================
--- extensions/SmiliesSupport/smilies/ipb/index.php	(revision 14526)
+++ extensions/SmiliesSupport/smilies/ipb/index.php	(revision 14526)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/SmiliesSupport/smilies/ipb/smilies.txt
===================================================================
--- extensions/SmiliesSupport/smilies/ipb/smilies.txt	(revision 14526)
+++ extensions/SmiliesSupport/smilies/ipb/smilies.txt	(revision 14526)
@@ -0,0 +1,22 @@
+:)		sourire.gif
+:-)		sourire.gif
+:D		happy.gif
+:-D		happy.gif
+;)		wink.gif
+;-)		wink.gif
+:P		langue.gif
+:p		langue.gif
+:-p		langue.gif
+:-P		langue.gif
+:(		triste.gif
+:-(		triste.gif
+;(		pleure.gif
+;-(		pleure.gif
+oO		perplexe.gif
+Oo		perplexe.gif
+OO		perplexe.gif
+:o		surpris.gif
+:O		surpris.gif
+:-o		surpris.gif
+:-O		surpris.gif
+<3		wub.gif
Index: extensions/SmiliesSupport/smilies/smilies.txt
===================================================================
--- extensions/SmiliesSupport/smilies/smilies.txt	(revision 14525)
+++ 	(revision )
@@ -1,22 +1,0 @@
-:)		sourire.gif
-:-)		sourire.gif
-:D		happy.gif
-:-D		happy.gif
-;)		wink.gif
-;-)		wink.gif
-:P		langue.gif
-:p		langue.gif
-:-p		langue.gif
-:-P		langue.gif
-:(		triste.gif
-:-(		triste.gif
-;(		pleure.gif
-;-(		pleure.gif
-oO		perplexe.gif
-Oo		perplexe.gif
-OO		perplexe.gif
-:o		surpris.gif
-:O		surpris.gif
-:-o		surpris.gif
-:-O		surpris.gif
-<3		wub.gif
Index: extensions/SmiliesSupport/smilies/sylvia/index.php
===================================================================
--- extensions/SmiliesSupport/smilies/sylvia/index.php	(revision 14526)
+++ extensions/SmiliesSupport/smilies/sylvia/index.php	(revision 14526)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/SmiliesSupport/smilies/sylvia/smilies.txt
===================================================================
--- extensions/SmiliesSupport/smilies/sylvia/smilies.txt	(revision 14526)
+++ extensions/SmiliesSupport/smilies/sylvia/smilies.txt	(revision 14526)
@@ -0,0 +1,25 @@
+:)		smile.png
+:-)		smile.png
+:D		biggrin.png
+:-D		biggrin.png
+;)		wink.png
+;-)		wink.png
+:P		razz.png
+:p		razz.png
+:-p		razz.png
+:-P		razz.png
+:(		sad.png
+:-(		sad.png
+;(		cry.png
+;-(		cry.png
+oO		eek.png
+Oo		eek.png
+OO		eek.png
+:o		surprised.png
+:O		surprised.png
+:-o		surprised.png
+:-O		surprised.png
+:s		confused.png
+:S		confused.png
+:|		neutral.png
+:-|		neutral.png
Index: extensions/SmiliesSupport/smiliessupport.inc.php
===================================================================
--- extensions/SmiliesSupport/smiliessupport.inc.php	(revision 14525)
+++ extensions/SmiliesSupport/smiliessupport.inc.php	(revision 14526)
@@ -8,23 +8,10 @@
   
   load_language('plugin.lang', SMILIES_PATH);
-  $conf_smiliessupport = explode(',' , $conf['smiliessupport']);
-  
-  $smilies = get_smilies($conf_smiliessupport);
-  
-  // edit field has different id
-  // if (
-    // (isset($_GET['action']) AND $_GET['action'] == 'edit_comment') 
-    // OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')
-  // ) {
-    // $template->assign('smilies_textarea', 'contenteditid');
-  // } else {
-    // $template->assign('smilies_textarea', 'contentid');
-  // }
-  $template->assign('smilies_textarea', 'contentid');
-  
+  $conf_smiliessupport = unserialize($conf['smiliessupport']);
+
   $template->assign(array(
     'SMILIES_PATH' => SMILIES_PATH,
-    'REPRESENTANT' => PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/'.$conf_smiliessupport[2],
-    'smiliesfiles' => $smilies,
+    'REPRESENTANT' => SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$conf_smiliessupport['representant'],
+    'smiliesfiles' => get_smilies($conf_smiliessupport),
   ));
   
@@ -34,5 +21,5 @@
 function set_smiliessupport_prefilter($content, &$smarty)
 {
-  $search = "<label>{'Comment'|@translate}";
+  $search = '<div id="commentAdd">';
   $replace = file_get_contents(SMILIES_PATH.'/template/smiliessupport_page.tpl').$search;
   return str_replace($search, $replace, $content);
@@ -44,5 +31,5 @@
   $accepted_ext = array('gif', 'jpg', 'png');
   
-  if ($handle = opendir(PHPWG_ROOT_PATH.$conf_smiliessupport[0]))
+  if ($handle = opendir(SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder']))
   {
     $i = 1;
@@ -52,7 +39,7 @@
       {
         $smilies[] = array(
-          'PATH' => PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/'.$file,
+          'PATH' => SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$file,
           'TITLE' => ':'.get_filename_wo_extension($file).':',
-          'TR' => ($i>0 AND $i%$conf_smiliessupport[1] == 0) ? '</tr><tr>' : null,
+          'TR' => ($i>0 AND $i%$conf_smiliessupport['cols'] == 0) ? '</tr><tr>' : null,
         );
         $i++;
@@ -60,4 +47,5 @@
     }
     
+    closedir($handle);
     return $smilies;
   } 
@@ -73,10 +61,10 @@
   global $conf;
 
-  $conf_smiliessupport = explode("," , $conf['smiliessupport']);
-  $def_path = $conf_smiliessupport[0].'/smilies.txt';
+  $conf_smiliessupport = unserialize($conf['smiliessupport']);
+  $def_path = SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/smilies.txt';
   $accepted_ext = array('gif', 'jpg', 'png');
   $str = ' '.$str;
   
-  if ($handle = opendir(PHPWG_ROOT_PATH.$conf_smiliessupport[0]))
+  if ($handle = opendir(SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder']))
   {
     while (false !== ($file = readdir($handle)))
@@ -86,8 +74,10 @@
         $filename = get_filename_wo_extension($file);
         $v = ':'.$filename.':'; 
-        $s = '<img src="'.$conf_smiliessupport[0].'/'.$file.'" alt=":'.$filename.':"/>';
+        $s = '<img src="'.SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$file.'" alt=":'.$filename.':"/>';
         $str = str_replace($v, $s, $str);
       }
     }
+    
+    closedir($handle);
   }
   
@@ -102,5 +92,5 @@
         $filename = get_filename_wo_extension($matches[2]);
         $v = '#([^"])'.preg_quote($matches[1],'/').'#';          
-        $t = '$1<img src="'.$conf_smiliessupport[0].'/'.$matches[2].'" alt=":'.$filename.':"/>';
+        $t = '$1<img src="'.SMILIES_PATH.'smilies/'.$conf_smiliessupport['folder'].'/'.$matches[2].'" alt=":'.$filename.':"/>';
         $str = preg_replace($v, $t, $str);
       }
Index: extensions/SmiliesSupport/template/smiliessupport_admin.tpl
===================================================================
--- extensions/SmiliesSupport/template/smiliessupport_admin.tpl	(revision 14525)
+++ extensions/SmiliesSupport/template/smiliessupport_admin.tpl	(revision 14526)
@@ -2,15 +2,10 @@
 {include file='include/autosize.inc.tpl'}
 
-{footer_script require="jquery.cluetip"}
-{literal}
-  jQuery().ready(function(){
-    // Cluetip
-    jQuery('.cluetip').cluetip({
-      width: 550,
-      splitTitle: '|'
-    });
+{footer_script require="jquery.cluetip"}{literal}
+  jQuery('.cluetip').cluetip({
+    width: 550,
+    splitTitle: '|'
   });
-{/literal}
-{/footer_script}
+{/literal}{/footer_script}
 
 {html_head}
@@ -37,5 +32,5 @@
 </div>
 
-<form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> 
+<form method="post" action="" class="properties"> 
   <fieldset>
       <legend>{'Configuration'|@translate}</legend>    
@@ -43,5 +38,7 @@
     <li>
       <span class="property">{'Smileys\' folder'|@translate}</span>
-      <input type="text" size="40" name="text1" value="{$TEXT1_VALUE}" />
+      <select name="text1">
+        {html_options options=$sets selected=$TEXT1_VALUE}
+      </select>
     </li>
     <li>
@@ -51,5 +48,7 @@
     <li>
       <span class="property">{'Representative'|@translate}</span>
-      <input type="text" size="20" name="text3" value="{$TEXT3_VALUE}" />
+      <select name="text3">
+        {html_options options=$smilies selected=$TEXT3_VALUE}
+      </select>
     </li>
     <li>
Index: extensions/SmiliesSupport/template/smiliessupport_page.tpl
===================================================================
--- extensions/SmiliesSupport/template/smiliessupport_page.tpl	(revision 14525)
+++ extensions/SmiliesSupport/template/smiliessupport_page.tpl	(revision 14526)
@@ -6,9 +6,9 @@
 jQuery(document).ready(function() {
   if (jQuery('.markItUp').length == 0) {
-    jQuery('#{/literal}{$smilies_textarea}{literal}').markItUp({markupSet: []});
+    jQuery('#contentid').markItUp({markupSet: []});
   }
   jQuery('#SmiliesSupport').appendTo('.markItUpHeader ul:first-child');
   jQuery('#allsmilies').hover(function(){ 
-    jQuery("#{/literal}{$smilies_textarea}{literal}").focus();
+    jQuery("#contentid").focus();
     jQuery('#smiliesdiv').css('display',''); 
   });
@@ -25,5 +25,5 @@
 <ul style="display:none;">
 <li id="SmiliesSupport" class="markItUpButton markItUpDropMenu">
-  <a id="allsmilies" style="background-image:url({$Representative});" title="{'All Smilies'|@translate}"></a>
+  <a id="allsmilies" style="background-image:url({$REPRESENTANT});" title="{'All Smilies'|@translate}"></a>
 
   <ul id="smiliesdiv">
