Update MySQL Database with information from drag-and-drop event - php

I am using this template to build a website for a church.
The church wants a really good calendar entry point to add events.
With the calendar on the current template it's nice and simple and you can drag the events onto the corresponding date. What I need is a way to get the date where the event has been dragged onto so I can update the MySQL database.
Here is the link to the direct calendar http://usman.it/themes/charisma/calendar.html
The code for showing the calendar is just
<div id="calendar"></div>

Basically the calender is loaded through javascript.
If you take a look at the charisma.js inside the themes folder you should be able to see that the calendar will be invoked for example as follows,
$('#calendar').fullCalendar({ << some options here >> });
you can go through the documentation for the full calendar at the following site :
http://arshaw.com/fullcalendar/

I guess you want to use datepicker, see:
http://jqueryui.com/datepicker/#inline

Since you're usig draggables (jquery), you can hook into their events to collect the data: http://jqueryui.com/draggable/#events
check out the api documentation for the possiblities: http://api.jqueryui.com/draggable/

Related

Pulling data from MySQL into an Elgg application

I'm trying to use Elgg as a starting point for a certain type of social media website. One of the main things I'd like to do is allow users to create events and then display all the events in a sortable table (sortable by different attributes given to the event during the creation like date and title). For the event creation aspect, I'm using the plugin Event Manager.
I'm assuming the best way to do this is to pull the event data from where ever it is stored and put it into an HTML table (I'm using the jQuery TableSorter code). Can anyone give me a good idea of where and how to start doing this?
The biggest problem I'm having is finding where the event data is stored in MySQL.
For the database organisation and model, read:
http://docs.elgg.org/wiki/Engine/DataModel
http://docs.elgg.org/wiki/DatabaseSchema
For fetching the data, consider using:
http://reference.elgg.org/1.8/engine_2lib_2metadata_8php.html#aec4b6f0b9565e3554acb9b39ef34a2ac
With options order_by and order_by_metadata for chosen information.

Multiple employment histories with PHP

I have been trying to create a php form that allows you do add your employment history. I wanted it to work with javascript to add new fields such as in this link: jsfiddle.net/jaredwilli/tZPg4/4/, but with drop down lists to add a start date and end date, and then be able to POST this to php.
I am a newbie to javascript and am in need of help with this code if possible.
Thank you in advance
Am I correct in understanding that you want to add a date picker to your existing input?
If that's the case, and seeing how you're already using jQuery, you should check out jQueryUI which has a Datepicker module with great documentation.

Provide an embed code of a section of a page for users to use

I have a ticketing site ( eventtickx.com...click buy tickets on the event ghana # 55(you will see the layout)). I want to generate embed code for event managers for each event they post. I want an embed code for the tickets available section only which has the information ( ticket assignment, quantity and price). so basically this is what I am trying to do ..generate an embed code for tickets available section of a page for each event to event manager that created the event. how do I go about doing this? Thanks for your help.
I'm not sure if I fully understand you, but I think you would like to provide a snippet like <iframe src="http://eventtickx.com/embed_event.php?eid=123"></iframe> to enable people to embed a little info box for a specific event on their site (like you can do with YouTube videos)?
What you would need is a script (e.g. embed_event.php) that provides the iframe content and takes one GET parameter.
This script would do the necesserary queries (getting event name, description, available tickets etc. from the database) and display them as a complete HTML page (similar to what you are doing in event_details.php).
The GET param would be typically the event ID that you could use to query your database.
The embed code could be generated as soon as you know the event ID (usually after you have inserted the dataset into you database when creating the event).

PHP: Match a specific date to a recurring iCal rule

I need to build a simple calendar to embed in my PHP application.
Basically I have a bunch of recurrent events whose iCal recurrent rule (rrule) is known (e.g.: "FREQ=MONTHLY;INTERVAL=2;BYDAY=SU" or "FREQ=WEEKLY;BYDAY=SU").
Basically I need a function that given
_ an event iCal rrule
_ a certain day (e.g. 04/10/2011)
returns a boolean telling me whether the event is on at that date.
Obviously I can build it myself but it would take ages: is there any reliable library already available for that?
Thanks,
Dan
Although I am at the end of my own calendar project and I am not using iCal, perhaps this will help.
My own experience is that I could not find any sort of library and I coded my own backend from scratch.
For the front-end, I would urge you to use FullCalendar, it is an amazing calendar with what you can do with it. All you need to then, is concentrate on the backend.
For the db, I would go the route of having only 1 database row per event and when that event is modified, if it is recurring then you amend the existing event and create a new event with the change.
For the back-end logic, in conjunction with fullcalendar it gives you a window to work with. Within this window, I would then work out when the event occurs and then show, if the event is recurring to then work out when it should be shown on the calendar. It can get a bit complex but you can do it.
I'm attaching pics of what I have done, sadly this project isn't open source.
Add New Recurring Event
Calendar with Recurring Events
Amend Recurring Event
Agenda List View
Cheers

FullCalendar jquery plugin: Move events between 2 calendars on the same page

Edit: This is for the FullCalendar jquery plugin(http://arshaw.com/fullcalendar/).
Is there a way to move an event from one calendar(in month mode) to another calendar(in month mode) that are both on the same page? I know there is a demo on the fullcalendar home page that shows dragging events onto a calendar, but when you try to drag an event off the calendar onto another calendar, this does not work. The event gets hidden behind the calendar container element. Any ideas on how to get something like this to work? Thanks.
this issue http://code.google.com/p/fullcalendar/issues/detail?id=550, though not yet implemented, will handle this.

Categories