Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > General Support

General Support Questions about using the Easy PHP Calendar. (Not installation or customizations)

Closed Thread
 
Thread Tools Search this Thread Display Modes

Include a PHP script after new event created
Old 05-27-2010, 02:08 PM   #1
btz
Calendar User
 
btz is offline
Join Date: May 2010
Posts: 6
Default Include a PHP script after new event created

Where do I have to include a PHP script which should run whenever an event is created or updated.
 

Old 05-27-2010, 02:13 PM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

You can add code to the customHeader file in the events directory. We can't support what you're asking, but in your custom code, just look for the form being submitted or one of the variables being set.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 05-29-2010, 09:38 AM   #3
btz
Calendar User
 
btz is offline
Join Date: May 2010
Posts: 6
Default

Do you mean there is a variable which is set when an event has been created? What variable is that?
 

Old 05-29-2010, 10:30 AM   #4
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

Look for a variable of the event form to be set. (There is no specific hook for a new event).
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 05-31-2010, 04:49 AM   #5
btz
Calendar User
 
btz is offline
Join Date: May 2010
Posts: 6
Default

I tried to check one of the form variables in the headerCustom.inc.php and then include my script "copy-newest-event":

if(!empty($_POST['title']))
{
include 'copy-newest-event.php';
}

My script contains: SELECT * FROM epc_calendar ORDER BY id DESC;

The problem now is that my script does not copy the newest, just created event but the one before that.
It looks like the just created event is not yet stored in the database at the time when my script is executed.
 

Old 05-31-2010, 10:22 AM   #6
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

That would be correct. You would need to reference each post variable to capture all of the events details.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Manager opens PHP page mstras General Support 5 09-22-2008 10:39 AM
Need Help. Mixing easphp script with another php script flump General Support 17 11-28-2007 01:38 PM
Passing a URL variable into a PHP include? wakalapi PHP-Nuke Integration 6 11-12-2005 08:26 AM



All times are GMT -4. The time now is 07:00 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |