From 7dd59cf1f5c5452d31669ca196405ac77da3ab00 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 24 Jul 2011 17:06:13 +0000 Subject: added RSS - part 1 --- h-source/Application/Controllers/RssController.php | 41 ++++++++++++++++++++ .../Application/Controllers/SpecialController.php | 2 +- h-source/Application/Views/Rss/modifications.php | 45 ++++++++++++++++++++++ h-source/Config/Route.php | 1 + 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 h-source/Application/Controllers/RssController.php create mode 100644 h-source/Application/Views/Rss/modifications.php diff --git a/h-source/Application/Controllers/RssController.php b/h-source/Application/Controllers/RssController.php new file mode 100644 index 0000000..359c651 --- /dev/null +++ b/h-source/Application/Controllers/RssController.php @@ -0,0 +1,41 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +class RssController extends SpecialController +{ + + public function __construct($model, $controller, $queryString) + { + parent::__construct($model, $controller, $queryString); + + $data['title'] = 'RSS - '.Website::$generalName; + $this->append($data); + } + + public function modifications($lang = 'en') + { + parent::modifications($lang); + $this->clean(); + $this->load('modifications'); + } + +} \ No newline at end of file diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 3776a18..480c0fa 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -110,7 +110,7 @@ class SpecialController extends BaseController $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); - $this->m['HistoryModel']->clear()->inner('hardware')->on('hardware.id_hard=history.id')->select()->where($whereClauseArray)->orderBy('id_history desc'); + $this->m['HistoryModel']->clear()->select('history.*,hardware.*')->inner('hardware')->on('hardware.id_hard=history.id')->where($whereClauseArray)->orderBy('id_history desc'); $recordNumber = $this->m['HistoryModel']->rowNumber(); $page = $this->viewArgs['page']; diff --git a/h-source/Application/Views/Rss/modifications.php b/h-source/Application/Views/Rss/modifications.php new file mode 100644 index 0000000..02e7197 --- /dev/null +++ b/h-source/Application/Views/Rss/modifications.php @@ -0,0 +1,45 @@ + +\n";?> + + + +www.h-node.com +http://www.h-node.com + + +'inserted','update'=>'updated'); +?> + + + + <?php echo $row['hardware']['model'];?> + getUser($row['history']['created_by']);?>]]> + baseUrl."/".Hardware::$typeToController[$row['hardware']['type']]."/view/$lang/".$row['hardware']['id_hard']."/".encodeUrl($row['hardware']['model']);?> + + + + + + + +. +?> \ No newline at end of file diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index f8491d6..34dd039 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -162,6 +162,7 @@ class Route 'webcams,differences', 'webcams,climb', 'webcams,talk', + 'rss,modifications', 'special,modifications', 'special,modactions', 'special,adminactions', -- cgit v1.2.3