• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Modifying upcoming events module.

Modifying upcoming events module. 9 years 9 months ago #28203

  • rob422
  • rob422's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi there,

There is no option for the current events module to display which category each specific event is in.

I've looked at the code for how the component displays that information and found this:

<?php if ($event->locationid && $event->lpublished && !empty($event->options['show_location_list'])) { echo JText::_('COM_RSEVENTSPRO_GLOBAL_AT'); ?> <a href="<?php echo rseventsproHelper::route('index.php?option=com_rseventspro&layout=location&id='.rseventsproHelper::sef($event->locationid,$event->location)); ?>"><?php echo $event->location; ?></a> <?php } ?>
 
<?php echo (!empty($event->options['show_categories_list']) ? $categories : '').' '.(!empty($event->options['show_tags_list']) ? $tags : ''); ?>

Now that helps me with showing WHERE the event is taking place, but it doesnt seem to want to show the category.

Is there a piece of code I can use in my module override to display the category associated with each item?

Thanks much.
The administrator has disabled public write access.

Modifying upcoming events module. 9 years 9 months ago #28211

  • rob422
  • rob422's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I've received an excellent response from tech support, I figured I'd share in case anyone else was looking for the same answer.
Hello,

I'm assuming you are referring to the Upcoming Events module.

Please download it once again and run it over your current one, this will revert the module back to its original source code (in case you've performed any source code changes).

It would be best if you perform template overrides as explained here:

www.rsjoomla.com/support/documentation/v...s-look-and-feel.html

The file you need to perform template overrides, is located under this path:

\modules\mod_rseventspro_upcoming\tmpl\default.php

Open it and:

1. Add:

<?php if (isset($details) && !empty($details)) $categories = $details; else continue; ?>

After:

<?php if (isset($details) && !empty($details)) $event = $details; else continue; ?>

2. Add:

<p>Category: <?php echo $categories; ?></p>

Before:

</li>
<?php } ?>

This will display the categories according to your events. If you want the category ID as well, you can try performing a query based on the category name.

Regards!

One last thing I'm having trouble with is how to call category ID's.

I'd like to associate an image to each category, and use the ID to call the proper image through an array (which I can figure out by myself, just not exactly sure how to call the category ID.)
Last Edit: 9 years 9 months ago by rob422.
The administrator has disabled public write access.

Modifying upcoming events module. 6 years 10 months ago #37009

  • bogdan.tataru
  • bogdan.tataru's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 174
  • Thank you received: 40
In order to display the event categories in the Upcoming events module, you need to take the following steps:

Performing a template override as explained here:

www.rsjoomla.com/support/documentation/r...s-look-and-feel.html

.. for the following file:

\modules\mod_rseventspro_upcoming\tmpl\default.php

Afterwards take the following steps:

1) Open the copy of the "default.php" file

2) Add:
<?php if (isset($details) && !empty($details)) $categories = $details; else continue; ?>
After:
<?php if (isset($details) && !empty($details)) $event = $details; else continue; ?>
3) Add:
<p>Category: <?php echo $categories; ?></p>
Before:
</li>
<?php } ?>
My help is not official customer support. To receive assistance, submit a ticket by clicking here
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!