diff --git a/class/AccueilModules.php b/class/AccueilModules.php index b3f1f01..955d75f 100644 --- a/class/AccueilModules.php +++ b/class/AccueilModules.php @@ -19,7 +19,7 @@ class AccueilModules { $this->getModules(); $this->buildConfigMenu(); }else{ - echo 'baaaaad persistance...'; + echo 'Impossible de trouver le fichier de configuration.'; } } @@ -29,12 +29,12 @@ class AccueilModules { */ function getModules(){ foreach($this->modules as $module=>$moduleConf){ - if(file_exists('class/'.ucfirst($module).'.php') && $moduleConf->visibility == "true"){ + if(file_exists('modules/'.$module.'/'.ucfirst($module).'.php') && $moduleConf->visibility == "true"){ $params = array(); foreach($moduleConf as $confParam){ $params[$confParam->getName()] = "$confParam"; } - require ucfirst($module).'.php'; + require 'modules/'.$module.'/'.ucfirst($module).'.php'; call_user_func(array($module, "start"), $params); } } @@ -88,7 +88,7 @@ class AccueilModules { * @return "ok" String si c'est bon, ou le message d'erreur */ public static function updateModule($module, $things2change){ - require ucfirst($module).'.php'; + require '../modules/'.$module.'/'.ucfirst($module).'.php'; return call_user_func(array($module, "updateConfig"), $things2change); } } \ No newline at end of file diff --git a/class/Clock.php b/class/Clock.php deleted file mode 100644 index 5c0ed2f..0000000 --- a/class/Clock.php +++ /dev/null @@ -1,33 +0,0 @@ -setParams($params); - echo ''; - echo '
'; - } - - private function setParams($params){ - $this->params = $params; - } - - public static function start($params){ - $clock = new clock($params); - } - - public static function updateConfig($updated){ - foreach ($updated as $what=>$withWhat){ - if(in_array($what, self::$paramsList)){ - call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); - } - } - } -} \ No newline at end of file diff --git a/class/Module.php b/class/Module.php index 616900c..05ec710 100644 --- a/class/Module.php +++ b/class/Module.php @@ -8,6 +8,15 @@ abstract class Module */ protected static $paramsList = array(); + // Nom du module (aka le nom de la classe en minuscule) + protected $moduleName; + + // Libellé du module (aka le nom affiché) + protected $moduleTitle; + + // Le chemin vers le module + protected $pathToModule; + /** * Liste des paramètres et leurs valeurs de l'object * diff --git a/class/Search.php b/class/Search.php deleted file mode 100644 index 5b7bcf3..0000000 --- a/class/Search.php +++ /dev/null @@ -1,39 +0,0 @@ - - - '; - } - - private function setParams($params){ - $this->params = $params; - } - - public static function start($params){ - $search = new search($params); - } - - public static function updateConfig($updated){ - - } -} \ No newline at end of file diff --git a/getUncompletedTasks.php b/getUncompletedTasks.php deleted file mode 100644 index a7a33ce..0000000 --- a/getUncompletedTasks.php +++ /dev/null @@ -1,12 +0,0 @@ - -$xmla = simplexml_load_file('todoist.xml'); -if($xmla->token== '' || $xmla->token == null) - header('Location: index.php'); -if($xmla->id != '' || $xmla->id != null): -$token = $xmla->token; -$id = $xmla->id;?> - - - else: - header('Location: getProjectsList.php'); - endif; \ No newline at end of file diff --git a/images/weather/nuage.png b/images/weather/nuage.png deleted file mode 100644 index f6237bb..0000000 Binary files a/images/weather/nuage.png and /dev/null differ diff --git a/images/weather/peu-nuageux.png b/images/weather/peu-nuageux.png deleted file mode 100644 index 509e474..0000000 Binary files a/images/weather/peu-nuageux.png and /dev/null differ diff --git a/images/weather/pluie.png b/images/weather/pluie.png deleted file mode 100644 index ddfcdbb..0000000 Binary files a/images/weather/pluie.png and /dev/null differ diff --git a/images/weather/soleil.png b/images/weather/soleil.png deleted file mode 100644 index f9b9e4c..0000000 Binary files a/images/weather/soleil.png and /dev/null differ diff --git a/addLink.php b/includes/addLink.php similarity index 100% rename from addLink.php rename to includes/addLink.php diff --git a/calculator.html b/includes/calculator.html similarity index 100% rename from calculator.html rename to includes/calculator.html diff --git a/notepad.html b/includes/notepad.html similarity index 100% rename from notepad.html rename to includes/notepad.html diff --git a/js/gmap.js b/js/gmap.js deleted file mode 100644 index bd5deb5..0000000 --- a/js/gmap.js +++ /dev/null @@ -1,23 +0,0 @@ - -$(document).ready(function(){ - - $('#menu-bar').append($('#myAdress')); - $('#map').css({'visibility':'hidden'}); - $('#gmapLink').fancybox({ - 'transitionIn': 'elastic', - 'transitionOut': 'elastic', - 'onClosed': function(){$('#map').css({'visibility':'hidden'});}, - 'onStart': function(){$('#map').css({'visibility':'visible'});} - }); - $('#myAdressField').keydown(function(e){ - var code = (e.keyCode ? e.keyCode : e.which); - if(code == 13) { - var adress = $(this).val(); - geocodeMarker(adress,adress,adress,'','http://maps.gstatic.com/intl/fr_ALL/mapfiles/markers/marker_sprite.png'); - geocodeCenter(adress); - $('#gmapLink').trigger('click'); - - } - }); -}); - diff --git a/js/jquery.xdomainajax.js b/js/jquery.xdomainajax.js deleted file mode 100644 index 2764709..0000000 --- a/js/jquery.xdomainajax.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * jQuery.ajax mid - CROSS DOMAIN AJAX - * --- - * @author James Padolsey (http://james.padolsey.com) - * @version 0.11 - * @updated 12-JAN-10 - * --- - * Note: Read the README! - * --- - * @info http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/ - */ - -jQuery.ajax = (function(_ajax){ - - var protocol = location.protocol, - hostname = location.hostname, - exRegex = RegExp(protocol + '//' + hostname), - YQL = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?callback=?', - query = 'select * from html where url="{URL}" and xpath="*"'; - - function isExternal(url) { - return !exRegex.test(url) && /:\/\//.test(url); - } - - return function(o) { - - var url = o.url; - - if ( /get/i.test(o.type) && !/json/i.test(o.dataType) && isExternal(url) ) { - - // Manipulate options so that JSONP-x request is made to YQL - - o.url = YQL; - o.dataType = 'json'; - - o.data = { - q: query.replace( - '{URL}', - url + (o.data ? - (/\?/.test(url) ? '&' : '?') + jQuery.param(o.data) - : '') - ), - format: 'xml' - }; - - // Since it's a JSONP request - // complete === success - if (!o.success && o.complete) { - o.success = o.complete; - delete o.complete; - } - - o.success = (function(_success){ - return function(data) { - - if (_success) { - // Fake XHR callback. - _success.call(this, { - responseText: data.results[0] - // YQL screws with - '; + echo ' + '; + require($this->pathToModule.'includes/blogs_last_post.php'); + echo ''; echo ''; echo ' '; } echo ''; }else{ echo 'baaaaad persistance...'; diff --git a/ajax/saveTodoist.php b/modules/todo/ajax/saveTodoist.php similarity index 100% rename from ajax/saveTodoist.php rename to modules/todo/ajax/saveTodoist.php diff --git a/css/todo.css b/modules/todo/css/todo.css similarity index 85% rename from css/todo.css rename to modules/todo/css/todo.css index 10df132..f3e6655 100644 --- a/css/todo.css +++ b/modules/todo/css/todo.css @@ -6,12 +6,12 @@ #todo ul{list-style:none;} #todo ul li{white-space : nowrap; padding-left:16px;} -#todo ul li div.puce{width: 16px; height: 16px; background:url(../images/interface/ui-icons_888888_256x240.png) -32px -48px no-repeat; display:inline-block;} +#todo ul li div.puce{width: 16px; height: 16px; background:url(../../../images/interface/ui-icons_888888_256x240.png) -32px -48px no-repeat; display:inline-block;} .ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; background-position: -80px -224px;background-image: url(../images/interface/ui-icons_888888_256x240.png);} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; background-position: -80px -224px;background-image: url(../../../images/interface/ui-icons_888888_256x240.png);} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } diff --git a/db/todoist.xml b/modules/todo/db/todoist.xml similarity index 100% rename from db/todoist.xml rename to modules/todo/db/todoist.xml diff --git a/getProjectsList.php b/modules/todo/includes/getProjectsList.php similarity index 75% rename from getProjectsList.php rename to modules/todo/includes/getProjectsList.php index f89a6a4..ba97bba 100644 --- a/getProjectsList.php +++ b/modules/todo/includes/getProjectsList.php @@ -1,5 +1,5 @@ -$xmla = simplexml_load_file('db/todoist.xml'); +$xmla = simplexml_load_file('../db/todoist.xml'); if($xmla->token== '' || $xmla->token == null) header('Location: install-todoist.php'); if($xmla->name == '' || $xmla->name == null):?> @@ -7,7 +7,7 @@ if($xmla->name == '' || $xmla->name == null):?>