-
Notifications
You must be signed in to change notification settings - Fork 1
config.event.json
The config.event.json
is the configuration file of Event. This file will be automatically created in
kit2/extension/phpmanufaktur/phpManufaktur/Event/config.event.json
JSON files are easy to read for humans and can be edited with every text file editor.
The config.event.json
contains multiple sections:
You must always configure the sections permalink
and fallback
, all other sections are optional.
If a visitor propose and publish an event he can also ask to get an account to edit events he has proposed or to edit events which are assigned to him as event organizer or event location. The email which is generated in this case will be send by default to the provider (the owner of the website):
"account": {
"confirm": {
"mail_to": [
"provider"
]
}
}
The email address of the provider is equal to the SERVER_EMAIL
and defined in the kitFramework swift.cms.json.
Instead of the keyword provider
you can use any valid email address and you can define multiple addresses, separated by comma:
"account": {
"confirm": {
"mail_to": [
"provider",
"[email protected]"
]
}
}
The contact
section define the general handling of contacts, generated by event proposes.
"contact": {
"confirm": {
"double_opt_in": true,
"mail_to": [
"contact",
"provider"
]
}
}
If a visitor is using a subscription dialog and create a new contact record, this contact record is locked by default as long as the visitor has not confirmed his email address with a special link (double_opt_in
method).
The confirmation, that the new contact record is now unlocked will be send to the mail_to
email addresses. The keyword contact
mean, that the visitor (the contact orginator) will get a confirmation that his contact record is now unlocked. The keyword provider
is equal to the general used SERVER_EMAIL
defined in the kitFramework swift.cms.json.
Remark: The double_opt_in
for event subscriptions is handled in the section event > subscription > confirm
"contact": {
"fragmentary": {
"login": {
"suffix": "@event.dummy.tld"
}
}
}
The contact > fragmentary > login > suffix
is used to generate automated contact records, i.e. if a user propose a event and does not know the email address of the event organizer Event will generate a random prefix and attach the suffix
to get a pseudo email address like [email protected]
which can be internal used by Contact and Event.
The event
section is more extensive and uses the following sub-sections:
This section describe the general handling of event dates:
"event": {
"date": {
"event_date_from": {
"allow_date_in_past": false
},
"event_date_to": [
],
"event_publish_from": {
"subtract_days": 21
},
"event_publish_to": {
"add_days": 7
}
}
}
By default Event does not allow to create events which started in the past ("allow_date_in_past":false
).
The item "event_date_to"
is actual not used and can be ignored.
In general you will define the date and time when the event starts and when the event ends. If you don't define the dates for publishing the event, Event will generate this dates. By default
"event_publish_from": {
"subtract_days": 21
}
Event will publish 21 days before the event starts and
"event_publish_to": {
"add_days": 7
}
publish 7 days after the event ends.
subtract_days
and add_days
will be also used by Event to generate recurring events.
By default Event tell you, that you must define a title
, a short description
and a long description
for each event. These terms are valid in the backend, if you directly type in an event, but also if a visitor propose an event.
"event": {
"description": {
"title": {
"required": true,
"min_length": 5
},
"short": {
"required": true,
"min_length": 30
},
"long": {
"required": false,
"min_length": 50
}
}
}
You can fit these terms to your needs.
By default Event enable authenticated visitors to edit events directly in the frontend:
"event": {
"edit": {
"frontend": true
}
}
These settings are needed by the propose dialog and determine the behavior of Event, if the location is unknown, the identifier to use in this cases and which contact fields are always needed:
"event": {
"location": {
"unknown": {
"enabled": false,
"identifier": "[email protected]"
},
"required": {
"name": false,
"zip": true,
"city": true,
"communication": false
}
}
}
If an event has no limit for the participants (indicated by -1
) Event will use the value offer_count_unlimited
to indicate the available tickets in the microdata of the event. This is because in microdata you can not specify an unlimited value.
"event": {
"microdata": {
"offer_count_unlimited": 20
}
}
These settings are needed by the propose dialog and determine the behavior of Event, if the organizer is unknown and the identifier to use in this case:
"event": {
"organizer": {
"unknown": {
"enabled": true,
"identifier": "[email protected]"
}
}
}
If a visitor propose an event, the provider of the website must confirm this event before it will be published:
"event": {
"propose": {
"confirm": {
"mail_to": [
"provider"
]
}
}
}
The keyword provider
is equal to the general used SERVER_EMAIL
defined in the kitFramework swift.cms.json. You can also add any valid email address and you can insert multiple email addresses separated by comma.
This section handles the subscriptions for an event and is using three subsections:
#####event > subscription > confirm
Determine if the double_opt_in
method is used and to which groups the confirmation will be send:
"event": {
"subscription": {
"confirm": {
"double_opt_in": false,
"mail_to": [
"contact",
"provider"
]
}
}
}
See also section contact
for more information about the double_opt_in
method.
#####event > subscription > contact
By default the subscription dialog is using the contact fields
If you want to get more information about the subscriber you can enable additional contact fields in the form:
The order of the contact fields in the subscription form is identical with the order of the fields in the config.event.json
file, you can rearrange the fields as you want.
######event > subscription > contact > birthday
"event": {
"subscription": {
"contact": {
"birthday": {
"name": "birthday",
"enabled": false,
"required": false
}
}
}
}
Set enabled
to true
to enable this contact field to input a birthday and set required
to true
to make this field to a required field (indicated by an asterisk).
######event > subscription > contact > cell
"event": {
"subscription": {
"contact": {
"cell": {
"name": "cell",
"enabled": false,
"required": false
}
}
}
}
Set enabled
to true
to enable this contact field to input a cell phone and set required
to true
to make this field to a required field (indicated by an asterisk).
######event > subscription > contact > country
"event": {
"subscription": {
"contact": {
"country": {
"name": "country",
"enabled": true,
"required": false,
"default": "DE",
"preferred": [
"DE",
"AT",
"CH"
]
}
}
}
}
Set enabled
to true
to enable this contact field to select a country and set required
to true
to make this field to a required field (indicated by an asterisk).
With default
you can determine the default country, with preferred
you can determine the countries which will be shown at the top of the selection list.
######event > subscription > contact > email
"event": {
"subscription": {
"contact": {
"email": {
"name": "email",
"enabled": true,
"required": true
}
}
}
}
The email field is a must field, you can not disable this field and you can not set required
to false
- if you try it you will get an exception and Event will abort the program.
######event > subscription > contact > first_name
"event": {
"subscription": {
"contact": {
"first_name": {
"name": "person_first_name",
"enabled": true,
"required": false
}
}
}
}
Set enabled
to true
to enable this contact field to input the first name and set required
to true
to make this field to a required field (indicated by an asterisk). This field is enabled by default.
######event > subscription > contact > gender
"event": {
"subscription": {
"contact": {
"gender": {
"name": "person_gender",
"enabled": true,
"required": true,
"default": "MALE"
}
}
}
}
Set enabled
to true
to enable this contact field to select the gender and set required
to true
to make this field to a required field (indicated by an asterisk). This field is enabled by default.
You can also specify the default
value for the gender selection: MALE
or FEMALE
.
######event > subscription > contact > last_name
"event": {
"subscription": {
"contact": {
"last_name": {
"name": "person_last_name",
"enabled": true,
"required": true
}
}
}
}
Set enabled
to true
to enable this contact field to input the first name and set required
to true
to make this field to a required field (indicated by an asterisk). This field is enabled by default.
######event > subscription > contact > phone
"event": {
"subscription": {
"contact": {
"phone": {
"name": "phone",
"enabled": false,
"required": false
}
}
}
}
Set enabled
to true
to enable this contact field to input a regular phone and set required
to true
to make this field to a required field (indicated by an asterisk).
######event > subscription > contact > street
"event": {
"subscription": {
"contact": {
"street": {
"name": "street",
"enabled": false,
"required": false
}
}
}
}
Set enabled
to true
to enable this contact field to input a street and set required
to true
to make this field to a required field (indicated by an asterisk).
######event > subscription > contact > zip
"event": {
"subscription": {
"contact": {
"zip": {
"name": "zip",
"enabled": false,
"required": false
}
}
}
}
Set enabled
to true
to enable this contact field to input a cell phone and set required
to true
to make this field to a required field (indicated by an asterisk).
#####event > subscription > terms
If you want that the subscriber of an event also accept your terms and conditions, you can enable a checkbox and determine an URL to the conditions:
"event": {
"subscription": {
"terms": {
"name": "terms_conditions",
"enabled": false,
"required": true,
"label": "I accept the \u003Ca href=\"%url%\" target=\"_blank\"\u003Egeneral terms and conditions\u003C\/a\u003E",
"url": "http:\/\/domain.tld"
}
}
}
In progress Event is using a parameter identifier pid
to reference parameter values and settings. Links with a attached pid
are indicated as noindex
and should not referenced by the search engines. Nevertheless it may happen that a link with pid
is referenced and the pid
is no longer valid. In this cases Event don't know what to do. Instead of prompting an error Event will use a defined fallback > cms > url
and show this page instead. The fallback should be a list with actual events or something else:
"fallback": {
"cms": {
"url": ""
}
}
This section contains general settings. At the moment the only setting is for a timeout, which is relevant for imports from previous kitEvent versions a.s.o.:
"general": {
"max_execution_time": 60
}
Event can create iCal files, they must be enabled (active
) and you must specify a path to store these files.
"ical": {
"active": true,
"framework": {
"path": "\/media\/protected\/event\/ical"
}
}
Event is using permanent links for all events. To make them working, Event need an anchor - a page in your CMS where a kitCommand `~~ event action[view] ~~ is placed and which will be called and rewritten whenever a permanent link is executed. This is one of the most important settings of Event!
"permalink": {
"cms": {
"url": "http:\/\/domain.tld\/page\/foo.php"
}
}
Event can create QR-Codes which may contain a link
to the event details or may contain the iCal information. If you want to use QR-Codes you must enable (active
) the code generation. With qrcode > settings > content
you can specify the format link
or ical
.
Please contact the support before you are changing any other settings of this section.
"qrcode": {
"active": false,
"framework": {
"path": {
"link": "\/media\/protected\/event\/qrcode\/link",
"ical": "\/media\/protected\/event\/qrcode\/ical"
}
},
"settings": {
"content": "link",
"size": 3,
"error_correction": 1,
"margin": 2
}
}
You can enable a rating function with stars for the events:
"rating": {
"active": true,
"type": "small",
"length": 5,
"step": true,
"rate_max": 5,
"show_rate_info": false
}
- If you spot a typo or want to contribute an article, a how-to or a tip, please feel free to edit the Wiki directly
- If you you have any question or suggestion, please contact the phpManufaktur Support Group
This Documentation is part of the kitFramework.
© 2011, 2013 by phpManufaktur, kitFramework and Event are published under MIT license.