IconCMO API — Events Setup
The events example shows a PHP-based calendar that displays the "Events" section of IconCMO on your website in list, day, and monthly formats.
You'll need to set up a web services account for the calendar, giving it read-only access to the "Events" information from IconCMO.
- Go to the "Web Service Security" menu, which is found under Web-Services→WS Setup.
- In the upper right, add a user name and password and click "Save". Keep track of them; you'll need to enter them again while configuring the web server.
- Find the user name you just added in the list to the right and click on it. In the bottom left, you'll see that their name appears in the "Modify Security For" menu.
- In the "List of Functions" menu directly about the "Modify Security For" menu, choose "Web: Events".
- Check the "Read" check box and click "Set Security."
Continue by installing the necessary files onto your web server.
Web Server Set-up
You will need a web server with PHP version 5 or later installed. Additionally, the CURL extension needs to be installed. Most web hosting services will be able to provide these—check with your hosting provider if you aren't sure. All web servers are configured differently, so the installation instructions may need slight adaptation if your server is configured uniquely.
Installation of Files
- Download the event demo directory and unzip them in the directory that you want your calendar to appear on your web server.
- Take the
event.htmltemplate from the
eventsdirectory (that you just unzipped) and move it up one directory.
eventsdirectory should be next to each other.
- Next, you need to change the log-in information. Open the
event.phpfile in the
eventsdirectory. Modify the
<Password>sections of the XML at the very top to match the user name set up in IconCMO.
event.htmlfile as you see fit to match the rest of your site.
Maintenance of Events
Ongoing maintenance of events now can be done under the "Event" menu item in IconCMO. (It is found under the Web-Services→Market menu.) Each time an event is added, deleted, or changed on this screen, your web site will immediately reflect the changes.
Congratulations—you've completed your first IconCMO integration!
Common Installation Issues
No calendar appears on Windows web servers
Windows servers often have a difficult time connecting to IconCMO over a secure connection. This can be determined by going to http://your-path-here/events/event.php?month=2&year=2011 in your web browser and examining the result. If it is not XML data, and includes one of the following error messages, you are affected by this problem.
- SSL certificate problem, verify that the CA cert is OK.
- Error setting certificate verify locations.
To resolve this problem, you can edit the
event.php file slightly. Find the line that contains
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
and insert the following 2 lines after it:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
At a slight decrease in security, this will allow the calendar to function as expected.
If you have any questions about this, please don't hesitate to contact our support.