$page['section_title'] = ''.l10n('Home').''.$conf['level_separator'].''.l10n('Skeleton').''; $page['title'] = l10n('Skeleton'); $page['body_id'] = 'theSkeletonPage'; $page['is_external'] = true; // inform Piwigo that you are on a new page } } /** * include public page */ function skeleton_loc_end_page() { global $page, $template; if (isset($page['section']) and $page['section']=='skeleton') { include(SKELETON_PATH . 'include/skeleton_page.inc.php'); } } /* * button on album and photos pages */ function skeleton_add_button() { global $template; $template->assign('SKELETON_PATH', SKELETON_PATH); $template->set_filename('skeleton_button', realpath(SKELETON_PATH.'template/my_button.tpl')); $button = $template->parse('skeleton_button', true); if (script_basename()=='index') { $template->add_index_button($button, BUTTONS_RANK_NEUTRAL); } else { $template->add_picture_button($button, BUTTONS_RANK_NEUTRAL); } } /** * add a prefilter on photo page */ function skeleton_loc_end_picture() { global $template; $template->set_prefilter('picture', 'skeleton_picture_prefilter'); } function skeleton_picture_prefilter($content) { $search = '{if $display_info.author and isset($INFO_AUTHOR)}'; $replace = '
{\'Skeleton\'|@translate}
{\'Piwigo rocks\'|@translate}
'; return str_replace($search, $replace.$search, $content); }