[Fix] Xmap + Eventlist Plugin | Events not displaying
2 posts
• Page 1 of 1
[Fix] Xmap + Eventlist Plugin | Events not displaying
Firstly I would like to thank Guillermo Vargas for such a wonderful component. Saved me so much time in developing my site! And i guess you must be drained out supporting this component with numerous plugins.
I was using Xmap on my site and surprised to see my Eventlist events not showing up under its event category. I chose the Simplelist Layout as my menu.
Checked the codes for the plugin and fixed it. Below is the fixed function. This might not work for other Eventlist's menu type so don't flame me it it didn't work!
administrator/components/com_xmap/extensions/com_eventlist.php
line 132 - 178
Using:
Xmap 1.2.7
Eventlist Plugin 1.0.0
Eventlist 1.0.1
I was using Xmap on my site and surprised to see my Eventlist events not showing up under its event category. I chose the Simplelist Layout as my menu.
Checked the codes for the plugin and fixed it. Below is the fixed function. This might not work for other Eventlist's menu type so don't flame me it it didn't work!
administrator/components/com_xmap/extensions/com_eventlist.php
line 132 - 178
- Code: Select all
function getCategoryTree(&$xmap, &$parent, $params,$catid=0)
{
$db = &JFactory::getDBO();
$gid = intval($xmap->gid);
$query = "SELECT id , catname, alias"
. "\nFROM #__eventlist_categories"
. "\nWHERE published = 1 and parent_id=$catid"
. "\nAND access <= $gid"
. "\nORDER BY ordering";
$db->setQuery($query);
$cats = $db->loadObjectList();
$xmap->changeLevel(1);
foreach($cats as $cat)
{
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid.'c'.$cat->id;
$node->name = $cat->catname;
$node->link = 'index.php?option=com_eventlist&view=categoryevents&id='.$cat->id.':'.$cat->alias;
$node->expandible = true;
$xmap->printNode($node);
if ($params['include_events']) {
$db->setQuery ("select `id`, `title`,`alias`,UNIX_TIMESTAMP(`created`) as `created`,UNIX_TIMESTAMP(`modified`) as `modified` from #__eventlist_events where catsid=".$cat->id." and `published` = '1' ".$params['days']." order by dates,times,enddates,endtimes " . $params['limit']);
// echo $db->getQuery ();
$rows = $db->loadObjectList();
$xmap->changeLevel(1);
foreach ($rows as $event) {
$node = new stdclass;
$node->id = $parent->id;
$node->uid = $parent->uid .'e'.$event->id;
$node->name = $event->title;
$node->modified = ($event->modified? $event->modified : $event->created);
$node->link = 'index.php?option=com_eventlist&view=details&id='.$event->id.':'.$event->alias;
$node->priority = $params['event_priority'];
$node->changefreq = $params['event_changefreq'];
$node->expandible = false;
$xmap->printNode($node);
}
$xmap->changeLevel(-1);
}
}
$xmap->changeLevel(-1);
}
Using:
Xmap 1.2.7
Eventlist Plugin 1.0.0
Eventlist 1.0.1
- Attachments
-
com_eventlist.zip- Eventlist Plugin 1.0.0 Simplelist Layout fix
- (2.19 KiB) Downloaded 293 times
- kelipasan
- Fresh Boarder

- Posts: 1
- Joined: Thu Jun 03, 2010 3:42 pm
Re: [Fix] Xmap + Eventlist Plugin | Events not displaying
Thank you for your work.
Xmap 1.2.10 still does not have this fix in it. Perhaps it could be applied to the next update?
Xmap 1.2.10 still does not have this fix in it. Perhaps it could be applied to the next update?
- salesgorilla
- Fresh Boarder

- Posts: 3
- Joined: Mon Jun 15, 2009 3:36 am
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests