// readme_calendar.txt /* My Calendar - version 2.2 - issued 2005-01-16 */ /* copyright © 2004 Andy Bowers , although some of the code for the calendar display was a snippet from www.evilwalrus.com that needed to be heavily edited to make it valid HTML of any sort, and then that code was enormously improved [imo] ... so who knows about copyright? AND the log-in protection for the administration module was provided entirely by Brad Carter from www.php-scripter.com [thanks very much, Brad!!] */ // ========================================================================= This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // ========================================================================= Calendar script from php_noob ============================= This set of scripts and supporting files are intended to be used to add a simple events calendar to any page(s) on your site - assuming you have a web host that supports php and MySQL. The script assumes that you have ALREADY CREATED a database containing a table named calendar with the same field names as defined in the included sql file [calendar.sql]. This can be used to create the correct table structure using phpAdmin's SQL import function. Edit the cal_db_conn.php file included in this zipped set of files, so that it includes YOUR values for database name, database username, and database password. Edit the cal_parms.php file to adjust various script values for calendar colours, text styles, whether the page with event details opens in a new window or just on a new page, and edit the language parameter to the language of your choice from the five files provided - dutch, english, french, german, spanish - these 'language files' are simple enough that you can easily create another for your language preference. Then upload all files (except the readme and sql folder contents) to your server into a folder named /calendar/ as a sub-folder to the folder containing the pages from which you want to call the calendar. Do NOT change any of the file names. To use the script, add the following code where you want the calendar to appear: On your site ============ There really isn't any need for 'how to' instructions with this. If a day has a link, click it. Change in Version 2 of the script: the month name is clickable to show all events in a month. Administration ============== This package contains a small database editor that can be used directly from your browser to add/edit/delete events in your calendar. The administration program is password protected. In the zip download, the password is pre-set to llama. Edit the file named configpass.php in the /calendar/admin folder to change the password to protect YOUR site's calendar information. Access the editor at http://www/yourdomain.tld/.../calendar/admin/log-on.php - with appropriate changes to that address to reflect your site's URL and the true location of the admin folder. CAUTION: the database editor accepts ANYTHING you enter. While this is 'nice' for including HTML for images or clickable web or e-mail addresses, it exposes YOUR database to the potential for inputting any sort of bizarre tag, javascript, php script, even even MySQL commands. DO NOT allow anyone other than yourself or highly trusted others to have access to YOUR database! database fields explanation =========================== ev_dat is the yyyy-mm-dd date of the event ev_title is event 'name' ev_locn is where the event will occur ev_desc is the 'long' description of the event (shown on the 'more' page) Do-it-yourself ============== As included in the zip package, the script will run without any modification. You may feel the need to make changes, and hopefully the comments in the various files that make up this package will make that a relatively painless process. The files that you will 'most likely' want to modify is the page where event details are shown to your visitors. The files named show.php and show-month.php are the files to modify. Edit the styles at the top of that file, and if you want a differently sized table, edit the HTML table tag. To change the size and/or attributes of the pop-up window in which the events information is shown (assuming you have set the option for event info to open in a new window), you need to edit the file named win_open.php. Make it better ============== If you have any suggestions for improvements (or corrections) to this script package, contact me andy@halfadot.com and explain. If this script strikes you as the greatest thing since sliced bread, or otherwise makes you really happy then do something nice for someone else or make a time donation to a local charity.