set_filename('TAT_js_css', PHPWG_PLUGINS_PATH.'TakeATour/tpl/js_css.tpl');
$template->parse('TAT_js_css');//http://piwigo.org/forum/viewtopic.php?id=23248
if (isset($TAT_restart) and $TAT_restart)
{
$TAT_restart=false;
$template->assign('TAT_restart',true);
}
$tat_path=str_replace(basename($_SERVER['SCRIPT_NAME']),'', $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);
//$tat_path=$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
$template->assign('TAT_path', $tat_path);
$template->set_filename('TAT_tour_tpl', PHPWG_PLUGINS_PATH.'TakeATour/tpl/'.$tour_to_launch.'.tpl');
$template->parse('TAT_tour_tpl');
unset($tour_to_launch);
}
if ( defined('IN_ADMIN') and IN_ADMIN )
{
/* first contact */
add_event_handler('loc_end_element_set_global', 'TAT_FC_14');
add_event_handler('loc_end_picture_modify', 'TAT_FC_16');
add_event_handler('loc_end_picture_modify', 'TAT_FC_17');
add_event_handler('loc_end_cat_modify', 'TAT_FC_23');
add_event_handler('loc_end_themes_installed', 'TAT_FC_35');
}
function TAT_FC_14() {
global $template;
$template->set_prefilter('batch_manager_global', 'TAT_FC_14_prefilter');
}
function TAT_FC_14_prefilter ($content, &$smarty) {
$search = '{\'Linked albums\'|@translate}';
return str_replace($search, $replacement, $content);
}
function TAT_FC_17() {
global $template;
$template->set_prefilter('picture_modify', 'TAT_FC_17_prefilter');
}
function TAT_FC_17_prefilter ($content, &$smarty) {
$search = '{\'Representation of albums\'|@translate}';
$replacement = '{\'Representation of albums\'|@translate}';
return str_replace($search, $replacement, $content);
}
function TAT_FC_23() {
global $template;
$template->set_prefilter('album_properties', 'TAT_FC_23_prefilter');
}
function TAT_FC_23_prefilter ($content, &$smarty) {
$search = '{\'Lock\'|@translate}';
$replacement = '{\'Lock\'|@translate}';
return str_replace($search, $replacement, $content);
}
function TAT_FC_35() {
global $template;
$template->set_prefilter('themes', 'TAT_FC_35_prefilter');
}
function TAT_FC_35_prefilter ($content, &$smarty) {
$search = 'set_filename('TAT_js_css', PHPWG_PLUGINS_PATH.'TakeATour/tpl/js_css.tpl');
$template->parse('TAT_js_css');//http://piwigo.org/forum/viewtopic.php?id=23248
$template->set_filename('TAT_tour_tpl', PHPWG_PLUGINS_PATH.'TakeATour/tpl/'.$tour_to_launch.'.tpl');
$template->parse('TAT_tour_tpl');
}*/
add_event_handler('get_admin_plugin_menu_links', 'TAT_admin_menu' );
function TAT_admin_menu($menu)
{
array_push($menu, array(
'NAME' => 'Take a Tour',
'URL' => get_root_url().'admin.php?page=plugin-TakeATour'
)
);
return $menu;
}
?>