From 024de701df1e4ee5f7cc4b5139a490bd9477aae9 Mon Sep 17 00:00:00 2001
From: Antonio Gallo
Date: Wed, 12 Sep 2012 05:57:28 +0000
Subject: the XML to configure the template can now be written inside the
config.xml file
---
.../Application/Controllers/BaseController.php | 16 +-
h-source/Application/Include/params.php | 7 +
h-source/README.txt | 14 +-
h-source/config.xml | 719 +++++++++++++++++++++
4 files changed, 753 insertions(+), 3 deletions(-)
create mode 100644 h-source/config.xml
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php
index 9287cee..4a3bb65 100644
--- a/h-source/Application/Controllers/BaseController.php
+++ b/h-source/Application/Controllers/BaseController.php
@@ -131,9 +131,21 @@ class BaseController extends Controller
if (count($xmlRes)>0)
{
$configXml = htmlspecialchars_decode($xmlRes[0],ENT_QUOTES);
- if (@simplexml_load_string($configXml))
+
+ if (Website::$useXmlConfigFile)
+ {
+ $xmlConfigFile = rtrim(Website::$xmlConfigFileFolder,'/') . '/config.xml';
+ if (@simplexml_load_file($xmlConfigFile))
+ {
+ $this->_configXml = simplexml_load_file($xmlConfigFile);
+ }
+ }
+ else
{
- $this->_configXml = simplexml_load_string($configXml);
+ if (@simplexml_load_string($configXml))
+ {
+ $this->_configXml = simplexml_load_string($configXml);
+ }
}
}
diff --git a/h-source/Application/Include/params.php b/h-source/Application/Include/params.php
index f09d647..3f905db 100644
--- a/h-source/Application/Include/params.php
+++ b/h-source/Application/Include/params.php
@@ -39,6 +39,13 @@ class Website
static public $statusnetGroupText = "";
static public $useSMTP = true;
+
+ //use a xml file the modules of the website?
+ static public $useXmlConfigFile = true;
+
+ //folder of the xml configuration file
+ //the constant ROOT contains the path to the root folder of your installaton of h-source
+ static public $xmlConfigFileFolder = ROOT;
}
class Account
diff --git a/h-source/README.txt b/h-source/README.txt
index 6aa1419..1c8d821 100644
--- a/h-source/README.txt
+++ b/h-source/README.txt
@@ -59,7 +59,7 @@ where DOMAIN_NAME is the domain name you have previously set (perhaps localhost)
== Account issues ==
-If you want that the system can send e-mails you have to specify the name of the SMTP server that has to be used. Open the file Application/Include/params.php and set the following constants:
+If you want that the system can send e-mails you have to specify the name of the SMTP server that has to be used. Open the file Application/Include/params.php and set the following static attributes of the Website class:
$mailServer = ""; //set the mail server (only useful if $useSMTP = true)
@@ -67,6 +67,8 @@ If you want that the system can send e-mails you have to specify the name of the
$mailPassword = ""; //set the password of your mail account (only useful if $useSMTP = true)
+ $fromEmail = "noreply@h-node.org"; //this is the "from address e-mail" used inside the mails sent by h-source (example: confirmation requesta e-mail, change password e-mail, ...)
+
$useSMTP = true; //if you want to use a SMTP account. It can be true or false. Set $useSMTP to false if you want that the software rely on the mail() PHP function
You can also set these constants:
@@ -74,7 +76,17 @@ You can also set these constants:
$generalName = ""; //the string that you want to use inside the tag of your website
$projectName = ""; //the name of your project
+
+
+== Change the configuration of some parts of the template (right column, top notices, top menu, ...) ==
+
+Modify the file config.xml inside the ROOT folder of your h-source installation.
+
+If you want to change the position of the config.xml file change the following static attribute of the Website class inside the
+Application/Include/params.php file:
+ static public $xmlConfigFileFolder = ROOT; //the constant ROOT contains the path to the root folder of your installaton of h-source
+
== Change the homepage ==
diff --git a/h-source/config.xml b/h-source/config.xml
new file mode 100644
index 0000000..3af30da
--- /dev/null
+++ b/h-source/config.xml
@@ -0,0 +1,719 @@
+
+
+
+
+ raw
+ Notice 1 EN
+
+
+ ]]>
+
+
+ raw
+ Notice 2 EN
+
+
+ ]]>
+
+
+
+
+ raw
+ Notice 1 IT
+
+
+ ]]>
+
+
+ raw
+ Notice 2 IT
+
+
+ ]]>
+
+
+
+
+ raw
+ Notice 1 ES
+
+
+ ]]>
+
+
+ raw
+ Notice 2 ES
+
+
+ ]]>
+
+
+
+
+ raw
+ Notice 1 FR
+
+
+ ]]>
+
+
+ raw
+ Notice 2 FR
+
+
+ ]]>
+
+
+
+
+
+
+ raw
+
+
+
+ ]]>
+
+
+ raw
+ supported by
+
+
+
+
+ ]]>
+
+
+ raw
+ subscribe to our
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+ client for h-node
+ Please help in the development of the client for h-node (h-client project). See
here and
here
+
+
+ ]]>
+
+
+
+
+ raw
+ related projects
+ Please help in the development of the
IsMyHWOK software, a different h-node client
+
+
+ ]]>
+
+
+
+
+ raw
+ download the source code
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+ join us at
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+
+ useful links:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+ raw
+
+
+
+ ]]>
+
+
+ raw
+ supportato da
+
+
+
+
+ ]]>
+
+
+ raw
+ iscriviti alla nostra
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+ client per h-node
+ Puoi aiutare nello sviluppo del client per h-node (progetto h-client). Leggi
qui e
qui
+
+
+ ]]>
+
+
+
+
+ raw
+ progetti correlati
+ Puoi aiutare nello sviluppo del software
IsMyHWOK, un diverso client per h-node
+
+
+ ]]>
+
+
+
+
+ raw
+ scarica il codice sorgente
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+ unisciti a noi
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+
+ link utili:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+ raw
+
+
+
+ ]]>
+
+
+ raw
+ con el apoyo de
+
+
+
+
+ ]]>
+
+
+ raw
+ suscríbase a nuestra
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+ cliente para h-node
+ Por favor ayude en el desarrollo del cliente de h-node (proyecto h-client). Vea
aquí y
aquí
+
+
+ ]]>
+
+
+
+
+ raw
+ proyectos relacionados
+ Por favor ayuda en el desarrollo del programa
IsMyHWOK, un cliente diferente para h-node
+
+
+ ]]>
+
+
+
+
+ raw
+ descargue el código fuente
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+ únase a nosotros en
+
+
+
+
+ ]]>
+
+
+
+
+ raw
+
+ link utili:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ raw
+ Beware
+ this device tracks you down!
+
+ See more about it
+
]]>
+
+
+
+
+
+ raw
+ Fai attenzione questo device utilizza delle tecniche per tracciare gli utenti!
+
+ più informazioni
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+ raw
+
+ Other resources on the net
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3