LiveWhale comes with functionality that allows visitors to your public web site to suggest news stories, events, and images to your website (or just events, in the case of LiveWhale Calendar). These items are added to a special “Public” group in the back-end for you to review, edit, and publish when ready.
Publicly submitted data will not show up on the public web site unless:
A default event submission form is included with Livewhale and LiveWhale Calendar at /livewhale/theme/core/templates/submit_event.php, which you can copy, edit, and include in your website. The form will include captchas if configured for your site.
There are a set of default form fields that are included in this form. Here is the full set of supported fields:
|Contact Name (required)||name|
|Contact Email (required)|
|Start Date (required)||event_date||Add
|End Date (LiveWhale 1.7+)||event_date2||Add
|Summary (LiveWhale 1.7+)||event_summary||Supports multiple lines with
|Description||event_description||Supports multiple lines with
|Contact Info||event_contact_info||Supports multiple lines with
|Cost (LiveWhale 1.7+)||event_cost||Added as cost type “Other,” supports multiple lines with
|Web Address||event_location||Added as Related Content|
||Selector will only show starred event types|
|Tags||event_tags||Separated by commas|
|Submit to calendar (if configured)||submission_group|
|Online Events (LiveWhale 1.7.1+)||See Online Events documentation for fields|
|File Attachment (LiveWhale 1.7.1+)||Use
||Uploaded file will be attached as related content|
Advanced: Create and accept your own custom submission variables using the onAfterPublicSubmission handler.
A default news submission form is included with Livewhale at /livewhale/theme/core/templates/submit_news.php, which you can copy, edit, and include in your website. The form will include captchas if configured for your site.
Or, you can model a news story submission form after the default event submission form, removing the date, time, and event type fields and substituting in the following field names:
and editing the form action to
<form method="post" action="/live/public/submit/news">.
A default image submission form is included with Livewhale at /livewhale/theme/core/templates/submit_image.php, which you can copy, edit, and include in your website. The form will include captchas if configured for your site.
Or, you can model an image submission form after the default event submission form, removing everything except the following fields:
and editing the form action to
<form method="post" action="/live/public/submit/image">.
By default, all content will be submitted to the “Public” group. You may choose to send news and events to other groups (images must always go to the “Public” group for approval) using the below options.
You can set one group for all submissions by editing the HTML form to include
<input type="hidden" name="submission_group" value="123" \> and replacing 123 with the group ID of your chosen group.
Or, you might want to submit to the current group of wherever you’ve included the form. You can use
<input type="hidden" name="submission_group" value="<xphp var="group_gid" \> in the HTML form to do that.
Or, you can have your users choose which group to submit to. Find the
widget type="public" in the HTML form and use the following option:
<widget type="public" priority="high">
then, add to your form
This will show a drop-down menu of all groups. To choose which groups should be available in that drop-down, edit the public LiveWhale config (/livewhale/client/public.config.php) and set
$_LW->CONFIG['PUBLIC_GROUPS']=array(123, 124, 125);
to include only the group IDs you want.
Since LiveWhale 1.7, you can instead configure a list of groups you don’t want included in the drop-down, if that’s easier than having to add new groups to the PUBLIC_GROUPS array:
$_LW->CONFIG['EXCLUDE_PUBLIC_GROUPS']=array(200, 201, 202);
By default, name and email are required fields for all public submissions. If you submit an image, caption is required. You can require additional fields in your public submission form by adding a custom validation handler.
If you’re submitting to the “Public” group: You can choose who will receive email notifications of public submissions by editing the global LiveWhale config (/livewhale/client/public.config.php) and setting
If you’re submitting to another group: Anyone who can publish dynamic content in a group (i.e., Publishers, Curators, and Administrators in LiveWhale Calendar) will be sent notifications when a story or event has been submitted to their group.
Since LiveWhale 1.7, you can send your visitors an email confirmation of their submission by setting the form field
send_email in your form. You can allow them to choose to receive it with a checkbox.
Or use a hidden input to send the email for all submissions.
<!-- always send a confirmation email -->
Since LiveWhale 1.7, you can set (or override) a custom thank you page on a per-form basis by adding a hidden input “thanks_url” to the form itself:
<input type="hidden" name="thanks_url" value="https://myschool.edu/thanks" />
To set a global thank you page for all public submission forms, open the public LiveWhale config (/livewhale/client/public.config.php) using an FTP client or via the command line. To specify the URL you should be taken to after filling out a public submission form, enter it like this:
If none is supplied, the default is /_ingredients/templates/details/submit_thanks.php.
You may have custom fields on your events, news, or images, and you can also receive values for those custom fields using your public submission forms.
In LiveWhale 1.7+, you can add inputs to your form with
name="custom_my_variable_name" and LiveWhale will automatically set the custom field “my_variable_name” with that value for any inputs prefixed with
In LiveWhale 1.6.2 and before, receiving and setting custom fields is done using the onAfterPublicSubmission handler in a custom module.