icu222much Posted August 21, 2008 Share Posted August 21, 2008 I have a php Jax Calendar running on my website http://www.rysa.bc.ca/testingA/testingF/content/calendarAndEvents/upcomingEvents/upcomingEvents.php is not working properly. It seems that it is not reading the location of the CSS and Image folders correctly. The calendar is supposed to look like http://rysa.bc.ca/testingA/testingC/upcommingEvents.php. I tried changing the coding for the location of my CSS and Image files on Line 10. Originally, I had a relative address which was ../../../core/css/default.css but I changed it to an absolute address which is /testingA/testingF/core/css/default.css. I double-checked this address and it is correct. Am I missing something else here, or am I editing the wrong file (I am a PHP noob). <?php //global settings for Jax Calendar v1.34 // Global variables (have to be fitted) : // Title and Data Source $calendars[0]->title = "Community Calendar"; $calendars[0]->data_source = "csvfile"; // CSS template for the Calendar $calendars[0]->css = "/testingA/testingF/core/css/default.css"; $calendars[0]->calendar_file = "mycalendar"; $calendars[0]->event_file = "myevents"; $calendars[0]->db_server = ""; $calendars[0]->db_login = ""; $calendars[0]->db_database = ""; $calendars[0]->db_database = "jax_calendar"; $calendars[0]->db_password = ""; $calendars[0]->status_image_dir = "/testingA/testingF/core/images/status_pics"; // Title and Data Source $calendars[1]->title = "Jax Calendar 2nd"; $calendars[1]->data_source = "csvfile"; // CSS template for the Calendar $calendars[1]->css = "../../../core/css/default.css"; $calendars[1]->calendar_file = "mycalendar2"; $calendars[1]->event_file = "myevents2"; $calendars[1]->db_server = ""; $calendars[1]->db_login = ""; $calendars[1]->db_database = ""; $calendars[1]->db_database = "jax_calendar"; $calendars[1]->db_password = ""; $calendars[1]->status_image_dir = "../../../core/images/status_pics"; // if no calendar id is given in URI, take default (0) if ( empty( $_GET["cal_id"] ) ) { $cal_id = 0; } else { $cal_id = $_GET["cal_id"]; } $title = $calendars[$cal_id]->title; $data_source = $calendars[$cal_id]->data_source; $calendar_file = $calendars[$cal_id]->calendar_file; $event_file = $calendars[$cal_id]->event_file; $db_server = $calendars[$cal_id]->db_server; $db_login = $calendars[$cal_id]->db_login; $db_database = $calendars[$cal_id]->db_database; $db_password = $calendars[$cal_id]->db_password; $css_file = $calendars[$cal_id]->css; $status_img_dir = $calendars[$cal_id]->status_image_dir; // Language localization $default_language = strtolower( "english" ); // choose browser language for default $language_auto_select = true; // language localization if ( empty( $_GET[ "language" ] ) && $language_auto_select ) { echo "\n".'<script language="JavaScript" type="Text/JavaScript" src="'."{$base_url ["jax_cal"]}/modules/lang_auto_select.js".'"></script>'."\n"; $language = $default_language; } else $language = strtolower( $_GET[ "language" ] ); // CALENDAR CONTROL (USERS) // show today_button in calendar $cal_today_selector = true; // emphasize days with events! $cal_show_reserved = true; // use js for month/year quick selection (in calendar control) $use_quick_selectors = true; $calendar_open_url = "/testingA/testingF/content/calendarAndEvents/upcomingEvents/upcomingEvents.php"; $calendar_open_target = ""; // EVENT LIST $view_cal_select = true; $view_default = "m12"; // d1 , d30 , m12 // CALENDAR ADMIN // num of lines each page in calendar admin frontend $admin_page_break = 12; ?> Quote Link to comment https://forums.phpfreaks.com/topic/120741-php-calendar-help/ Share on other sites More sharing options...
BlueSkyIS Posted August 21, 2008 Share Posted August 21, 2008 it's likely that you're still using a relative path. you might try appending $_SERVER['DOCUMENT_ROOT'] on the front: $calendar_open_url = $_SERVER['DOCUMENT_ROOT']."/testingA/testingF/content/calendarAndEvents/upcomingEvents/upcomingEvents.php"; Quote Link to comment https://forums.phpfreaks.com/topic/120741-php-calendar-help/#findComment-622253 Share on other sites More sharing options...
icu222much Posted August 21, 2008 Author Share Posted August 21, 2008 it's likely that you're still using a relative path. you might try appending $_SERVER['DOCUMENT_ROOT'] on the front: $calendar_open_url = $_SERVER['DOCUMENT_ROOT']."/testingA/testingF/content/calendarAndEvents/upcomingEvents/upcomingEvents.php"; I changed $calendars[0]->css = "/testingA/testingF/core/css/default.css"; to $calendars[0]->css = $_SERVER['DOCUMENT_ROOT']"/testingA/testingF/core/css/default.css"; but it had no effect. I also tried changing $calendar_open_url="/testingA/testingF/content/calendarAndEvents/upcomingEvents/upcomingEvents.php"; to $calendar_open_url= $_SERVER['DOCUMENT_ROOT']."/testingA/testingF/content/calendarAndEvents/upcomingEvents/upcomingEvents.php"; but then it linked to the wrong page. Quote Link to comment https://forums.phpfreaks.com/topic/120741-php-calendar-help/#findComment-622266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.