mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 03:39:57 +03:00
Bug 1617 fixed : help page is displayed in current theme in public or admin pages
git-svn-id: http://piwigo.org/svn/trunk@5920 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
43a30afea6
commit
94d40c0eab
20 changed files with 116 additions and 22 deletions
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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',
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -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']
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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']
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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
|
||||
));
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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(),
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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'
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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',
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -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())
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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');
|
||||
?>
|
||||
|
|
82
admin/popuphelp.php
Normal file
82
admin/popuphelp.php
Normal file
|
@ -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');
|
||||
|
||||
?>
|
|
@ -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(),
|
||||
)
|
||||
|
|
|
@ -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',
|
||||
));
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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']),
|
||||
|
|
|
@ -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']);
|
||||
}
|
||||
|
|
12
themes/default/template/popuphelp.tpl
Normal file
12
themes/default/template/popuphelp.tpl
Normal file
|
@ -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>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue