Index: /trunk/admin/cat_modify.php
===================================================================
--- /trunk/admin/cat_modify.php	(revision 5919)
+++ /trunk/admin/cat_modify.php	(revision 5920)
@@ -258,5 +258,5 @@
         ? '' : stripslashes($_POST['mail_content']),
     'U_CHILDREN' => $cat_list_url.'&amp;parent_id='.$category['id'],
-    'U_HELP' => get_root_url().'popuphelp.php?page=cat_modify',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify',
 
     'F_ACTION' => $form_action,
Index: /trunk/admin/cat_move.php
===================================================================
--- /trunk/admin/cat_move.php	(revision 5919)
+++ /trunk/admin/cat_move.php	(revision 5920)
@@ -66,6 +66,6 @@
 $template->assign(
   array(
-    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=cat_move',
-    'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=cat_move',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_move',
+    'F_ACTION' => get_root_url().'admin.php?page=cat_move',
     )
   );
Index: /trunk/admin/cat_options.php
===================================================================
--- /trunk/admin/cat_options.php	(revision 5919)
+++ /trunk/admin/cat_options.php	(revision 5920)
@@ -152,5 +152,5 @@
 $template->assign(
   array(
-    'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_options',
     'F_ACTION'=>$base_url.$page['section']
    )
Index: /trunk/admin/cat_perm.php
===================================================================
--- /trunk/admin/cat_perm.php	(revision 5919)
+++ /trunk/admin/cat_perm.php	(revision 5920)
@@ -203,5 +203,5 @@
         'admin.php?page=cat_modify&amp;cat_id='
         ),
-    'U_HELP' => get_root_url().'popuphelp.php?page=cat_perm',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_perm',
     'F_ACTION' => get_root_url().'admin.php?page=cat_perm&amp;cat='.$page['cat']
     )
Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 5919)
+++ /trunk/admin/configuration.php	(revision 5920)
@@ -234,5 +234,5 @@
 $template->assign(
   array(
-    'U_HELP' => get_root_url().'popuphelp.php?page=configuration',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=configuration',
     'F_ACTION'=>$action
     ));
Index: /trunk/admin/extend_for_templates.php
===================================================================
--- /trunk/admin/extend_for_templates.php	(revision 5919)
+++ /trunk/admin/extend_for_templates.php	(revision 5920)
@@ -173,5 +173,5 @@
 $template->assign(
   array(
-    'U_HELP' => get_root_url().'popuphelp.php?page=extend_for_templates',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=extend_for_templates',
     ));
 ksort($tpl_extension);
Index: /trunk/admin/group_list.php
===================================================================
--- /trunk/admin/group_list.php	(revision 5919)
+++ /trunk/admin/group_list.php	(revision 5920)
@@ -160,5 +160,5 @@
   array(
     'F_ADD_ACTION' => get_root_url().'admin.php?page=group_list',
-    'U_HELP' => get_root_url().'popuphelp.php?page=group_list',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=group_list',
     'PWG_TOKEN' => get_pwg_token(),
     )
Index: /trunk/admin/history.php
===================================================================
--- /trunk/admin/history.php	(revision 5919)
+++ /trunk/admin/history.php	(revision 5920)
@@ -171,5 +171,5 @@
 $template->assign(
   array(
-    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=history',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=history',
     'F_ACTION' => get_root_url().'admin.php?page=history'
     )
Index: /trunk/admin/maintenance.php
===================================================================
--- /trunk/admin/maintenance.php	(revision 5919)
+++ /trunk/admin/maintenance.php	(revision 5920)
@@ -141,5 +141,5 @@
 	'U_MAINT_SEARCH' => $start_url.'search',
     'U_MAINT_COMPILED_TEMPLATES' => $start_url.'compiled-templates',
-    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=maintenance',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=maintenance',
     )
   );
Index: /trunk/admin/notification_by_mail.php
===================================================================
--- /trunk/admin/notification_by_mail.php	(revision 5919)
+++ /trunk/admin/notification_by_mail.php	(revision 5920)
@@ -583,5 +583,5 @@
   array
   (
-    'U_HELP' => add_url_params(get_root_url().'popuphelp.php', array('page' => 'notification_by_mail')),
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=notification_by_mail',
     'F_ACTION'=> $base_url.get_query_string_diff(array())
   )
Index: /trunk/admin/permalinks.php
===================================================================
--- /trunk/admin/permalinks.php	(revision 5919)
+++ /trunk/admin/permalinks.php	(revision 5920)
@@ -174,5 +174,5 @@
 }
 $template->assign('deleted_permalinks', $deleted_permalinks);
-$template->assign('U_HELP', get_root_url().'popuphelp.php?page=permalinks');
+$template->assign('U_HELP', get_root_url().'admin/popuphelp.php?page=permalinks');
 
 $template->assign_var_from_handle('ADMIN_CONTENT', 'permalinks');
Index: /trunk/admin/popuphelp.php
===================================================================
--- /trunk/admin/popuphelp.php	(revision 5920)
+++ /trunk/admin/popuphelp.php	(revision 5920)
@@ -0,0 +1,82 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// +-----------------------------------------------------------------------+
+// |                           initialization                              |
+// +-----------------------------------------------------------------------+
+
+define('PHPWG_ROOT_PATH', '../');
+define('PWG_HELP', true);
+define('IN_ADMIN', true);
+include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok                      |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+$page['body_id'] = 'thePopuphelpPage';
+$title = l10n('Piwigo Help');
+$page['page_banner'] = '<h1>'.$title.'</h1>';
+$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
+include(PHPWG_ROOT_PATH.'include/page_header.php');
+
+if
+  (
+    isset($_GET['page'])
+    and preg_match('/^[a-z_]*$/', $_GET['page'])
+  )
+{
+  $help_content =
+    load_language('help/'.$_GET['page'].'.html', '', array('return'=>true) );
+
+  if ($help_content == false)
+  {
+    $help_content = '';
+  }
+
+  $help_content = trigger_event(
+    'get_popup_help_content', $help_content, $_GET['page']);
+}
+else
+{
+  die('Hacking attempt!');
+}
+
+$template->set_filename('popuphelp','popuphelp.tpl');
+
+$template->assign(
+  array
+  (
+    'HELP_CONTENT' => $help_content
+  ));
+
+// +-----------------------------------------------------------------------+
+// |                           html code display                           |
+// +-----------------------------------------------------------------------+
+
+$template->pparse('popuphelp');
+
+include(PHPWG_ROOT_PATH.'include/page_tail.php');
+
+?>
Index: /trunk/admin/site_manager.php
===================================================================
--- /trunk/admin/site_manager.php	(revision 5919)
+++ /trunk/admin/site_manager.php	(revision 5920)
@@ -206,5 +206,5 @@
 $template->assign(
   array(
-    'U_HELP'    => get_root_url().'popuphelp.php?page=site_manager',
+    'U_HELP'    => get_root_url().'admin/popuphelp.php?page=site_manager',
     'F_ACTION'  => get_root_url().'admin.php'.get_query_string_diff(array('action','site','pwg_token')),
     'PWG_TOKEN' => get_pwg_token(),
Index: /trunk/admin/site_update.php
===================================================================
--- /trunk/admin/site_update.php	(revision 5919)
+++ /trunk/admin/site_update.php	(revision 5920)
@@ -847,5 +847,5 @@
     'L_RESULT_METADATA'=>$result_title.l10n('Metadata synchronization results'),
     'METADATA_LIST' => $used_metadata,
-    'U_HELP' => get_root_url().'popuphelp.php?page=synchronize',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=synchronize',
     ));
 
Index: /trunk/admin/stats.php
===================================================================
--- /trunk/admin/stats.php	(revision 5919)
+++ /trunk/admin/stats.php	(revision 5920)
@@ -383,5 +383,5 @@
     'L_STAT_TITLE' => implode($conf['level_separator'], $title_parts),
     'PERIOD_LABEL' => $period_label,
-    'U_HELP' => get_root_url().'popuphelp.php?page=history',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=history',
     'F_ACTION' => $base_url,
     )
Index: /trunk/admin/themes/default/template/popuphelp.tpl
===================================================================
--- /trunk/admin/themes/default/template/popuphelp.tpl	(revision 5919)
+++ /trunk/admin/themes/default/template/popuphelp.tpl	(revision 5920)
@@ -1,2 +1,4 @@
+{known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" }
+
 <div id="content" class="content">
 {$HELP_CONTENT}
Index: /trunk/admin/thumbnail.php
===================================================================
--- /trunk/admin/thumbnail.php	(revision 5919)
+++ /trunk/admin/thumbnail.php	(revision 5920)
@@ -163,7 +163,7 @@
 $template->set_filenames( array('thumbnail'=>'thumbnail.tpl') );
 
-$template->assign(array(
-  'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=thumbnail',
-  ));
+$template->assign(
+  array('U_HELP' => get_root_url().'admin/popuphelp.php?page=thumbnail')
+  );
 // +-----------------------------------------------------------------------+
 // |                   search pictures without thumbnails                  |
@@ -171,5 +171,4 @@
 $wo_thumbnails = array();
 $thumbnalized = array();
-
 
 // what is the directory to search in ?
Index: /trunk/admin/user_list.php
===================================================================
--- /trunk/admin/user_list.php	(revision 5919)
+++ /trunk/admin/user_list.php	(revision 5920)
@@ -517,5 +517,5 @@
 $template->assign(
   array(
-    'U_HELP' => get_root_url().'popuphelp.php?page=user_list',
+    'U_HELP' => get_root_url().'admin/popuphelp.php?page=user_list',
 
     'F_ADD_ACTION' => $base_url,
Index: /trunk/include/common.inc.php
===================================================================
--- /trunk/include/common.inc.php	(revision 5919)
+++ /trunk/include/common.inc.php	(revision 5920)
@@ -153,6 +153,5 @@
 
 // template instance
-if (( defined('IN_ADMIN') and IN_ADMIN )
-    or (defined('PWG_HELP') and PWG_HELP))
+if (defined('IN_ADMIN') and IN_ADMIN )
 {// Admin template
   $template = new Template(PHPWG_ROOT_PATH.'admin/themes', $conf['admin_theme']);
Index: /trunk/themes/default/template/popuphelp.tpl
===================================================================
--- /trunk/themes/default/template/popuphelp.tpl	(revision 5920)
+++ /trunk/themes/default/template/popuphelp.tpl	(revision 5920)
@@ -0,0 +1,12 @@
+<div id="content" class="content">
+{$HELP_CONTENT}
+</div> <!-- content -->
+
+<ul class="categoryActions">
+  <li>
+    <a href="#" onclick="window.close();" title="{'Close this window'|@translate}">
+      <img src="{$ROOT_URL}{$themeconf.icon_dir}/exit.png" class="button" alt="exit">
+    </a>
+  </li>
+</ul>
+
