Index: /extensions/ConcoursPhoto/CHANGELOG
===================================================================
--- /extensions/ConcoursPhoto/CHANGELOG	(revision 9369)
+++ /extensions/ConcoursPhoto/CHANGELOG	(revision 9370)
@@ -11,4 +11,5 @@
         - Add information on admin page
         - Change blockmenu to show Contests without groups or for Guests.  
+		- Add help page for correct usage
 ______________
 
Index: /extensions/ConcoursPhoto/admin/admin.php
===================================================================
--- /extensions/ConcoursPhoto/admin/admin.php	(revision 9369)
+++ /extensions/ConcoursPhoto/admin/admin.php	(revision 9370)
@@ -34,8 +34,13 @@
                l10n('concours_params'),
                $my_base_url.'&amp;tab=params');
-
+/*
 $tabsheet->add('audit',
                l10n('concours_audit'),
                $my_base_url.'&amp;tab=audit');
+*/
+
+$tabsheet->add('help',
+               l10n('concours_help'),
+               $my_base_url.'&amp;tab=help');
 
 $tabsheet->select($page['tab']);
Index: /extensions/ConcoursPhoto/admin/audit.php
===================================================================
--- /extensions/ConcoursPhoto/admin/audit.php	(revision 9369)
+++ /extensions/ConcoursPhoto/admin/audit.php	(revision 9370)
@@ -17,5 +17,5 @@
     $user_id = 0;
     
-echo "USER_ID=".$user_id;
+//		echo "USER_ID=".$user_id;
    
 // Get the concours id if present
@@ -35,5 +35,5 @@
     .' ORDER BY username ASC'
     .';';
-if ($concours->debug)		echo $query."\n";
+//		echo $query."\n";
     $result = pwg_query($query);
     while ($row = mysql_fetch_assoc($result))
@@ -191,8 +191,8 @@
 		$user_note = array();
 		$globalnote = 0;
-            echo "USER=".$user_id."\n";
+//		            echo "USER=".$user_id."\n";
 		if (!is_numeric($user_id) OR $user_id != 0)	// for user 
 		{   
-            echo "USERNON0=".$user_id."\n";
+//		            echo "USERNON0=".$user_id."\n";
             $pos = strpos($user_id, 'G');
             if ($pos === false)
@@ -203,6 +203,6 @@
             else
             {
-                echo "G...".substr($user_id, $pos+1)." = ".substr($user_id, $pos+1)."\n";
-                echo "IPGUEST=".$ipguest[substr($user_id, $pos+1)]."\n";
+//		                echo "G...".substr($user_id, $pos+1)." = ".substr($user_id, $pos+1)."\n";
+//		                echo "IPGUEST=".$ipguest[substr($user_id, $pos+1)]."\n";
                 $globalnote = $concours->get_img_globalnote_user($row['id'], $concours_id, $conf['guest_id'], $ipguest[substr($user_id, $pos+1)]);
                 $user_note = $concours->get_img_note_user($row['id'], $concours_id, $conf['guest_id'], $ipguest[substr($user_id, $pos+1)]);
@@ -211,5 +211,5 @@
 		elseif (is_numeric($user_id) AND $user_id == 0)	// for user 	// global
 		{
-            echo "USER00=".$user_id."\n";
+//		            echo "USER00=".$user_id."\n";
         
 			foreach ($user_list as $i => $userid)
Index: /extensions/ConcoursPhoto/admin/help.php
===================================================================
--- /extensions/ConcoursPhoto/admin/help.php	(revision 9370)
+++ /extensions/ConcoursPhoto/admin/help.php	(revision 9370)
@@ -0,0 +1,17 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template;
+
+// Load language
+load_language('help\plugin.lang', CONCOURS_PATH);
+
+$template->assign(array('SCRIPT' =>
+			'<script type="text/javascript" src="'.CONCOURS_ADMIN_PATH.'template/Scripts.js"></script>'));
+
+
+$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/help.tpl');
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?>
Index: /extensions/ConcoursPhoto/admin/template/Scripts.js
===================================================================
--- /extensions/ConcoursPhoto/admin/template/Scripts.js	(revision 9370)
+++ /extensions/ConcoursPhoto/admin/template/Scripts.js	(revision 9370)
@@ -0,0 +1,15 @@
+function blockToggleDisplay(headerId, contentId){
+	var revHeader = document.getElementById(headerId);
+	var revContent = document.getElementById(contentId);
+
+	if (revContent.style.display == 'none')
+	{
+		revContent.style.display = 'block';
+		revHeader.className = 'instructionBlockHeaderExpanded';
+	}
+	else
+	{
+		revContent.style.display = 'none';
+		revHeader.className = 'instructionBlockHeaderCollapsed';
+	}
+}
Index: /extensions/ConcoursPhoto/admin/template/help.tpl
===================================================================
--- /extensions/ConcoursPhoto/admin/template/help.tpl	(revision 9370)
+++ /extensions/ConcoursPhoto/admin/template/help.tpl	(revision 9370)
@@ -0,0 +1,99 @@
+{known_script id="jquery" src= $ROOT_URL|@cat:$path_js|@cat:"jquery.js" } 
+{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:$path_js|@cat:"plugins/jquery.cluetip.js" }
+{known_script id="jquery" src= $ROOT_URL|@cat:$path_js|@cat:"jquery.js"}
+{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:$path_js|@cat:"plugins/jquery.cluetip.packed.js" }
+
+{html_head}
+{$SCRIPT}
+{/html_head}
+
+<div class="instructions">
+  <h2>{$CONCOURS_VERSION}</h2>
+<fieldset style=" position:relative ; top:15px">
+  <legend>{'concours_admin_help'|translate}</legend>
+<div id="instructionFonction" class="instructionBlock" >
+ 
+  <div
+    id="fonction_header"
+    class="instructionBlockHeaderCollapsed"
+    onclick="blockToggleDisplay('fonction_header', 'Fonction')"
+  ><span>
+    {'ConcoursPhoto_Fonctionality'|translate}
+  </span></div>
+  <div
+    id="Fonction"
+    class="instructionBlockContent"
+    style="display:none"
+  >
+    <p>{'CC_Function'|translate}.</p>
+    <ol>      
+	  <li>{'CC_hlp_1_1'|translate}</li>
+      <li>{'CC_hlp_1_2'|translate}</li>
+      <li>{'CC_hlp_1_3'|translate}</li>
+      <li>{'CC_hlp_1_4'|translate}</li>
+      <li>{'CC_hlp_1_5'|translate}</li>
+      <li>{'CC_hlp_1_6'|translate}</li>
+    </ol>
+    <p></p>
+  </div> <!-- Fonction -->
+</div> <!-- Fonctions -->
+
+<div id="instructionOPTION" class="instructionBlock">
+  <div
+    id="USAGE_header"
+    class="instructionBlockHeaderCollapsed"
+    onclick="blockToggleDisplay('USAGE_header', 'USAGE_content')"
+  ><span>
+   {'CC_Usage'|translate}
+  </span></div>
+  <div
+    id="USAGE_content"
+    class="instructionBlockContent"
+    style="display:none"
+  >
+
+ 
+
+<ol>
+  <li ><span class="throw"> {'CC_Create_step1'|translate}</span></li>
+   <ul>
+ <li>{'CC_hlp_C1_1'|translate}</li>
+ <li>{'CC_hlp_C1_2'|translate}</li>
+ <li>{'CC_hlp_C1_3'|translate}</li>
+ <li>{'CC_hlp_C1_4'|translate}</li>
+</ul>
+  <li ><span  class="throw">{'CC_Create_step2'|translate}</span></li>
+  
+   <ul>
+ <li>{'CC_hlp_C2_1'|translate}</li>
+ <li>{'CC_hlp_C2_2'|translate}</li>
+ <li>{'CC_hlp_C2_3'|translate}</li>
+ <li>{'CC_hlp_C2_4'|translate}</li>
+</ul>
+  <li><span  class="throw">{'CC_usage'|translate}</span> </li> 
+  <ul>
+ <li>{'CC_hlp_C3_1'|translate}</li>
+ <li>{'CC_hlp_C3_2'|translate}</li>
+ <li>{'CC_hlp_C3_3'|translate}</li>
+ <li>{'CC_hlp_C3_4'|translate}</li>
+</ul>
+</ul>
+  <li><span  class="throw">{'CC_result'|translate}</span> </li> 
+  <ul>
+ <li>{'CC_hlp_C4_1'|translate}</li>
+ <li>{'CC_hlp_C4_2'|translate}</li>
+ <li>{'CC_hlp_C4_3'|translate}</li>
+ <li>{'CC_hlp_C4_4'|translate}</li>
+</ul>
+</ol>
+
+
+
+
+  </div> <!-- OPTION_content -->
+</div> <!-- instructionOPTION -->
+
+ </fieldset>
+ 
+ 
+ </div>
Index: /extensions/ConcoursPhoto/include/Concours.class.php
===================================================================
--- /extensions/ConcoursPhoto/include/Concours.class.php	(revision 9369)
+++ /extensions/ConcoursPhoto/include/Concours.class.php	(revision 9370)
@@ -727,7 +727,7 @@
 	foreach ($user_id as $userid)
 			echo "USER = ".$userid;
-}	foreach ($ipguest as $userid)
+	foreach ($ipguest as $userid)
 			echo "IPGUEST = ".$userid;
-				
+}				
 				
 				// recover all img_id from the category
Index: /extensions/ConcoursPhoto/language/en_UK/help/index.php
===================================================================
--- /extensions/ConcoursPhoto/language/en_UK/help/index.php	(revision 9370)
+++ /extensions/ConcoursPhoto/language/en_UK/help/index.php	(revision 9370)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-03-15 23:44:35 +0100 (mer., 15 mars 2006) $
+// | last modifier : $Author: plg $
+// | revision      : $Revision: 1082 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// recursive call of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/ConcoursPhoto/language/en_UK/help/plugin.lang.php
===================================================================
--- /extensions/ConcoursPhoto/language/en_UK/help/plugin.lang.php	(revision 9370)
+++ /extensions/ConcoursPhoto/language/en_UK/help/plugin.lang.php	(revision 9370)
@@ -0,0 +1,49 @@
+<?php
+/*
+ * Plugin Name: ConcoursPhoto (help)
+ * File :  plugin.lang.php
+* Lang : EN
+ */
+
+
+$lang['ConcoursPhoto_Fonctionality']	= 'ConcoursPhoto plugin Functionnalities';
+$lang['CC_Function']                    = 'Set your photo contest on photo galleries';
+$lang['CC_hlp_1_1']                     = 'Add contest on existing albums/categories';
+$lang['CC_hlp_1_2']                     = 'Automation start and end contest';
+$lang['CC_hlp_1_3']                     = 'Save users datas';
+$lang['CC_hlp_1_4']                     = 'Manage criterias and sub criterias on each contest';
+$lang['CC_hlp_1_5']                     = 'Generate results + CSV export';
+$lang['CC_hlp_1_6']                     = '';
+
+$lang['CC_Usage']                       = 'Plugin usage';
+
+$lang['CC_Create_step1']                = 'Create a contest - Stage 1';
+$lang['CC_Create_step2']                = 'Create a contest - Stage 2';
+$lang['CC_usage']                       = 'Usage (users)';
+$lang['CC_result']                      = 'Generate results';
+
+
+$lang['CC_hlp_C1_1']          = 'Create a contest by filing datas Name, Description';   
+$lang['CC_hlp_C1_2']          = 'then select authorized  allowed to vote in the contest. None selected ==> allowed for all users';   
+$lang['CC_hlp_C1_3']          = '<i>Possibility to allow vote for Guest users by ticking the option</i>';   
+$lang['CC_hlp_C1_4']          = 'Fill the start and end date and hour. This will allow contest to start and end automatically';   
+$lang['CC_hlp_C1_5']          = 'Choose the result method : Sum or average';   
+$lang['CC_hlp_C1_6']          = 'Then select the category where the contest is active';   
+
+$lang['CC_hlp_C2_1']          = 'After stage 1, it is possible to modify criterias for the contest';
+$lang['CC_hlp_C2_2']          = 'By default, the default criterias are added to the current contest. Then it is possible to add/modify/delete criterias';
+$lang['CC_hlp_C2_3']          = 'Criterias and sub criterias contains name, description, min and max values and coefficient';
+$lang['CC_hlp_C2_4']          = 'Remark : Criterias with sub criterias don t have min and max values. The value is calculated with the summ of subcriterias';
+
+$lang['CC_hlp_C3_1']          = 'For users, a contest is active only on defined dates';
+$lang['CC_hlp_C3_2']          = 'User could also vote for photo in the contest';
+$lang['CC_hlp_C3_3']          = 'vote is stored and it\'s possible to change the vote before the end of the contest';
+$lang['CC_hlp_C3_4']          = 'When a concours is closed, user could not vote. During the contest, it\'s possible (on admin page) to audit the contest result.';
+
+$lang['CC_hlp_C4_1']          = 'When contest is closed, it\s possible (on admin page) to generate the result';
+$lang['CC_hlp_C4_2']          = 'When result is generated, users could consult the result page (dedicated page)';
+$lang['CC_hlp_C4_3']          = 'On admin page, an export to CSF file is possible';
+$lang['CC_hlp_C4_4']          = '';
+
+
+?>
Index: /extensions/ConcoursPhoto/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/ConcoursPhoto/language/en_UK/plugin.lang.php	(revision 9369)
+++ /extensions/ConcoursPhoto/language/en_UK/plugin.lang.php	(revision 9370)
@@ -101,3 +101,8 @@
 $lang['concoursphoto']                  = 'Photo Contest';
 $lang['concours_saveOK']                = 'Parameters saved';
+$lang['concours_help']                  = 'Help';
+
+$lang['concours_allow_guest']           = 'Allow Guest';
+$lang['concours_admin_help']            = 'Guide/Help to use the ConcoursPhoto plugin'; 
+$lang['concours_audit_page']            = 'Contest Audit';
 ?>
Index: /extensions/ConcoursPhoto/language/fr_FR/help/index.php
===================================================================
--- /extensions/ConcoursPhoto/language/fr_FR/help/index.php	(revision 9370)
+++ /extensions/ConcoursPhoto/language/fr_FR/help/index.php	(revision 9370)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-03-15 23:44:35 +0100 (mer., 15 mars 2006) $
+// | last modifier : $Author: plg $
+// | revision      : $Revision: 1082 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// recursive call of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/ConcoursPhoto/language/fr_FR/help/plugin.lang.php
===================================================================
--- /extensions/ConcoursPhoto/language/fr_FR/help/plugin.lang.php	(revision 9370)
+++ /extensions/ConcoursPhoto/language/fr_FR/help/plugin.lang.php	(revision 9370)
@@ -0,0 +1,49 @@
+<?php
+/*
+ * Plugin Name: ConcoursPhoto (help)
+ * File :  plugin.lang.php
+* Lang : FR 
+ */
+
+
+$lang['ConcoursPhoto_Fonctionality']	= 'Fonctionnalités du plugin Concours Photo';
+$lang['CC_Function']                    = 'Paramétrez des concours Photo sur vos galeries photo';
+$lang['CC_hlp_1_1']                     = 'Ajout de concours sur des albums sélectionnés';
+$lang['CC_hlp_1_2']                     = 'Automatisation par date début et fin';
+$lang['CC_hlp_1_3']                     = 'Sauvegarde des données des utilisateurs';
+$lang['CC_hlp_1_4']                     = 'Gestion des critères et sous-critères pour chaque concours';
+$lang['CC_hlp_1_5']                     = 'Génération des résultats + export CSV';
+$lang['CC_hlp_1_6']                     = '';
+
+$lang['CC_Usage']                       = 'Utilisation du plugin';
+
+$lang['CC_Create_step1']                = 'Création du concours - Etape 1';
+$lang['CC_Create_step2']                = 'Création du concours - Etape 2';
+$lang['CC_usage']                       = 'Utilisation (utilisateurs)';
+$lang['CC_result']                      = 'Génération des résultats';
+
+
+$lang['CC_hlp_C1_1']          = 'Créer un concours en renseignant les données Nom, Description';   
+$lang['CC_hlp_C1_2']          = 'Sélectionner ensuite le/les groupes autorisés à participer au concours. Aucune sélection ==> accès à tous les utilisateurs';   
+$lang['CC_hlp_C1_3']          = '<i>il est possible d\'autoriser les Visiteurs à voter en cochant la case appropriée</i>';   
+$lang['CC_hlp_C1_4']          = 'Renseigner les dates et heures de début et fin du concours permettant d\'automatiser le déclenchement du concours';   
+$lang['CC_hlp_C1_5']          = 'Choississez la méthode de calcul pour le résultat : Somme des notes ou Moyenne par rapport aux votants';   
+$lang['CC_hlp_C1_6']          = 'Sélectionner finalement la catégorie sur laquelle le concours est actif';   
+
+$lang['CC_hlp_C2_1']          = 'Une fois l\'étape 1 complétée, il est possible de modifier les critères du concours';
+$lang['CC_hlp_C2_2']          = 'Par défaut, les critères "défaut" sont ajouté à un nouveau concours. Vous pouvez ensuite ajouter/modifier/supprimer les critères';
+$lang['CC_hlp_C2_3']          = 'Les critères et sous-critères contiennent les informations suivantes : Nom, Description, Valeurs mini et maxi et coefficient du critère';
+$lang['CC_hlp_C2_4']          = 'Remarque : les critères contenant des sous-critères ne disposent pas des valeurs min, max et coefficient. Ils sont automatiquement calculés en sommant l\'ensemble des sous-critères le constituant';
+
+$lang['CC_hlp_C3_1']          = 'Pour les utilisateurs, le concours n\'est actif qu\'aux dates paramétrées';
+$lang['CC_hlp_C3_2']          = 'L\'utilisateur peut alors voter sur les photos';
+$lang['CC_hlp_C3_3']          = 'Le vote est enregistré et il est éventuellement possible de modifier avant la fin du concours';
+$lang['CC_hlp_C3_4']          = 'Lorsque le concours est terminé, l\'utilisateur ne peut plus voter. Pendant le concours, il est possible (côté administrateur) de consulter le résultat intermédiaire du concours.';
+
+$lang['CC_hlp_C4_1']          = 'Lorsque le concours est terminé, il est possible (côté administration) de générer le résultat';
+$lang['CC_hlp_C4_2']          = 'Lorsque le résultat est généré, les utilisateurs peuvent consulter le résultat (page dédiée)';
+$lang['CC_hlp_C4_3']          = 'Côté administration, un export CSV est possible (pour traitement à postériori)';
+$lang['CC_hlp_C4_4']          = '';
+
+
+?>
Index: /extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php	(revision 9369)
+++ /extensions/ConcoursPhoto/language/fr_FR/plugin.lang.php	(revision 9370)
@@ -101,4 +101,8 @@
 $lang['concoursphoto']                  = 'Concours Photo';
 $lang['concours_saveOK']                = 'Paramètres enregistrés';
+$lang['concours_help']                  = 'Aide';
 
+$lang['concours_allow_guest']           = 'Autoriser les Visiteurs';
+$lang['concours_admin_help']            = 'Guide/Aide d\'utilisation du plugin ConcoursPhoto'; 
+$lang['concours_audit_page']            = 'Audit de concours';
 ?>
Index: /extensions/ConcoursPhoto/main.inc.php
===================================================================
--- /extensions/ConcoursPhoto/main.inc.php	(revision 9369)
+++ /extensions/ConcoursPhoto/main.inc.php	(revision 9370)
@@ -65,4 +65,5 @@
 
 
+
 set_plugin_data($plugin['id'], $concours)
 
