// ------------------------------------------------------------------------- //
// <G a n e s h a> - Free Web Based Training System                          //
// ------------------------------------------------------------------------- //
// <G a n e s h a> - Plate-forme de tlformation gratuite et en open source //
// ------------------------------------------------------------------------- //
// Copyright (C) 2001  Anma Formation  <http://www.anema-formation.fr/>     //
// ------------------------------------------------------------------------- //
//            Developer : Georges CALDEIRA <gcaldeira@anemalab.org>          //
// ------------------------------------------------------------------------- //
//               Infos on project <http://anemalab.org/>                     //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
// -------------------------------------------------------------------------
//
// Addon BNO (Bloc-notes et Objectifs) pour Ganesha
// Developper : pyg_listes@exiup.com
// -------------------
// Desc : installation de l'addon BNO
//
// -------------------------------------------------------------------------

0- Prenez conscience que cet addon est livr tel quel, sans garantie de bon fonctionnement, ni support.
   L'auteur ne pourra pas tre tenu responsable si l'installation l'addon BNO nuit au bon fonctionnement de votre Ganesha.
   Si c'est le cas, passez  l'tape 1.
1- Dezipper l'archive (a doit dj tre fait si vous lisez ce fichier!)
2- Placer le dossier "addons" dans l'arborescence de ganesha (au meme niveau que /cv et /docs)
3- Executer la requte sql du ficher bno.sql

CREATE TABLE `bno` (
  `type_outil` tinyint(3) unsigned NOT NULL default '0',
  `id_membre` tinyint(11) unsigned NOT NULL default '0',
  `id_groupe` tinyint(3) unsigned NOT NULL default '0',
  `date_maj` timestamp(14) NOT NULL,
  `contenu` longtext,
  PRIMARY KEY  (`type_outil`,`id_membre`,`id_groupe`)
) TYPE=MyISAM;

4- Editez votre fichier /ganesha/ganesha/inc/config.inc.php
Placez avant "// Gestion des repertoires de Phorum :" (ligne 90 approximativement)

  // debut modif BNO => Chemin d'accs (par defaut /votre_dossier_ganesha/e-carel/BNO/ (=/= /votre_dossier_ganesha/ganeshae-carel/BNO/ !)
  $HTTP['addons'] = $HTTP['main']."addons/";
  $HTTP['HTMLArea'] = $HTTP['addons']."htmlarea/";
  $HTTP['BNO'] = $HTTP['addons']."BNO/";
  $RP['addons'] = $RP['main']."addons/";
  $RP['BNO'] = $RP['addons']."BNO/";
  $Fichier['BNO_Stagiaire'] = "BNO";
  $Fichier['BNO_General'] = "BNO";
  $Fichier['BNO_Voir'] = "BNO_Voir";
  $Fichier['BNO_Liste'] = "BNO_Liste";
  $Fichier['BNO_Post'] = "BNO_Post";
  $TBL['BNO'] = "bno";
  // fin modif BNO => Chemin d'accs 

5- Editez votre fichier /ganesha/ganesha/inc/groupe.inc.php
Modification de la fonction InfoGroupe()
Placez sous "		put('			  <TR><TD>'.$st_texte["plangrp"].$a.'</TD></TR>')" (ligne 62 approx.)

		// debut modif Pyg [addon BNO] : ajoute le lien vers les objectifs
		global $RP;
		$idStg = $guserid;
		$connexionStg = $gconnexionid;
		$idgroupeStg = $idgroupe;
		include_once($RP['BNO']."fonctions.inc.php");
		AfficheLienBNO($idgroupeStg,$idStg,$connexionStg,"1"); 
		// fin  modif pyg [addon BNO]

6- Editez votre fichier /ganesha/ganesha/commun/p_details.php
Reprez les lignes :
	InitPageHtml($st_texte['details'],false)	;
	Title($st_texte['details']." ".$ClsMembre->GetNom($id_membres)." ".$ClsMembre->GetPrenom($id_membres));
	BR();
	ListFormation()	;
	
Insrez avant "ListFormation() ;" (ligne 53 approx.) :

	// debut modif Pyg [addon BNO] : ajoute le lien vers le bloc-notes tuteur
		$idStg = $guserid;
		$connexionStg = $gconnexionid;
		$ret = $ClsMembre->GetGroupe($idStg);
		$idgroupeStg = $ret['idgroupe'];
		include_once($RP['BNO']."fonctions.inc.php");
		echo AfficheLienBNO($idgroupeStg,$idStg,$connexionStg,"2"); 
		BR();
		echo AfficheLienBNO($idgroupeStg,$idStg,$connexionStg,"3");
		BR();
		BR();
	// fin  modif pyg [addon BNO] 
	
7- Priez pour que a marche !
