aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/cat_modify.php2
-rw-r--r--admin/cat_move.php4
-rw-r--r--admin/cat_options.php2
-rw-r--r--admin/cat_perm.php2
-rw-r--r--admin/configuration.php2
-rw-r--r--admin/extend_for_templates.php2
-rw-r--r--admin/group_list.php2
-rw-r--r--admin/history.php2
-rw-r--r--admin/maintenance.php2
-rw-r--r--admin/notification_by_mail.php2
-rw-r--r--admin/permalinks.php2
-rw-r--r--admin/popuphelp.php82
-rw-r--r--admin/site_manager.php2
-rw-r--r--admin/site_update.php2
-rw-r--r--admin/stats.php2
-rw-r--r--admin/themes/default/template/popuphelp.tpl2
-rw-r--r--admin/thumbnail.php7
-rw-r--r--admin/user_list.php2
-rw-r--r--include/common.inc.php3
-rw-r--r--themes/default/template/popuphelp.tpl12
20 files changed, 116 insertions, 22 deletions
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index cf1556a1f..d48d79ad2 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -257,7 +257,7 @@ $template->assign(
'MAIL_CONTENT' => empty($_POST['mail_content'])
? '' : stripslashes($_POST['mail_content']),
'U_CHILDREN' => $cat_list_url.'&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,
)
diff --git a/admin/cat_move.php b/admin/cat_move.php
index 4b82d56c0..83f026d68 100644
--- a/admin/cat_move.php
+++ b/admin/cat_move.php
@@ -65,8 +65,8 @@ $template->set_filename('cat_move', 'cat_move.tpl');
$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',
)
);
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 1404656ed..2daa2a539 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -151,7 +151,7 @@ $base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&section=';
$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']
)
);
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index 01e111c86..d5d9ec320 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -202,7 +202,7 @@ $template->assign(
$page['cat'],
'admin.php?page=cat_modify&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&cat='.$page['cat']
)
);
diff --git a/admin/configuration.php b/admin/configuration.php
index dd09df478..ae03b1690 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -233,7 +233,7 @@ $action.= '&section='.$page['section'];
$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
));
diff --git a/admin/extend_for_templates.php b/admin/extend_for_templates.php
index 679ac90a3..79321191e 100644
--- a/admin/extend_for_templates.php
+++ b/admin/extend_for_templates.php
@@ -172,7 +172,7 @@ $base_url = PHPWG_ROOT_PATH.'admin.php?page=extend_for_templates';
$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);
foreach ($tpl_extension as $file => $conditions)
diff --git a/admin/group_list.php b/admin/group_list.php
index 91ecb3dd0..d79b3aa9a 100644
--- a/admin/group_list.php
+++ b/admin/group_list.php
@@ -159,7 +159,7 @@ $template->set_filenames(array('group_list' => 'group_list.tpl'));
$template->assign(
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(),
)
);
diff --git a/admin/history.php b/admin/history.php
index e49cbd9f0..bcd812b5d 100644
--- a/admin/history.php
+++ b/admin/history.php
@@ -170,7 +170,7 @@ history_tabsheet();
$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'
)
);
diff --git a/admin/maintenance.php b/admin/maintenance.php
index 06dc67474..586bc3d4c 100644
--- a/admin/maintenance.php
+++ b/admin/maintenance.php
@@ -140,7 +140,7 @@ $template->assign(
'U_MAINT_C13Y' => $start_url.'c13y',
'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',
)
);
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php
index 8235ca960..eb36beb00 100644
--- a/admin/notification_by_mail.php
+++ b/admin/notification_by_mail.php
@@ -582,7 +582,7 @@ $template->assign
(
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())
)
);
diff --git a/admin/permalinks.php b/admin/permalinks.php
index 770c3e1bf..7d847d3c6 100644
--- a/admin/permalinks.php
+++ b/admin/permalinks.php
@@ -173,7 +173,7 @@ while ( $row = pwg_db_fetch_assoc($result) )
$deleted_permalinks[] = $row;
}
$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');
?>
diff --git a/admin/popuphelp.php b/admin/popuphelp.php
new file mode 100644
index 000000000..962b2b578
--- /dev/null
+++ b/admin/popuphelp.php
@@ -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');
+
+?> \ No newline at end of file
diff --git a/admin/site_manager.php b/admin/site_manager.php
index e0f29a577..cb3a69318 100644
--- a/admin/site_manager.php
+++ b/admin/site_manager.php
@@ -205,7 +205,7 @@ SELECT galleries_url
$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(),
)
diff --git a/admin/site_update.php b/admin/site_update.php
index 4d63ca936..a42139e92 100644
--- a/admin/site_update.php
+++ b/admin/site_update.php
@@ -846,7 +846,7 @@ $template->assign(
'L_RESULT_UPDATE'=>$result_title.l10n('Search for new images in the directories'),
'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',
));
// +-----------------------------------------------------------------------+
diff --git a/admin/stats.php b/admin/stats.php
index 4f72dde1f..b693ebcaa 100644
--- a/admin/stats.php
+++ b/admin/stats.php
@@ -382,7 +382,7 @@ $template->assign(
array(
'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,
)
);
diff --git a/admin/themes/default/template/popuphelp.tpl b/admin/themes/default/template/popuphelp.tpl
index 950e3ca0e..718617baf 100644
--- a/admin/themes/default/template/popuphelp.tpl
+++ b/admin/themes/default/template/popuphelp.tpl
@@ -1,3 +1,5 @@
+{known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" }
+
<div id="content" class="content">
{$HELP_CONTENT}
</div> <!-- content -->
diff --git a/admin/thumbnail.php b/admin/thumbnail.php
index 0028b39a7..b945fc7c2 100644
--- a/admin/thumbnail.php
+++ b/admin/thumbnail.php
@@ -162,16 +162,15 @@ if (!function_exists('gd_info'))
// +-----------------------------------------------------------------------+
$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 |
// +-----------------------------------------------------------------------+
$wo_thumbnails = array();
$thumbnalized = array();
-
// what is the directory to search in ?
$query = '
SELECT galleries_url FROM '.SITES_TABLE.'
diff --git a/admin/user_list.php b/admin/user_list.php
index 8b1dd4707..a42bee36c 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -516,7 +516,7 @@ else
$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,
'F_USERNAME' => @htmlentities($_GET['username']),
diff --git a/include/common.inc.php b/include/common.inc.php
index dddc9b6d9..878dcda12 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -152,8 +152,7 @@ if (is_a_guest())
}
// 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']);
}
diff --git a/themes/default/template/popuphelp.tpl b/themes/default/template/popuphelp.tpl
new file mode 100644
index 000000000..cd02555d5
--- /dev/null
+++ b/themes/default/template/popuphelp.tpl
@@ -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>
+