-
-
Notifications
You must be signed in to change notification settings - Fork 67
Embedding Guide
This is one of the things that I get asked about the most, so as of 2.0 Beta1, it is a fairly simple task. A few things were moved around during the beta process. As of 2.0 Beta 5, simply create a PHP script something like:
2.0 beta13 or later: {{{
<title>Example Embedded Page</title> }}}You need to copy the "static" directory to where your script is, or modify the paths to refer to where you have the "static" directory. Before beta13, putting the static files somewhere else didn't work because some files were included from other parts of the calendar. You need to include embed_setup.php before any of your HTML because it sets up the cookies in the header, and if you have any output before that, the cookies cannot be properly set in the header and your users may not be able to log in. Include embed.php wherever you want the calendar to appear. "path/to/php-calendar" is either a relative path from your script that is embedding the calendar, or an absolute path. The path for style.css needs to be the path you would access the calendar from the web with. If your calendar directory is not accessible from the web, you need to copy style.css somewhere that is, and change the path appropriately.
If you have an unusual setup, you can modify the variables in embed_setup.php in order to accommodate for that.