Kalendarz

Języki, których efekty są wykonywane po stronie serwera. PHP, ASP czy CGI w połączeniu z bazami danych SQL dają niezwykłe możliwości budowy i zarządzania stron WWW. Tu zadajemy pytania oraz demonstrujemy kod, z którym mamy problem.
Prochol
Nowy
Nowy
Posty: 45
Rejestracja: czw wrz 06, 2007 2:12 pm
Kontakt:

Kalendarz

Post autor: Prochol »

Niech mi ktoś opisze co mam zrobić krok po kroku
Instalowałem kalendarz na stronie ale nie działa poprawnie.
podaję tekst który tłumaczy instalację
Easily Simple Calendar
Copyright 2001-2004 NashTech
Version: 4.7

INSTRUCTIONS:

::. Installation

To install the script, simply upload all of the files in the distributed zip file to a single folder on your server where you will be using the script.

To test the installation, type in the web address for the test file in a web browser (Example: "http://www.yourdomain.com/demo.php"). If the calendar appears like the one on our web site, everything was uploaded correctly!

>> IMPORTANT <<

> In order for the calendar to display correctly, make sure that your DOCTYPE is set correctly (the first line in your PHP or HTML files).

> There must be link to the CSS file in the header (before the <BODY> tag) of your pages that use the ESCalendar script.

> Not following these guidelines will result in the calendar displaying incorrectly in some browsers.

-- SEE THE FILE demo.php FOR AN EXAMPLE OF A CORRECTLY FORMATTED FILE --

::. Calendar Setup

There are many documented features in the escalConfig.php file that can be modified. Please read each setting and make changes as required for your installation.

!! Remember to always set the Calendar Width equal to a multiple of 7. (Examples, 98, 105, 119, 238, etc...)

::. How to include the calendar on web pages

*Please see the section titled ">>Important<<" above. Your pages must be correctly formatted and include the proper code before the calendar will display as intended.

Once you have the necessary code in place on the web page, all you need to do to display the calendar is to use the PHP require command by placing the code below where you want the calendar to appear.

<?php require ("escal.php"); ?>

::. mySQL Setup

To use the ESCalendar Script with mySQL, first you need to set up a database. These instructions assume you already have a general understanding of setting up a database connection. If you need help with this, there are numerous tutorials online and your web hosting provider could be of assistance.

1) Open the escalConfig.php file and edit the parameters for your specific database connection and set "$readSQL=1;".

2) Save and upload the file to the server with the other ESCalendar script files.

3) Execute the file escalInstall.php by typing in the address in a web browser. This should set up the database connection and install the database. If there are errors, please check the settings in the escalConfig.php file and try again.

4) Move the escalAE.php file to another folder and/or rename it for security reasons. This file will let you add/edit/delete events from the SQL database. If you don't move and/or rename this file, others may be able to access your administration interface and change events on your calendar. If you move it to another folder, edit the escalAE.php file to point to the escalConfig.php file (line 13).

5) You have the option to set the path and file name to the file that will display the calendar. You set this variable under the Administration Setup in the escalConfig.php file. This will add a link to the administrative interface that will allow you to quickly view the changes on the actual events calendar.

::. Flat File Setup

For servers without mySQL installed, you can still enter events into a flat file database by using the esdates.txt file.

1) Set "$readFile=1;" in the escalConfig.php file.

2) Open the esdates.txt file.

3) Add, edit and delete files as necessary.

4) Save the file and upload it to your sever in the same folder as the escal.php script.

The format of the data for the esdates.txt file is:

startdate,enddate,description

NOTE: Enter the dates using the format mm-dd-yyyy or yyyy-mm-dd. You can not use the dd-mm-yyyy format with the flat file database.

Also, do not use carriage returns (Enter key) or commas in your description. This will cause unexpected results.

::. Customize Calendar

To customize the calendar including colors, fonts, graphics, etc., edit the calStyleDefault.CSS file. Additional themes are available under the Themes topic at our forum, http://www.esscripts.com/forum/index.php?act=SF&f=45.

You can also adjust the table width, cell spacing, cell padding, the look of pop-up windows and more in the escalConfig.php file.

::. Command-line variables

* NOTE: The event start ($es) and event end ($ee) command-line variables will not work when utilizing a mySQL or flat-file database.

There are two ways to use command-line variables:

The first way is used when loading the ESCalendar script directly in a web browser or via the PHP include function. After the full URL put a ? (question mark) before the first variable and put an & (ampersand) between each of the other variables you want to set. Do not use any spaces.

NOTE: You must call the full script URL address when sending command line variables via an include or require PHP function.

The second way, if using the ESCalendar script as a function, is to send each variable or set them as global within the function.

See http://www.php.net for help with functions and the include command.

mo
MONTH TO DISPLAY
mo=mm
Default: Current month if not specified

yr
YEAR TO DISPLAY
yr=yyyy
Default: Current year if not specified

es
START DATE OF DATE MARKING
es=yyyy-mm-dd
Default: None

ee
END DATE OF DATE MARKING
ee=yyyy-mm-dd
Default: None

To send multiple start and end dates, separate each date by an "x".
An example would be "?es=2004-10-05x2004-11-1&ee=2004-10-12x2004-11-8"
This marks Oct. 5, 2004 to Oct. 12, 2004 and Nov. 1, 2004 to Nov. 8, 2004.

The date can be sent in most any format as long as the month appears before the day. For example, to mark December 19, 2004 you can use "2004-12-19", "12-19-2004","Dec 19, 2004","December 19 2004", and more. If you want to mark a date regardless of the year, just omit the year like "12-19", or "Dec 19".

Examples:

http://www.yourdomain.com/demo.php?mo=1 ... 2004-12-20
or include ("http://www.yourdomain.com/demo.php?mo=1 ... 2004-12-20");
Either of these will result in a calendar for December of 2004 with the dates 12-18 through 12-20 being marked.
Coś robię źle
ODPOWIEDZ