JCalPro - My Events Plugin

16 years 8 months ago #43825 by abhigudi
JCalPro - My Events Plugin was created by abhigudi
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
Attachments:

Please Log in to join the conversation.

16 years 8 months ago #43929 by beat
Replied by beat on topic Re:Done : Plugin For CB Intergration
Very cool B)

Thanks for sharing :)

I know the JCal team is preparing CB integration, but it's not for today, and this will help other users for sure, and maybe also JCal team which is in touch with us :) .

To complete the web of links, I'm adding the link to the corresponding JCal thread here:

dev.anything-digital.com/component/option,com_smf/Itemid,71/topic,1545

So that people can check advances on both fronts :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 8 months ago #43956 by abhigudi

Please Log in to join the conversation.

16 years 8 months ago #43972 by sa247
Replied by sa247 on topic Re:Done : Plugin For CB Intergration
awesome!

any chance we can see a demo?

And also I am stuck has how to list line numbers i am wrapping up a hack/plugin myself, what is the best method - i am just using notepad at the moment!

Please Log in to join the conversation.

16 years 8 months ago #43975 by abhigudi
Replied by abhigudi on topic Re:Done : Plugin For CB Intergration
On windows, i use Vim[Vi Improved].. Try is its amazing.. Similar to the Vi on Linux with a UI..

As of now my site is not live for you too see a demo.. Here's a screen shot..

Post edited by: abhigudi, at: 2007/08/24 10:48
Attachments:

Please Log in to join the conversation.

16 years 8 months ago #43976 by abhigudi
Replied by abhigudi on topic Re:Done : Plugin For CB Intergration
Size was too big for posting sorry..

Attachment CBJCalInAction.zip not found

Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.265 seconds

Facebook Twitter LinkedIn