I am configuring the simplecalendar module in Joomla 3.2.2 Wich seems not to be capable of displaying the category of an event in the module?

In the backend there is a line loading different parameters of an event like:


I already tryed {CATEGORY}, {CATNAME}, {CAT} and some more, but none of them do the trick. When trying {CATEGORY} it even gives me an output, but it just says "Error!", even though all events are in some sort of category.

I did search for a solution on the developers site, but the contact and the forum seem to be dead.

  • This page appears unresolved/abandoned. Please always progress your questions to a system recognized resolution. If you managed to self-solve, please share your solution as an educational and complete answer and accept your own answer. If after four years this was never solved, maybe you could add details to clarify where you are stuck. IMO all questions should eventually 1. have an accepted answer 2. be closed or 3. be deleted. Thanks in advance for helping to curate quality content for researchers.
    – mickmackusa
    Mar 9 '19 at 21:56

I don't know if this is the correct way but it works for me.

In the helper.php located in modules/mod_simplecalendar, add the following:

$query->select('c.title AS category');

// Load the permissions functions
$user = JFactory::getUser(); 
$user_levels = implode(',', array_unique($user->getAuthorisedViewLevels()));
$params->get( 'count', '2' );

$query = $db->getQuery(true);

$query->select('CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END AS slug');
$query->select('CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END AS catslug');
$query->from('#__simplecalendar AS a');
$query->select('c.title AS category');
$query->join('LEFT', '#__categories AS c on c.id = a.catid');       
$query->where("( $where ) AND a.state = 1");        
$query->where('a.access IN ('.$user_levels.') AND c.access IN ( '. $user_levels .')');      

if ( $catid[0] != 0 || $categories == '' )      
    $query->where( $categories);
  • looks promising, but after adding the code, the page just turns white when loading. I also tried replacing a part of the helper.php that looked similar (from line 104 or 118), but that results in the same.
    – samtun
    Mar 27 '15 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.