Thursday, 14 February 2019
  5 Replies
  838 Visits
0
Votes
Undo
Hi,

I am trying to echo all categories to an event in /administrator/components/com_jevents/icalevent/overview.php.

How do I do this? :o
Tuesday, 19 February 2019 09:25
·
#209148
Accepted Answer
0
Votes
Undo
Hello,

That's just an example of how we do it. You would also need to change $event as they is likely not defined in the event view.


If you are in the loop already try:

$row

instead of $event

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

Friday, 15 February 2019 00:43
·
#209061
0
Votes
Undo
Hello,

Is this for multiple or single category support on the events?

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

Friday, 15 February 2019 07:11
·
#209068
0
Votes
Undo
For multiple :)
Monday, 18 February 2019 21:38
·
#209133
0
Votes
Undo
This is the query we use to load in ALLCATEGORIES




$db = JFactory::getDbo();
$arr_catids = array();
$catsql = "SELECT cat.id, cat.title as name, cat.params FROM #__categories as cat WHERE cat.extension='com_jevents' ";
$db->setQuery($catsql);
$allcat_catids = $db->loadObjectList('id');

$db = JFactory::getDbo();
$db->setQuery("Select catid from #__jevents_catmap WHERE evid = " . $event->ev_id());
$allcat_eventcats = $db->loadColumn();

$allcats = array();
foreach ($allcat_eventcats as $catid)
{
if (isset($allcat_catids[$catid]))
{
$allcats[] = $allcat_catids[$catid]->name;
}
}
$categories = implode(", ", $allcats);



$categories should then output a comma seperated list.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

Tuesday, 19 February 2019 07:13
·
#209145
0
Votes
Undo
Thanks alot!

I am getting a Call to a member function ev_id() on null error. I can't find the table _categories in db :o
Tuesday, 19 February 2019 09:25
·
#209148
Accepted Answer
0
Votes
Undo
Hello,

That's just an example of how we do it. You would also need to change $event as they is likely not defined in the event view.


If you are in the loop already try:

$row

instead of $event

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.