Darathor
Citation :
But : Ce Sous-MOD gère l'inclusion des feuilles de style générées par Additionnal files dans les headers.
Prérequis :
- [Sous-MOD] Additionnal files (1.0)
Auteur : Darathor (darathor@free.fr)
Version : DEV - B (07/10/2006)
Compatibilité phpBB : 2.0.21
Importation :
Code :
$imported_mods_data[] = array('mod_id' => '1', 'unique_id' => '1159028806_a12bd1a0f85d207a205c95d4d9029934615500d5638fabbb2a8c68fe53889ab5', 'mod_activated' => '1', 'mod_name' => '[Sous-MOD] Additional CSS', 'mod_description' => 'Gère l\'ajout de feuilles de styles supplémentaires.', 'mod_version' => '1.0', 'mod_author' => 'Darathor', 'mod_author_email' => 'darathor@free.fr', 'mod_support' => 'http://admforum.edforum.net/');
$imported_files_groups_data[] = array('group_id' => '1', 'unique_id' => '1159103922_7696e4d565e1efcc78d27d9ca5baeaf874685f878fd5a0c7017342df6c5a64d328bda53c86d37e275a3ebfdc113b1f59', 'group_name' => 'Feuilles de style', 'group_mod' => '1159028806_a12bd1a0f85d207a205c95d4d9029934615500d5638fabbb2a8c68fe53889ab5');
$imported_files_associations_data[] = array('file_id' => '1159103582_7696e4d565e1efcc78d27d9ca5baeaf80ace9b617dc3ac031c8b882a1fcd694d454cecc4829279e64d624cd8a8c9ddf1', 'group_id' => '1159103922_7696e4d565e1efcc78d27d9ca5baeaf874685f878fd5a0c7017342df6c5a64d328bda53c86d37e275a3ebfdc113b1f59');
$imported_files_associations_data[] = array('file_id' => '1159103591_7696e4d565e1efcc78d27d9ca5baeaf880ea47ba833657d742e5395ceb409299454cecc4829279e64d624cd8a8c9ddf1', 'group_id' => '1159103922_7696e4d565e1efcc78d27d9ca5baeaf874685f878fd5a0c7017342df6c5a64d328bda53c86d37e275a3ebfdc113b1f59');
$imported_files_associations_data[] = array('file_id' => '1159103578_7696e4d565e1efcc78d27d9ca5baeaf89a8e03096526dab4b4e8a217c23018a5454cecc4829279e64d624cd8a8c9ddf1', 'group_id' => '1159103922_7696e4d565e1efcc78d27d9ca5baeaf874685f878fd5a0c7017342df6c5a64d328bda53c86d37e275a3ebfdc113b1f59');
Dans "includes/functions.php" :
Code :
#
# Trouver
#
?>
#
# Ajouter avant
#
// DEBUT MOD Additional CSS
/**
* Génère les balises d'inclusions des feuilles de styles.
*/
function ACSS_attach_css()
{
global $template, $lang, $images, $board_config, $phpbb_root_path, $phpEx, $userdata, $db;
require_once($phpbb_root_path . 'includes/functions_additional_files.' . $phpEx);
$file_rows = AdFi_get_file_rows_in_cache('Feuilles de style');
$style = ($userdata['user_style']) ? $userdata['user_style'] : $board_config['default_style'];
foreach($file_rows as $row)
{
$template->assign_block_vars('css_row', array(
'URL' => AdFi_generate_file_name($row, $style))
);
}
}
// FIN MOD Additional CSS
Dans "includes/page_header.php" :
Code :
#
# Trouver
#
//
// Login box?
//
#
# Ajouter avant
#
// DEBUT MOD Additional CSS
ACSS_attach_css();
// FIN MOD Additional CSS
Dans "admin/page_header_admin.php" :
Code :
#
# Trouver
#
$template->pparse('header');
#
# Ajouter avant
#
// DEBUT MOD Additional CSS
ACSS_attach_css();
// FIN MOD Additional CSS
Dans "templates/subSilver/overall_header.tpl" :
Code :
#
# Trouver
#
<title>{SITENAME} :: {PAGE_TITLE}</title>
#
# Ajouter après
#
<!-- BEGIN css_row -->
<link rel="stylesheet" href="{css_row.URL}" type="text/css" />
<!-- END css_row -->
Dans "templates/subSilver/simple_header.tpl" :
Code :
#
# Trouver
#
<title>{SITENAME} :: {PAGE_TITLE}</title>
#
# Ajouter après
#
<!-- BEGIN css_row -->
<link rel="stylesheet" href="{css_row.URL}" type="text/css" />
<!-- END css_row -->
Dans "templates/subSilver/admin/page_header.tpl" :
Code :
#
# Trouver
#
<title>{SITENAME} - {L_PHPBB_ADMIN}</title>
#
# Ajouter après
#
<!-- BEGIN css_row -->
<link rel="stylesheet" href="{css_row.URL}" type="text/css" />
<!-- END css_row -->