4 * Event Calendar for Elxis CMS 2008.x and 2009.x
10 * @author Apostolos Koutsoulelos <akoutsoulelos@yahoo.gr>
11 * @authorurl http://www.bitcraft-labs.gr
12 * @copyright Copyright (C) 2009-2011 Apostolos Koutsoulelos. All rights reserved.
13 * @license GNU/GPL (http://www.gnu.org/copyleft/gpl.html)
15 * @link http://www.elxis-downloads.com/downloads/miscellaneous/204.html
18 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
20 if (!defined('EVCALBASE')) {
22 if ($_VERSION->RELEASE
> 2008) {
23 define('EVCALBASE', 'events');
25 define('EVCALBASE', 'com_eventcalendar');
29 class sitemap_arthrology
{
34 public function __construct() {
38 /****************************/
39 /* MENU ITEM TYPE VALIDATOR */
40 /****************************/
41 public function isOfType( $parent ) {
42 if (strpos($parent->link
, 'option=com_arthrology')) { return true; }
47 /********************/
48 /* RETURN NODE TREE */
49 /********************/
50 public function getTree($parent) {
51 global $database, $xartis, $mainframe, $my;
53 $query = "SELECT id FROM #__menu"
54 ."\n WHERE link = 'index.php?option=com_arthrology' AND published = '1'"
55 ."\n AND ((language IS NULL) OR (language LIKE '%".$xartis->maplang
."%'))";
56 $database->setQuery($query, '#__', 1, 0);
57 $_Itemid = intval($database->loadResult());
59 $database->setQuery("SELECT * FROM #__categories WHERE section='com_arthrology' ORDER BY title ASC");
60 $rows = $database->loadObjectList();
64 foreach ($rows as $row) {
66 $node->name
= $row->title
;
67 $node->link
= 'index.php?option=com_arthrology&task=magview&catid='.$row->id
;
68 $node->seolink
= EVCALBASE
.'/'.$row->seotitle
.'/';
70 $node->modified
= time() +
($mainframe->getCfg('offset') * 3600);
71 $node->changefreq
= 'daily';
72 $node->priority
= '0.8';
74 $node->icon
= 'category';
75 $list[$row->id
] = $node;
87 $tmp = new sitemap_arthrology
;
88 $xartis->addExtension($tmp);