Repository navigation
eValert file format
#events file format ##json format
{
"jcal": [
{
"name":"event name",
"startdate":"event start date",
"starttime":"event start time",
"bgcolor":"event background color",
"color":"event text color",
"eventalert":"alert parametrs",
"url":"event url link"
}
]}
###more than one event
{
"jcal": [
{
"id":"1",
"name":"event-1",
.
.
.
},
{
"id":"2",
"name":"event-2",
.
.
.
},
.
.
.
]}
##json parametrs Description:
event name - the name of the event [text].
event start date - the start date of the event.must be in format: YYYY-mm-dd where YYYY-year,
mm-month, dd-day [2016-11-30].
event start time - (optional) the start time of the event. in 24 hour format, hh:**mm **where hh-hour, mm-minute [23:30].
event background color - (optional) background color of event ['red' or '#ff0000'].
event text color - (optional) text color of event ['blue' or '#0000ff'].
alert parametrs - format: 'TYPE=alert;BFOR=bb;VAL=value',
Where:
- alert: ALERT (Uppercase)
- bb: WEEK , DAY , HOUR , MIN (Uppercase)
- value: intiger number.
'TYPE=ALERT;BFOR=WEEK;VAL=2' - Alert 2 weeks befor the event occur.
'TYPE=ALERT;BFOR=DAY;VAL=3' - Alert 3 days befor the event occur.
'TYPE=ALERT;BFOR=HOUR;VAL=4' - Alert 4 hours befor the event occur.
'TYPE=ALERT;BFOR=MIN;VAL=45' - Alert 45 minutes befor the event occur.
event url link - (optional) in list view mode, when click on the event ,the link will be run ['http://my/link'].
##using ajax and php
This plugin use ajax technology and POST type connection.
$('#event_alarm_content').evalert({
.
.
eventSource: 'php',
eventUrl:'path/to/your.php',
.
.
.
});
###your.php
if(isset($_POST["data"])){
$data = $_POST["data"];
.
//yore code
.
echo $your_data; //most be in json format.
}
The returned (echo) data from php file must be as above json formt.