'stripped', 'name' => 'stripped_black_bloc', 'theme_dir' => 'stripped_black_bloc', 'icon_dir' => 'themes/stripped/icon', 'img_dir' => 'themes/stripped_black_bloc/img', 'admin_icon_dir' => 'themes/default/icon/admin', 'mime_icon_dir' => 'themes/default/icon/mimetypes/', 'local_head' => 'local_head.tpl', 'load_parent_local_head' => true, ); global $stripped; $stripped['themeStyle']='original'; load_language('theme.lang', PHPWG_THEMES_PATH.'stripped_black_bloc/'); // Need upgrade? include(PHPWG_THEMES_PATH.'stripped_black_bloc/admin/upgrade.inc.php'); add_event_handler('init', 'set_config_values_stripped_black_bloc'); function set_config_values_stripped_black_bloc() { global $conf, $template; $config = safe_unserialize( $conf['stripped_black_bloc'] ); $template->assign( 'stripped_black_bloc', $config ); } /// EVENT /************************************ thumbnails and category_thumbnails ************************************/ add_event_handler('loc_end_index_category_thumbnails', 'stripped_black_bloc'); add_event_handler('loc_end_index_thumbnails', 'stripped_black_bloc'); function stripped_black_bloc($tpl_thumbnails_var) { global $template, $conf; if (defined('RVTS_VERSION')) { $template->func_combine_script( array( 'id'=> 'sc_tscroller', 'load'=> 'async', 'path'=> PHPWG_THEMES_PATH.'stripped_black_bloc/js/tscroller.min.js', 'require' => 'jquery', ), $template->smarty); } $config = safe_unserialize( $conf['stripped_black_bloc'] ); $template->assign( 'stripped_black_bloc', $config ); $new_tplvar=array(); $i=1; foreach ($tpl_thumbnails_var as $tplvar) { $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "twocol" : "onecol"; $new_tplvar[]=$tplvar; $i= ($i==$config['every_x']) ? 1 : $i+1 ; } return $new_tplvar; } add_event_handler('init', 'stripped_black_bloc_init'); function stripped_black_bloc_init() { remove_event_handler('loc_begin_index', 'modify_nb_thumbnail_page'); } /************************************ index.tpl ************************************/ add_event_handler('loc_end_index', 'stripped_black_bloc_index'); function stripped_black_bloc_index() { global $template; $template->set_prefilter('index', 'stripped_black_bloc_prefilter_index'); } function stripped_black_bloc_prefilter_index($content, &$smarty) { global $page; $search = "#\{\'Menu\'\|@translate\}#"; $replacement = "{'Show/hide menu'|@translate}"; $content = preg_replace($search, $replacement, $content); $search = '#