Fix: Amélioration et corrections du module d'ajout de files RSS au sein des écrans dolibarr.
This commit is contained in:
parent
a3242dab41
commit
d20fdfef6f
@ -40,12 +40,12 @@ $main_use_spip_auto = ADHERENT_USE_SPIP_AUTO;
|
|||||||
$typeconst=array('yesno','texte','chaine');
|
$typeconst=array('yesno','texte','chaine');
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
if ($HTTP_POST_VARS["action"] == 'update' || $HTTP_POST_VARS["action"] == 'add')
|
if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
if (isset($HTTP_POST_VARS["consttype"]) && $HTTP_POST_VARS["consttype"] != ''){
|
if (isset($_POST["consttype"]) && $_POST["consttype"] != ''){
|
||||||
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."', type='".$typeconst[$HTTP_POST_VARS["consttype"]]."',visible=0";
|
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name='".$_POST["constname"]."', value = '".$_POST["constvalue"]."',note='".$_POST["constnote"]."', type='".$typeconst[$_POST["consttype"]]."',visible=0";
|
||||||
}else{
|
}else{
|
||||||
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name='".$_POST["constname"]."', value = '".$HTTP_POST_VARS["constvalue"]."',note='".$HTTP_POST_VARS["constnote"]."',visible=0";
|
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name='".$_POST["constname"]."', value = '".$_POST["constvalue"]."',note='".$_POST["constnote"]."',visible=0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($db->query($sql))
|
if ($db->query($sql))
|
||||||
@ -89,21 +89,15 @@ llxHeader();
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
print_titre("Gestion des adhérents : Configurations de parametres");
|
print_titre("Gestion des adhérents : Configurations de parametres");
|
||||||
|
print "<br>";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mailman
|
* Mailman
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder" cellpadding="3" cellspacing="0">';
|
|
||||||
print "<tr $bc[$var] class=value><td>Mailman</td><td>Système de mailing listes";
|
|
||||||
print '</td><td align="center">';
|
|
||||||
|
|
||||||
if (defined("ADHERENT_USE_MAILMAN") && ADHERENT_USE_MAILMAN == 1)
|
if (defined("ADHERENT_USE_MAILMAN") && ADHERENT_USE_MAILMAN == 1)
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
$lien='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
print "</td><td>\n";
|
$lien.='<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">désactiver</a>';
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">désactiver</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
// Edition des varibales globales rattache au theme Mailman
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
$constantes=array('ADHERENT_MAILMAN_LISTS',
|
$constantes=array('ADHERENT_MAILMAN_LISTS',
|
||||||
'ADHERENT_MAILMAN_LISTS_COTISANT',
|
'ADHERENT_MAILMAN_LISTS_COTISANT',
|
||||||
@ -112,65 +106,48 @@ if (defined("ADHERENT_USE_MAILMAN") && ADHERENT_USE_MAILMAN == 1)
|
|||||||
'ADHERENT_MAILMAN_UNSUB_URL',
|
'ADHERENT_MAILMAN_UNSUB_URL',
|
||||||
'ADHERENT_MAILMAN_URL'
|
'ADHERENT_MAILMAN_URL'
|
||||||
);
|
);
|
||||||
|
print_fiche_titre("Mailman - Système de mailing listes",$lien);
|
||||||
form_constantes($constantes);
|
form_constantes($constantes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
$lien='<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_USE_MAILMAN">activer</a>';
|
||||||
print "</td><td>\n";
|
print_fiche_titre("Mailman - Système de mailing listes",$lien);
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_USE_MAILMAN">activer</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<HR><BR>\n";
|
print "<hr>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gestion banquaire
|
* Gestion banquaire
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder" cellpadding="3" cellspacing="0">';
|
|
||||||
print "<tr $bc[$var] class=value><td>Gestion Banquaire</td><td>Gestion banquaire des adherents";
|
|
||||||
print '</td><td align="center">';
|
|
||||||
|
|
||||||
if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE == 1)
|
if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE == 1)
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
$lien='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
print "</td><td>\n";
|
$lien.='<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_BANK_USE">désactiver</a>';
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_BANK_USE">désactiver</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
// Edition des varibales globales rattache au theme Mailman
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
$constantes=array('ADHERENT_BANK_USE_AUTO',
|
$constantes=array('ADHERENT_BANK_USE_AUTO',
|
||||||
'ADHERENT_BANK_ACCOUNT',
|
'ADHERENT_BANK_ACCOUNT',
|
||||||
'ADHERENT_BANK_CATEGORIE'
|
'ADHERENT_BANK_CATEGORIE'
|
||||||
);
|
);
|
||||||
|
print_fiche_titre("Gestion banquaire des adherents",$lien);
|
||||||
form_constantes($constantes);
|
form_constantes($constantes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
$lien='<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_BANK_USE">activer</a>';
|
||||||
print "</td><td>\n";
|
print_fiche_titre("Gestion banquaire des adherents",$lien);
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_BANK_USE">activer</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<HR><BR>\n";
|
print "<hr>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Spip
|
* Spip
|
||||||
*/
|
*/
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<table class="noborder" cellpadding="3" cellspacing="0">';
|
|
||||||
print "<tr $bc[$var] class=value><td>Spip</td><td>Système de publication en ligne";
|
|
||||||
print '</td><td align="center">';
|
|
||||||
|
|
||||||
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP == 1)
|
if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP == 1)
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
$lien='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
print "</td><td>\n";
|
$lien.='<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_USE_SPIP">désactiver</a>';
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_USE_SPIP">désactiver</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
// Edition des varibales globales rattache au theme Mailman
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
$constantes=array('ADHERENT_USE_SPIP_AUTO',
|
$constantes=array('ADHERENT_USE_SPIP_AUTO',
|
||||||
'ADHERENT_SPIP_SERVEUR',
|
'ADHERENT_SPIP_SERVEUR',
|
||||||
@ -178,59 +155,45 @@ if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP == 1)
|
|||||||
'ADHERENT_SPIP_USER',
|
'ADHERENT_SPIP_USER',
|
||||||
'ADHERENT_SPIP_PASS'
|
'ADHERENT_SPIP_PASS'
|
||||||
);
|
);
|
||||||
|
print_fiche_titre("SPIP - Système de publication en ligne",$lien);
|
||||||
form_constantes($constantes);
|
form_constantes($constantes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
$lien='<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_USE_SPIP">activer</a>';
|
||||||
print "</td><td>\n";
|
print_fiche_titre("SPIP - Système de publication en ligne",$lien);
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_USE_SPIP">activer</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<HR><BR>\n";
|
print "<hr>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Glasnost
|
* Glasnost
|
||||||
*/
|
*/
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<table class="noborder" cellpadding="3" cellspacing="0">';
|
|
||||||
print "<tr $bc[$var] class=value><td>Glasnost</td><td>Système de vote en ligne";
|
|
||||||
print '</td><td align="center">';
|
|
||||||
|
|
||||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST == 1)
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST == 1)
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
$lien='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
print "</td><td>\n";
|
$lien.='<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_USE_GLASNOST">désactiver</a>';
|
||||||
print '<a href="'.$PHP_SELF.'?action=unset&value=0&name=ADHERENT_USE_GLASNOST">désactiver</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
// Edition des varibales globales rattache au theme Mailman
|
// Edition des varibales globales rattache au theme Mailman
|
||||||
$constantes=array('ADHERENT_USE_GLASNOST_AUTO',
|
$constantes=array('ADHERENT_USE_GLASNOST_AUTO',
|
||||||
'ADHERENT_GLASNOST_SERVEUR',
|
'ADHERENT_GLASNOST_SERVEUR',
|
||||||
'ADHERENT_GLASNOST_USER',
|
'ADHERENT_GLASNOST_USER',
|
||||||
'ADHERENT_GLASNOST_PASS'
|
'ADHERENT_GLASNOST_PASS'
|
||||||
);
|
);
|
||||||
|
print_fiche_titre("Glasnost - Système de vote en ligne",$lien);
|
||||||
form_constantes($constantes);
|
form_constantes($constantes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
$lien='<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_USE_GLASNOST">activer</a>';
|
||||||
print "</td><td>\n";
|
print_fiche_titre("Glasnost - Système de vote en ligne",$lien);
|
||||||
print '<a href="'.$PHP_SELF.'?action=set&value=1&name=ADHERENT_USE_GLASNOST">activer</a>';
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<HR><BR>\n";
|
print "<hr>\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
/*
|
/*
|
||||||
* Edition des varibales globales non rattache a un theme specifique
|
* Edition des varibales globales non rattache a un theme specifique
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder" cellpadding="3" cellspacing="0">';
|
|
||||||
print "<tr $bc[$var] class=value><td>Variables globales</td><td>Variables globales non rattachées a un thème";
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
$constantes=array('ADHERENT_TEXT_NEW_ADH',
|
$constantes=array('ADHERENT_TEXT_NEW_ADH',
|
||||||
'ADHERENT_MAIL_COTIS_SUBJECT',
|
'ADHERENT_MAIL_COTIS_SUBJECT',
|
||||||
'ADHERENT_MAIL_COTIS',
|
'ADHERENT_MAIL_COTIS',
|
||||||
@ -248,11 +211,15 @@ $constantes=array('ADHERENT_TEXT_NEW_ADH',
|
|||||||
'ADHERENT_CARD_FOOTER_TEXT',
|
'ADHERENT_CARD_FOOTER_TEXT',
|
||||||
'ADHERENT_ETIQUETTE_TYPE'
|
'ADHERENT_ETIQUETTE_TYPE'
|
||||||
);
|
);
|
||||||
|
print_fiche_titre("Autres variables globales");
|
||||||
form_constantes($constantes);
|
form_constantes($constantes);
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|
||||||
function form_constantes($tableau){
|
function form_constantes($tableau){
|
||||||
// Variables globales
|
// Variables globales
|
||||||
global $db,$bc;
|
global $db,$bc;
|
||||||
|
|||||||
@ -65,9 +65,8 @@ if ($action == 'save')
|
|||||||
|
|
||||||
print_fiche_titre("Configuration du lien vers un site syndiqué", $mesg);
|
print_fiche_titre("Configuration du lien vers un site syndiqué", $mesg);
|
||||||
|
|
||||||
print "\n<div class=\"titre\"><p align=\"justify\">Attention, pour la récupération des données au format RSS, les urls en https ne marchent pas pour l'instant. </p>
|
print "\n<p align=\"justify\">Attention, pour la récupération des données au format RSS, les urls en https ne marchent pas pour l'instant. </p>
|
||||||
<p>Exemples:
|
Exemples:<ul>
|
||||||
<ul>
|
|
||||||
<li>WikiApril / http://wiki.april.org / http://wiki.april.org/RecentChanges?format=rss (et tous les sites phpwiki)</li>
|
<li>WikiApril / http://wiki.april.org / http://wiki.april.org/RecentChanges?format=rss (et tous les sites phpwiki)</li>
|
||||||
<li>LinuxFR / http://linuxfr.org / http://www.linuxfr.org/backend.rss</li>
|
<li>LinuxFR / http://linuxfr.org / http://www.linuxfr.org/backend.rss</li>
|
||||||
<li>WikiInterneRycks / ../wiki / ../wiki/RecentChanges?format=rss (ne marche pas, je suis en https et en plus y a un apache_auth)</li>
|
<li>WikiInterneRycks / ../wiki / ../wiki/RecentChanges?format=rss (ne marche pas, je suis en https et en plus y a un apache_auth)</li>
|
||||||
@ -75,15 +74,15 @@ print "\n<div class=\"titre\"><p align=\"justify\">Attention, pour la r
|
|||||||
<li>Parinux / http://parinux.org/ / http://parinux.org/backend.rss</li>
|
<li>Parinux / http://parinux.org/ / http://parinux.org/backend.rss</li>
|
||||||
<li>Docs d'AbulÉdu / http://docs.abuledu.org / http://docs.abuledu.org/backend.php3 (et tous les sites spip)</li>
|
<li>Docs d'AbulÉdu / http://docs.abuledu.org / http://docs.abuledu.org/backend.php3 (et tous les sites spip)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p></div>
|
|
||||||
<form name=\"externalrssconfig\" action=\"" . $_SERVER['SCRIPT_NAME'] . "\" method=\"post\">
|
<form name=\"externalrssconfig\" action=\"" . $_SERVER['SCRIPT_NAME'] . "\" method=\"post\">
|
||||||
<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\">\n";
|
<table class=\"border\" cellpadding=\"3\" cellspacing=\"0\">\n";
|
||||||
|
|
||||||
// Pour l'instant on fait un seul RSS externe, mais c'est sans soucis qu'on passe à plus !
|
// Pour l'instant on fait un seul RSS externe, mais c'est sans soucis qu'on passe à plus !
|
||||||
// ptet définir une variable pour NBMAX_RSS_EXTERNE ... modifier en fonction le fichier
|
// ptet définir une variable pour NBMAX_RSS_EXTERNE ... modifier en fonction le fichier
|
||||||
// ../pre.inc.php
|
// ../pre.inc.php
|
||||||
for($i = 0; $i < $nbexternalrss; $i++) {
|
for($i = 0; $i < $nbexternalrss; $i++) {
|
||||||
print "<tr class=\"pair\">
|
print "<tr class=\"liste_titre\">
|
||||||
<th colspan=\"2\">Syndication du site numéro " . ($i+1) . "</th>
|
<th colspan=\"2\">Syndication du site numéro " . ($i+1) . "</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -35,12 +35,15 @@ class modExternalRss extends DolibarrModules
|
|||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->numero = 320;
|
$this->numero = 320;
|
||||||
|
|
||||||
$this->family = "hr";
|
$this->family = "technic";
|
||||||
$this->name = "Syndication";
|
$this->name = "Syndication RSS";
|
||||||
$this->description = "Module de gestion de syndication de sites externes";
|
$this->description = "Ajout de files d'informations RSS dans les écrans Dolibarr";
|
||||||
$this->const_name = "MAIN_MODULE_EXTERNALRSS";
|
$this->const_name = "MAIN_MODULE_EXTERNALRSS";
|
||||||
$this->const_config = MAIN_MODULE_EXTERNALRSS;
|
$this->const_config = MAIN_MODULE_EXTERNALRSS;
|
||||||
|
|
||||||
|
// Config pages
|
||||||
|
$this->config_page_url = array("external_rss.php");
|
||||||
|
|
||||||
// Dépendances
|
// Dépendances
|
||||||
$this->depends = array();
|
$this->depends = array();
|
||||||
$this->requiredby = array();
|
$this->requiredby = array();
|
||||||
@ -50,7 +53,7 @@ class modExternalRss extends DolibarrModules
|
|||||||
/*
|
/*
|
||||||
* Boites
|
* Boites
|
||||||
*/
|
*/
|
||||||
$this->boxes[0][0] = "Syndication";
|
$this->boxes[0][0] = "Informations externes RSS";
|
||||||
$this->boxes[0][1] = "box_external_rss.php";
|
$this->boxes[0][1] = "box_external_rss.php";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user