Add Event owner and description in all views

Add Event owner and description in all views

I have installed JCal Pro on this intranet site which is also running JomSocial (I can set up a user account if required). I am using the mini calendar and latest events plugins and the flex module but have disabled the events feature of JomSocial and the jomsocial integration as I'd like JCal Pro to handle the events instead (the new event form is much more user friendly).

I'd like to be able to see the event owner and event description on most views but especially in the event view and on the flex module.
I had a brief look in the theme.php file (i'm using spartan-pro) and it looks like the description and contact details are there for the event view but they aren't showing on the site itself.
I'm happy editing the theme.php file but wondered if I'm missing something simple before I go in 'all guns blazing'. Also some pointers on where in the file the markup for the different views can be found would be much appreciated.

Thanks in advance

Sam

stephen.freed
New User
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Add Event owner and description in all views

stephen.freed,

there is no such option.

I will submit this as a request for v3 for J1.7+

Thank you

* Please note that all support is handled on this forum.
** Please read the FAQs and Documentation before posting:
Docs: Advanced Search | Agora | JCal Pro | Josetta | RSVP | sh404SEF
FAQs: Advanced Search | Agora | JCal Pro | Josetta | RSVP | sh404SEF

Ron van Schaik
Support Specialist
ranks
useravatar
Online
1087 Posts
User info in posts
Administrator has disabled public posting

Re: Add Event owner and description in all views

Thanks for the reply Ron.
I'll have a tinker with the template file and see what I can figure out. Would there be any interest in me posting the results if I do get it working?

Sam

stephen.freed
New User
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Add Event owner and description in all views

Of course,

other members may certainly appreciate your solution

Thanks

* Please note that all support is handled on this forum.
** Please read the FAQs and Documentation before posting:
Docs: Advanced Search | Agora | JCal Pro | Josetta | RSVP | sh404SEF
FAQs: Advanced Search | Agora | JCal Pro | Josetta | RSVP | sh404SEF

Ron van Schaik
Support Specialist
ranks
useravatar
Online
1087 Posts
User info in posts
Administrator has disabled public posting

Re: Add Event owner and description in all views

Hi Ron,

I created a solution to the issue of not being able to see who created an event. I decided that as I always wanted to see who had created the event, the easiest approach was to add the owners name to the event title as the event is added.
To do this I added a small amount of code to the 'CreateEvent' function in the function.inc.php file. As below:

File: Joomla_Root/components/com_jcalpro/include/function.inc.php
Line: 2666

Original Code:

Code:

$event->title = $title;

Replaced With:

Code:

$db = &JFactory::getDBO();

$query = "SELECT name FROM #__users WHERE id=" . $owner_id;
$db->setQuery( $query );
$name = $db->loadResult();
$event->title = $name . " - " . $title;

Now when an event is added, the event title automatically becomes [owner_name] - [event_title]. This shows up in the calendar view, flat view, event view and anywhere else that the event title is shown.

I hope this proves useful to someone.

Sam

stephen.freed
New User
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Forum Legend

 

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked
 
 

Get the latest updates on our extensions