/*******************************************************************************
*      Mod "onglet" :: version 1.0.4
*
*   ---------- Auteur --------------------------------------------------------
*   Auteur ::               Grummfy
*   Email ::                grummfy@yahoo.fr
*   Site Web ::             http://www.grummfy.com
*
*   ---------- Mod -----------------------------------------------------------
*   Nom ::                  MOD onglet
*   Version ::               1.0.4
*   Compatible ::            FSB 1.0.0
*
*   Description :: Ce mods permet de genere un systeme d'onglet utilisable depuis d'autre mods.
*
*   Temps d'installation ::   ~5 minutes
*   Requete ::               Non
*   Cache ::               Non
*   Fichiers joints ::         0
*   Fichiers  modifier ::      4
*
*   ---------- Note ----------------------------------------------------------
*   Installer ce mods tout seul ne vous servira  rien....
* ---------- Historique ----------------------------------------------------
* Commenc :: Le 12 / 01 / 2005
* Dernire modification :: Le 20 / 08 / 2005
*
* Le 12 / 01 / 2005 ::
*	Premire version du mods
* Le 12 / 01 / 2005 ::
*	Correction de l'install car oublie de la partie admin....
* Le 12 / 01 / 2005 ::
*	Mise en place d'un systeme de mise en vidence des ongleet slectionn.
* Le 31 / 01 / 2005 ::
*	Correction d'un petit bug et oubli
* Le 20 / 08 / 2005 ::
*	Modification lgre du code
*
*******************************************************************************/

#
# [1] ---------- ouvrir ---------------------------------------------------------
#
includes/header_forum.php

#
# [2] ---------- chercher -------------------------------------------------------
#
$tpl->assign_block_vars('liens_pages', array('LIENS' => $liens_header ));

#
# [3] ---------- avant, ajouter -------------------------------------------------
#
// mods :: onglet ---------------------------------------------------------------
// ajout
if (isset($onglet_cache))
{
	$tpl->create_block('mod_onglet_on');
	if (isset($onglet_cache['max']))
	{
		$tpl->assign_vars( array('MAX_ONGLET'	=> $onglet_cache['max']) );
		unset($onglet_cache['max']);
	}
	else
	{
		$tpl->assign_vars( array('MAX_ONGLET'	=> '20') );
	}
	foreach($onglet_cache as $value)
	{
		$tpl->assign_block_vars('cache_onglet', array('DIV' => $value));
	}
}
// fin ajout
// mods :: onglet ---------------------------------------------------------------

#
# [4] ---------- ouvrir ---------------------------------------------------------
#
admin/header_admin.php

#
# [5] ---------- chercher -------------------------------------------------------
#
$tpl->pparse('header');

#
# [6] ---------- avant, ajouter -------------------------------------------------
#
// mods :: onglet ---------------------------------------------------------------
// ajout
if (isset($onglet_cache))
{
	$tpl->create_block('mod_onglet_on');
	if (isset($onglet_cache['max']))
	{
		$tpl->assign_vars( array('MAX_ONGLET'	=> $onglet_cache['max']) );
		unset($onglet_cache['max']);
	}
	else
	{
		$tpl->assign_vars( array('MAX_ONGLET'	=> '20') );
	}
	foreach($onglet_cache as $value)
	{
		$tpl->assign_block_vars('cache_onglet', array('DIV' => $value));
	}
}
// fin ajout
// mods :: onglet ---------------------------------------------------------------

#
# [7] ---------- ouvrir ---------------------------------------------------------
#
themes/IceCold/headers.tpl

#
# [8] ---------- chercher -------------------------------------------------------
#

	<link type="text/css" rel="stylesheet" href="{RACINE}themes/{THEME}{V_FICHIER_CSS}.css" />
#
# [9] ---------- aprs ajouter --------------------------------------------------
#
	<!-- IFEXIST mod_onglet_on -->
	<script type="text/javascript">
	<!--
	var onglet_tabl_fond_select = '#D7D7D7';
	var onglet_tabl_fond = '#f0f0f0';
	function onglet(lediv,id)
	{
		var d = document.getElementById(lediv+id);
		var e = document.getElementById('onglet_'+lediv+id);
		for (var i = 1; i<={MAX_ONGLET}; i++)
		{
			if (document.getElementById(lediv+i))
			{
				document.getElementById(lediv+i).style.display='none';
			}
			if (document.getElementById('onglet_'+lediv+i))
			{
				document.getElementById('onglet_'+lediv+i).style.backgroundColor = onglet_tabl_fond;
				document.getElementById('onglet_'+lediv+i).style.fontWeight = '';
			}
		}
		if (d)
		{
			d.style.display = 'block';
		}
		if (e)
		{
			e.style.backgroundColor = onglet_tabl_fond_select;
			e.style.fontWeight = 'bold';
		}
	}
	function cache_tout_onglet()
	{
		<!-- BEGIN cache_onglet -->
		onglet('{cache_onglet.DIV}','1');
		<!-- END cache_onglet -->
	}
	window.onload = cache_tout_onglet;
	//-->
	</script>
	<!-- ENDIF -->

#
# [10] ---------- ouvrir ---------------------------------------------------------
#
themes/IceCold/admin/admin_headers.tpl

#
# [11] ---------- chercher -------------------------------------------------------
#
	<meta http-equiv="Content-Style-Type" content="text/css" />

#
# [12] ---------- aprs, ajouter -------------------------------------------------
#
	<!-- IFEXIST mod_onglet_on -->
	<script type="text/javascript">
	<!--
	var onglet_tabl_fond_select = '#D7D7D7';
	var onglet_tabl_fond = '#f0f0f0';
	function onglet(lediv,id)
	{
		var d = document.getElementById(lediv+id);
		var e = document.getElementById('onglet_'+lediv+id);
		for (var i = 1; i<={MAX_ONGLET}; i++)
		{
			if (document.getElementById(lediv+i))
			{
				document.getElementById(lediv+i).style.display='none';
			}
			if (document.getElementById('onglet_'+lediv+i))
			{
				document.getElementById('onglet_'+lediv+i).style.backgroundColor = onglet_tabl_fond;
				document.getElementById('onglet_'+lediv+i).style.fontWeight = '';
			}
		}
		if (d)
		{
			d.style.display = 'block';
		}
		if (e)
		{
			e.style.backgroundColor = onglet_tabl_fond_select;
			e.style.fontWeight = 'bold';
		}
	}
	function cache_tout_onglet()
	{
		<!-- BEGIN cache_onglet -->
		onglet('{cache_onglet.DIV}','1');
		<!-- END cache_onglet -->
	}
	window.onload = cache_tout_onglet;
	//-->
	</script>
	<!-- ENDIF -->