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)
If you have any question with integration please do email me at
jay@yulop.com / jayanth@amonks.in
Attachment plug_events.zip not found
Post edited by: abhigudi, at: 2007/08/23 14:22
Post edited by: abhigudi, at: 2007/08/27 07:05