According to the date on this exchange, it has been two years. I am wondering if there has been any upgrades to this Jcal plug in. The plug in works great on my joomla 1.5 site and it is coming up on the community builder profiles, but I want the events to show up on the profiles only for that particular profile.
I tried making the changes below, but couldn't find the code in #1 anywhere. Can you help?
Connie Whitlock
www.kingcatmusic.com
I've just written a plugin for Community Builder integration where in the users profile, the events which he add are shown.. Three files need to be changed for this to work.. Along with one db change.. Sorry guys i cant point out the line numbers as my component files are heavily modified..
Filenames : admin_events.php , jcalpro.php
Two common changes in these files..
1. Find the INSERT query and add this field to be inserted..
$query = "INSERT INTO ".$CONFIG_EXT." (
title, description, contact, url, email, picture, cat, day, month, year, start_date, end_date, approved, recur_type, recur_val, recur_end_type, recur_count, recur_until, published, userid) VALUES
('$title','$description','$contact','$url','$email','$picture','$cat','$day','$month','$year
','$start_date','$end_date','$approve','$recur_type','$recur_val','$recur_end_type','$recur_
count','$recur_until', '1','$userid')";
2. Find this line in the code..
if (isset($form)) $cat = $form; else $cat = '';
Add this on the next line..
if (isset($form)) $userid = $form; else $userid = '';
Filenames : /themes/default/theme.php
Two changes in this file..
1. Add global declaration $my at the top of the page..
global $my;
2. Find the template for adding an event
// HTML template to display an event form
$template_add_event_form = <<<EOT
Add the followning code
<!-- BEGIN userid_hidden -->
<input type='hidden' name='userid' value="$my->id"/>
<!-- END userid_hidden -->
after the <!-- END url_row -->
Database -> Tablename #__jcalpro_events
Alter the table and add a new field userid int(15)