Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Can someone dumb this down for me!?
Old 04-07-2005, 05:13 PM Can someone dumb this down for me!?
Filmgirl's Avatar
Super Talker

Posts: 102
Location: Orlando Florida
Trades: 0
Installation:
Quote:
1. View the calendar.sql file and choose proper query to execute.

calendar.sql file:
Quote:
/*
Use this for new installation
*/
CREATE TABLE calendar (
id bigint(14) unsigned NOT NULL auto_increment,
year smallint(4) unsigned NOT NULL default '0',
month tinyint(2) unsigned NOT NULL default '0',
day tinyint(2) unsigned NOT NULL default '0',
weekday tinyint(1) unsigned NOT NULL default '0',
hour tinyint(2) unsigned NOT NULL default '0',
minute tinyint(2) unsigned NOT NULL default '0',
end_date bigint(14) unsigned NOT NULL default '0',
duration smallint(2) unsigned NOT NULL default '0',
event_type tinyint(1) unsigned NOT NULL default '0',
header varchar(100) NOT NULL default '',
body text NOT NULL,
PRIMARY KEY (id),
KEY id (id)
) TYPE=MyISAM;


/*
Use this for update
*/
ALTER TABLE calendar ADD duration SMALLINT( 2 ) UNSIGNED NOT NULL AFTER end_date ;

Quote:
2. Configure the config.inc.php file
What do they mean configure the config.inc.pho file?

What the heck does that mean?
Filmgirl is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-07-2005, 05:16 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
What is in the config.inc.php file? I'm guessing that you need to copy one of the queries into the right place within config.inc.php, and then run that script to install. Question is, where is the right place? If we can have a look at config.inc.php then we might be a ble to help with that.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-07-2005, 05:24 PM
Filmgirl's Avatar
Super Talker

Posts: 102
Location: Orlando Florida
Trades: 0
Quote:
Originally Posted by 0beron
What is in the config.inc.php file? I'm guessing that you need to copy one of the queries into the right place within config.inc.php, and then run that script to install. Question is, where is the right place? If we can have a look at config.inc.php then we might be a ble to help with that.
Wow that was a quick reply, thanks!


config.inc.php file:

PHP Code:
<?php
/*
 * I choose to use a php file to hold all configuration instead of a database
 * since it was faster to make and faster to use.
 * Also, I wanted this to be useable without the need of a database, of course
 * you cannot add events then, but it's a great calendar :)
 */

$cal->DB_TABLE_NAME 'calendar'// Name of the database table
$cal->OPTIONS_ADMIN true// simply remove this line for your public calendar
$cal->PATH_PAGE_DELETE 'calendar.delete.php'// POST file
$cal->PATH_PAGE_STOP 'calendar.stop.php'// POST file
$cal->PATH_PAGE_UPDATE 'calendar.update.php'// POST file
$cal->PATH_PAGE_ADD 'calendar.add.php'// POST file
$cal->PATH_PAGE_CALENDAR 'calendar.example.php'// Display the calendar
$cal->PATH_PAGE_EVENT 'calendar.event.php';  // the form
$cal->PATH_PAGE_SHOW_EVENTS 'calendar.showevents.php';  // the form

// Do NOT add more values into this array, since it's not supported in the
// programming. It's only used to hold the strings for easy translation.
$cal->arrEventTypes[0] = 'One Time Eevent';
$cal->arrEventTypes[1] = 'Annual Event';
$cal->arrEventTypes[2] = 'Monthly Event';
$cal->arrEventTypes[3] = 'Weekly Event';
$cal->arrEventTypes[4] = 'Daily Event';

$cal->FORM_METHOD 'GET'// For the next and prev buttons
$cal->FORM_NEXT_BUTTON 'next &gt;&gt;';
$cal->FORM_PREV_BUTTON '&lt;&lt; prev';

$cal->MONTHNAMES 1;  // 0 = short, 1 = long
$cal->WEEKDAYNAMES 1// 0 = short, 1 = long
$cal->DISPLAY_WEEKDAY_NAMES_ON_COLUMN false;
$cal->DATEBOX_TEXTALIGN 'left'// left, right, center
$cal->CALENDAR_TYPE 'vertical'// mini,large,vertical
$cal->EVENT_TARGET ''// Target window of the events. Leave blank when EVENT_POPUP=true 
$cal->EVENT_POPUP true// popup window or not

$cal->TABLE_SIZE['vertical'] = '500';
$cal->TABLE_SIZE['mini'] = '200';

$cal->WEEK['mini'] = 'w';
$cal->WEEK['vertical'] = 'w.';

$cal->CSS['mini'] = 'css/mini.css';
$cal->CSS['vertical'] = 'css/vertical.css';
$cal->CSS_COMMON 'css/common.css';

//Strings
$cal->arrStrings[0] = 'h';  // short for hours

// Arrays for holding the names of each month
$cal->arrMonth[0][1] = 'Jan';
$cal->arrMonth[0][2] = 'Feb';
$cal->arrMonth[0][3] = 'Mar';
$cal->arrMonth[0][4] = 'Apr';
$cal->arrMonth[0][5] = 'May';
$cal->arrMonth[0][6] = 'Jun';
$cal->arrMonth[0][7] = 'Jul';
$cal->arrMonth[0][8] = 'Aug';
$cal->arrMonth[0][9] = 'Sep';
$cal->arrMonth[0][10] = 'Oct';
$cal->arrMonth[0][11] = 'Nov';
$cal->arrMonth[0][12] = 'Dec';

$cal->arrMonth[1][1] = 'January';
$cal->arrMonth[1][2] = 'February';
$cal->arrMonth[1][3] = 'March';
$cal->arrMonth[1][4] = 'April';
$cal->arrMonth[1][5] = 'May';
$cal->arrMonth[1][6] = 'June';
$cal->arrMonth[1][7] = 'July';
$cal->arrMonth[1][8] = 'August';
$cal->arrMonth[1][9] = 'September';
$cal->arrMonth[1][10] = 'October';
$cal->arrMonth[1][11] = 'November';
$cal->arrMonth[1][12] = 'December';

// Days marked in the calendar as holidays
// Add dates like 'MM/DD'
$cal->arrRedDates[0] = '12/24';
$cal->arrRedDates[1] = '1/1';
$cal->arrRedDates[2] = '12/13';
$cal->arrRedDates[3] = '2/13';

// Weekdays that are marked as holidays
$cal->arrRedDays[0] = true;  // Sunday
$cal->arrRedDays[1] = false// Monday
$cal->arrRedDays[2] = false// Tuesday
$cal->arrRedDays[3] = false// Wednesday
$cal->arrRedDays[4] = false// Thursday
$cal->arrRedDays[5] = false// Friday
$cal->arrRedDays[6] = true// Saturday

// Arrays for holding the names of each weekday
$cal->arrDay[0][0]="Su";
$cal->arrDay[0][1]="Mo";
$cal->arrDay[0][2]="Tu";
$cal->arrDay[0][3]="We";
$cal->arrDay[0][4]="Th";
$cal->arrDay[0][5]="Fr";
$cal->arrDay[0][6]="Sa";

$cal->arrDay[1][0]="Sunday";
$cal->arrDay[1][1]="Monday";
$cal->arrDay[1][2]="Tuesday";
$cal->arrDay[1][3]="Wednesday";
$cal->arrDay[1][4]="Thursday";
$cal->arrDay[1][5]="Friday";
$cal->arrDay[1][6]="Saturday";
?>

Last edited by 0beron; 04-07-2005 at 06:39 PM..
Filmgirl is offline
Reply With Quote
View Public Profile
 
Old 04-07-2005, 06:43 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
OK, now I'm not so sure. I think the first instruction means you have to run that query either at the mySQL command line or using phpMyAdmin in order to setup the database, and the second instruction is separate to that and wants you to change the settings in config.inc.php to suit your needs, like deleting that admin line that is marked, and adding holiday dates etc.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-07-2005, 09:33 PM
Filmgirl's Avatar
Super Talker

Posts: 102
Location: Orlando Florida
Trades: 0
Filmgirl is offline
Reply With Quote
View Public Profile
 
Old 04-08-2005, 06:21 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Do you still need help with it?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-08-2005, 11:17 AM
Filmgirl's Avatar
Super Talker

Posts: 102
Location: Orlando Florida
Trades: 0
yes
Filmgirl is offline
Reply With Quote
View Public Profile
 
Old 04-08-2005, 12:16 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Does your webserver have phpMyAdmin installed?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-08-2005, 02:40 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
Have you tried running the script before posting this problem?

It seems that you have to copy one of the statements in the .sql file (both statement are seperated by the php comments), which i assume you are not updating, but installing the script from scratch, thus you need this statement:
PHP Code:
CREATE TABLE calendar (
id bigint(14unsigned NOT NULL auto_increment,
year smallint(4unsigned NOT NULL default '0',
month tinyint(2unsigned NOT NULL default '0',
day tinyint(2unsigned NOT NULL default '0',
weekday tinyint(1unsigned NOT NULL default '0',
hour tinyint(2unsigned NOT NULL default '0',
minute tinyint(2unsigned NOT NULL default '0',
end_date bigint(14unsigned NOT NULL default '0',
duration smallint(2unsigned NOT NULL default '0',
event_type tinyint(1unsigned NOT NULL default '0',
header varchar(100NOT NULL default '',
body text NOT NULL,
PRIMARY KEY (id),
KEY id (id)
TYPE=MyISAM
You need to put this into a mySQL database, for which you need access to phpMyAdmin, do you know if you can do this? If so, consult the Help section there about inserting SQL statements, via a Query.

when they ask you to set up the config.inc.php they mean simply to go through it and change anything that would otherwise halt the operation of the script.

For example, if the file 'calendar.delete.php' was actually somewhere other than in the SAME directory as the config.inc.php then this need to be specified in the line
PHP Code:
$cal->PATH_PAGE_DELETE 'calendar.delete.php'// POST file 
Further down the script you can also alter the display of the month names, and stuff.

Hopefully, this might have cleared somethings up for you.
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Can someone dumb this down for me!?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.62770 seconds with 12 queries