Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 840 → Rev 841

/trunk/client/integrateur_wikini/bibliotheque/iw_admin_wikini.fonct.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: iw_admin_wikini.fonct.php,v 1.2 2006-04-28 12:41:26 florian Exp $
// CVS : $Id: iw_admin_wikini.fonct.php,v 1.3 2006-05-10 16:02:49 ddelon Exp $
/**
* Application gérant les Wikini associe à Papyrus
*
36,7 → 36,7
//Auteur original :
*@author David Delon <david.delon@clapas.net>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.2 $
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
45,7 → 45,7
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de cette application.*/
require_once '../configuration/adwi_configuration.inc.php';
require_once 'client/integrateur_wikini/configuration/adwi_configuration.inc.php';
 
//Utilisation de la bibliothèque PEAR NET_URL
 
188,6 → 188,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2006/04/28 12:41:26 florian
* corrections erreurs chemin
*
* Revision 1.1 2005/11/14 10:14:30 ddelon
* Projets Wikini
*
/trunk/papyrus/applications/admin_menu/langues/adme_langue_fr.inc.php
32,7 → 32,7
// pris connaissance de la licence CeCILL, et que vous en avez accepté les
// termes.
// ----
// CVS : $Id: adme_langue_fr.inc.php,v 1.12 2006-05-10 15:01:57 florian Exp $
// CVS : $Id: adme_langue_fr.inc.php,v 1.13 2006-05-10 16:02:49 ddelon Exp $
/**
* Gestion des langues de l'application ADME
*
45,7 → 45,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.12 $ $Date: 2006-05-10 15:01:57 $
*@version $Revision: 1.13 $ $Date: 2006-05-10 16:02:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
113,6 → 113,7
// Les actions des menus communs:
define('ADME_LG_ACTION_COMMUN_MODIFIER', 'menu_commun_modifier');
define('ADME_LG_ACTION_COMMUN_MODIFIER_ALT', 'Modifier');
define('ADME_LG_ACTION_COMMUN_MODIFIER_ACTION', 'menu_commun_modifier_action');
define('ADME_LG_ACTION_COMMUN_MODIFIER_TITLE', 'Modifier ce menu');
 
define('ADME_LG_ACTION_COMMUN_MONTER', 'menu_commun_monter');
140,16 → 141,18
define('ADME_LG_ACTION_COMMUN_SUPPRIMER_ALT', 'Supprimer');
define('ADME_LG_ACTION_COMMUN_SUPPRIMER_TITLE', 'Supprimer ce menu');
 
define('ADME_LG_ACTION_COMMUN_SUPPRIMER_TRADUCTION', 'menu_commun_supprimer_traduction');
define('ADME_LG_ACTION_COMMUN_SUPPRIMER_TRADUCTION_ALT', 'Supprimer');
define('ADME_LG_ACTION_COMMUN_SUPPRIMER_TRADUCTION_TITLE', 'Supprimer ce menu');
 
 
define('ADME_LG_ACTION_COMMUN_AJOUTER', 'menu_commun_ajouter');
define('ADME_LG_ACTION_COMMUN_AJOUTER_ALT', 'Ajouter');
define('ADME_LG_ACTION_COMMUN_AJOUTER_TITLE', 'Ajouter ce menu');
 
define('ADME_LG_ACTION_COMMUN_VERIFIER', 'menu_commun_verifier');
define ('ADME_LG_ACTION_COMMUN_MODIFIER_ACTION','menu_commun_modifier_action');
define ('ADME_LG_ACTION_COMMUN_VERIFIER_TRADUCTION','menu_commun_verifier_traduction');
define ('ADME_LG_ACTION_COMMUN_SUPPRIMER_TRADUCTION','menu_commun_supprimer_traduction');
 
 
// Les actions générales:
define('ADME_LG_ACTION_ADMINISTRER', 'administrer');
define('ADME_LG_ACTION_ADMINISTRER_ALT', 'Administrer');
251,6 → 254,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.12 2006/05/10 15:01:57 florian
* ajout de constantes, pour éviter les warnings
*
* Revision 1.11 2006/04/12 21:11:54 ddelon
* Multilinguisme menus communs
*
/trunk/papyrus/pap_envoi.inc.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: pap_envoi.inc.php,v 1.7 2006-01-12 16:37:01 ddelon Exp $
// CVS : $Id: pap_envoi.inc.php,v 1.8 2006-05-10 16:02:49 ddelon Exp $
/**
* Gestion de l'envoie des pages à afficher.
*
31,7 → 31,7
//Autres auteurs :
*@author Laurent COUDOUNEAU <lc@gsite.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.7 $ $Date: 2006-01-12 16:37:01 $
*@version $Revision: 1.8 $ $Date: 2006-05-10 16:02:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
43,7 → 43,7
{
return gzencode($output);
}
 
/*
// Check if the browser supports gzip encoding, HTTP_ACCEPT_ENCODING
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') )
{
54,12 → 54,15
// Tell the browser the content is compressed with gzip
header ("Content-Encoding: gzip");
}
 
*/
echo($_GEN_commun['sortie']);
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7 2006/01/12 16:37:01 ddelon
* compression N**t*n
*
* Revision 1.6 2005/12/09 16:01:53 ddelon
* retablissement compression
*
/trunk/api/text/wiki_papyrus/Papyrus.class.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: Papyrus.class.php,v 1.7 2005-09-23 13:58:07 ddelon Exp $
// CVS : $Id: Papyrus.class.php,v 1.8 2006-05-10 16:02:49 ddelon Exp $
/**
* Classe configurant le formatage pour Papyrus.
*
36,7 → 36,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.7 $ $Date: 2005-09-23 13:58:07 $
*@version $Revision: 1.8 $ $Date: 2006-05-10 16:02:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
77,8 → 77,10
'Categorie', // Action Categorie
'Nouveaute', // Action Nouveaute
'Plan', // Action Plan
'Lien', // Action Lien
'Syndication', // Action Syndication
'Redirection' // Action Redirection
);
/**
284,6 → 286,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7 2005/09/23 13:58:07 ddelon
* Php5, Projet et Redirection
*
* Revision 1.6 2005/04/18 16:41:53 jpm
* Ajout des actions Plan et Syndication.
*
/trunk/api/text/wiki_papyrus/Render/Xhtml/Lien.php
New file
0,0 → 1,141
<?php
 
class Text_Wiki_Render_Xhtml_Lien extends Text_Wiki_Render {
/**
*
* Renders a token into text matching the requested format.
*
* @access public
*
* @param array $options The "options" portion of the token (second
* element).
*
* @return string The text rendered from the token options.
*
*/
function token($options)
{
 
// Initialisation des variables
$sortie = '';
$niveau = $options['niveau'];
$identifiant = $options['identifiant'];
$bdd =& $GLOBALS['_GEN_commun']['pear_db'];
$id_langue = $GLOBALS['_GEN_commun']['i18n']; //identifiant de la langue choisie
if (isset($id_langue) && ($id_langue!='')) {
$langue_url=$id_langue;
} else {
$langue_url=GEN_I18N_ID_DEFAUT;
}
$une_url =& new Pap_URL('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
$titre='';
$nom='';
if ($niveau=="site") {
$requete = 'SELECT distinct * '.
'FROM gen_site ';
if (is_numeric($identifiant)) {
$requete .= 'WHERE gs_code_num = '.$identifiant.' ';
$une_url->addQueryString(GEN_URL_CLE_SITE, $identifiant);
}
$resultat = $bdd->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
$aso_site = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
$resultat->free();
$requete_traduction = 'SELECT * '.
'FROM gen_site_relation, gen_site '.
'WHERE gs_id_site = gsr_id_site_02 ' .
'AND '.$identifiant.' = gs_code_num '.
'AND gsr_id_valeur = 1 '.// 1 = "avoir traduction"
'AND gs_ce_i18n = "'.$langue_url.'" ';
$resultat_traduction = $bdd->query($requete_traduction);
(DB::isError($resultat_traduction)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_traduction->getMessage(), $requete_traduction))
: '';
if ( $resultat_traduction->numRows() > 0 ) {
$aso_site=$resultat_traduction->fetchRow(DB_FETCHMODE_ASSOC);
}
if (!empty($aso_site['gs_nom'])) {
$titre = $aso_site['gs_nom'];
} else {
$titre = $aso_site['gs_titre'];
}
}
// Menu
else {
$requete = 'SELECT distinct * '.
'FROM gen_menu ';
if (is_numeric($identifiant)) {
$requete .= 'WHERE gm_code_num = '.$identifiant.' ';
$une_url->addQueryString(GEN_URL_CLE_MENU, $identifiant);
}
$resultat = $bdd->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
$aso_menu = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
$resultat->free();
$requete_traduction = 'SELECT * '.
'FROM gen_menu_relation, gen_menu '.
'WHERE '.$identifiant.' = gm_code_num ' .
'AND gmr_id_menu_02 = gm_id_menu '.
'AND gmr_id_valeur = 2 '.// 2 = "avoir traduction"
'AND gm_ce_i18n = "'.$langue_url.'" ';
$resultat_traduction = $bdd->query($requete_traduction);
(DB::isError($resultat_traduction)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_traduction->getMessage(), $requete_traduction))
: '';
if ($resultat_traduction->numRows() > 0) {
$aso_menu=$resultat_traduction->fetchRow(DB_FETCHMODE_ASSOC);
}
if (!empty($aso_menu['gm_nom'])) {
$titre = $aso_menu['gm_nom'];
}
elseif (!empty($menu_valeur['gm_titre'])) {
$titre = $aso_menu['gm_titre'];
}
}
if ($langue_url != GEN_I18N_ID_DEFAUT) {
$une_url->addQueryString(GEN_URL_CLE_I18N, $langue_url);
}
// Construction du lien
$sortie = '<a href="'.$une_url->getURL().'">'.htmlentities($titre).'</a>';
return $sortie;
}
}
?>
/trunk/api/text/wiki_papyrus/Parse/Lien.php
New file
0,0 → 1,46
<?php
// $Id: Lien.php,v 1.1 2006-05-10 16:02:49 ddelon Exp $
 
 
/**
*
* This class implements a Text_Wiki_Parse to find source text marked as
* an Interwiki link. See the regex for a detailed explanation of the
* text matching procedure; e.g., "InterWikiName:PageName".
*
* @author Paul M. Jones <pmjones@ciaweb.net>
*
* @package Text_Wiki
*
*/
class Text_Wiki_Parse_Lien extends Text_Wiki_Parse {
var $regex = '/\{\{Lien ((?:menu)|(?:site))="((?:\w+)|(?:\d+))" *\}\}/';
/**
*
* Remplace l'action par une liste des dernières pages modifiées
* Les options sont:
*
* 'site' => le code alphanumérique du ou des sites que l'on veut afficher
*
* @access public
*
* @param array &$matches The array of matches from parse().
*
* @return A delimited token to be used as a placeholder in
* the source text, plus any text priot to the match.
*
*/
function process(&$matches)
{
$options = array(
'niveau' => $matches[1],
'identifiant' => $matches[2]
);
return $this->wiki->addToken($this->rule, $options);
}
}
?>