} trigger_notify('loading_lang'); load_language('lang', PHPWG_ROOT_PATH . PWG_LOCAL_DIR, array('no_fallback' => true, 'local' => true)); // only now we can set the localized username of the guest user (and not in // include/user.inc.php) if (is_a_guest()) { $user['username'] = l10n('guest'); } // template instance if (defined('IN_ADMIN') and IN_ADMIN) { // Admin template $template = new Template(PHPWG_ROOT_PATH . 'admin/themes', $conf['admin_theme']); } else { // Classic template $theme = $user['theme']; if (script_basename() != 'ws' and mobile_theme()) { $theme = $conf['mobile_theme']; } $template = new Template(PHPWG_ROOT_PATH . 'themes', $theme); } if (!isset($conf['no_photo_yet'])) { include PHPWG_ROOT_PATH . 'include/no_photo_yet.inc.php'; } if (isset($user['internal_status']['guest_must_be_guest']) and $user['internal_status']['guest_must_be_guest'] === true) { $header_msgs[] = l10n('Bad status for user "guest", using default status. Please notify the webmaster.'); } if ($conf['gallery_locked']) { $header_msgs[] = l10n('The gallery is locked for maintenance. Please, come back later.'); if (script_basename() != 'identification' and !is_admin()) { set_status_header(503, 'Service Unavailable'); @header('Retry-After: 900');
function mobile_link() { global $template, $conf; $config = unserialize($conf['smartpocket']); $template->assign('smartpocket', $config); if (!empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme())) { $template->assign(array('TOGGLE_MOBILE_THEME_URL' => add_url_params(htmlspecialchars($_SERVER['REQUEST_URI']), array('mobile' => mobile_theme() ? 'false' : 'true')))); } }
$template->set_filenames(array('tail' => 'footer.tpl')); trigger_notify('loc_begin_page_tail'); $template->assign(array('VERSION' => $conf['show_version'] ? PHPWG_VERSION : '', 'PHPWG_URL' => defined('PHPWG_URL') ? PHPWG_URL : '')); //--------------------------------------------------------------------- contact if (!is_a_guest()) { $template->assign('CONTACT_MAIL', get_webmaster_mail_address()); } //------------------------------------------------------------- generation time $debug_vars = array(); if ($conf['show_queries']) { $debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug)); } if ($conf['show_gt']) { if (!isset($page['count_queries'])) { $page['count_queries'] = 0; $page['queries_time'] = 0; } $time = get_elapsed_time($t2, get_moment()); $debug_vars = array_merge($debug_vars, array('TIME' => $time, 'NB_QUERIES' => $page['count_queries'], 'SQL_TIME' => number_format($page['queries_time'], 3, '.', ' ') . ' s')); } $template->assign('debug', $debug_vars); //------------------------------------------------------------- mobile version if (!empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme())) { $template->assign('TOGGLE_MOBILE_THEME_URL', add_url_params(htmlspecialchars($_SERVER['REQUEST_URI']), array('mobile' => mobile_theme() ? 'false' : 'true'))); } trigger_notify('loc_end_page_tail'); // // Generate the page // $template->parse('tail'); $template->p();
<?php /* Plugin Name: Polaroid Version: auto Description: Turn Your Thumbnails Into Polaroids Plugin URI: http://piwigo.org/ext/extension_view.php?eid= Author: plg Author URI: http://le-gall.net/pierrick */ global $conf; if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } if (mobile_theme()) { return; } define('POLAROID_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); add_event_handler('init', 'polaroid_init'); function polaroid_init() { global $conf; } add_event_handler('get_admin_plugin_menu_links', 'polaroid_admin_menu'); function polaroid_admin_menu($menu) { global $page; array_push($menu, array('NAME' => 'Polaroid', 'URL' => get_root_url() . 'admin.php?page=plugin-polaroid')); return $menu; } add_event_handler('loc_begin_index', 'polaroid_index', 70);