dolibarr
25.0.0-alpha
Main Page
Related Pages
Topics
Classes
Files
Examples
File List
File Members
dolibarr_dev
htdocs
core
modules
modExternalRss.class.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
4
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <https://www.gnu.org/licenses/>.
18
*/
19
28
include_once DOL_DOCUMENT_ROOT.
'/core/modules/DolibarrModules.class.php'
;
29
30
34
class
modExternalRss
extends
DolibarrModules
35
{
41
public
function
__construct
($db)
42
{
43
global
$conf
;
44
45
$this->db = $db;
46
$this->numero = 320;
47
48
$this->family =
"technic"
;
49
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
50
$this->
name
= preg_replace(
'/^mod/i'
,
''
, get_class($this));
51
$this->
description
=
"Ajout de files d'informations RSS dans les ecrans Dolibarr"
;
52
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
53
$this->
version
=
'dolibarr'
;
54
$this->const_name =
'MAIN_MODULE_'
.strtoupper($this->
name
);
55
$this->picto =
'rss'
;
56
57
// Data directories to create when module is enabled
58
$this->dirs = array(
"/externalrss/temp"
);
59
60
// Config pages
61
$this->config_page_url = array(
"external_rss.php"
);
62
63
// Dependencies
64
$this->depends = array();
65
$this->requiredby = array();
66
$this->phpmin = array(7, 0);
67
$this->phpmax = array();
68
69
// Constants
70
$this->
const
= array();
71
72
// Boxes
73
$this->boxes = array();
74
// Les boites sont ajoutees lors de la configuration des flux
75
76
// Permissions
77
$this->rights = array();
78
$this->rights_class =
'externalrss'
;
79
}
80
89
public
function
init
($options =
''
)
90
{
91
global
$conf
;
92
93
$sql = array();
94
95
// Recherche configuration de boites
96
$this->boxes = array();
97
$sql =
"select name, value from "
.MAIN_DB_PREFIX.
"const"
;
98
$sql .=
" WHERE name like 'EXTERNAL_RSS_TITLE_%'"
;
99
$sql .=
" AND entity = "
.((int)
$conf
->entity);
100
$result = $this->db->query($sql);
101
if
($result) {
102
while
($obj = $this->db->fetch_object($result)) {
103
$reg = array();
104
if
(preg_match(
'/EXTERNAL_RSS_TITLE_([0-9]+)/i'
, $obj->name, $reg)) {
105
// Definie la boite si on a trouvee une ancienne configuration
106
//$this->boxes[$reg[1]][0] = "(ExternalRSSInformations)";
107
$this->boxes[$reg[1]][
'file'
] =
"box_external_rss.php"
;
108
$this->boxes[$reg[1]][
'note'
] = $reg[1].
" ("
.$obj->value.
")"
;
109
}
110
}
111
$this->db->free($result);
112
}
113
114
$sql = array();
115
116
return
$this->
_init
($sql, $options);
117
}
118
127
public
function
remove
($options =
''
)
128
{
129
$sql = array();
130
131
// Delete old declarations of RSS box
132
$this->boxes[0][
'file'
] =
"box_external_rss.php"
;
133
134
return
$this->
_remove
($sql, $options);
135
}
136
}
$conf
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Definition
chat_history.php:55
DolibarrModules
Class DolibarrModules.
Definition
DolibarrModules.class.php:40
DolibarrModules\_init
_init($array_sql, $options='')
Enables a module.
Definition
DolibarrModules.class.php:568
DolibarrModules\_remove
_remove($array_sql, $options='')
Disable function.
Definition
DolibarrModules.class.php:683
modExternalRss
Class to describe and enable module externalrss.
Definition
modExternalRss.class.php:35
modExternalRss\init
init($options='')
Function called when module is enabled.
Definition
modExternalRss.class.php:89
modExternalRss\__construct
__construct($db)
Constructor.
Definition
modExternalRss.class.php:41
description
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
Definition
email_expire_services_to_customers.php:96
version
$conf browser version
Definition
main.inc.php:229
name
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition
repair.php:165
Generated on Sun Nov 1 2026 01:00:21 for
dolibarr
by Doxygen 1.11.0