Calendar is not shown properly

Help with installation and general calendar setttings

Calendar is not shown properly

Postby Tina » Tue Feb 22, 2011 9:26 pm

When I am in admin mode and press buttom "show calendar" and open http://www.apartrooms.com/calendar/
The calendar is not appearing right, this is what I see:
....
Demo Item es en
Demo Item
Key
•Available
•Booked
•Provisional
•Change Over Day
•Special Offer
Availability Calendar
Last updated:
.........

I'm a beginner on this but I do have some understanding about html, php and MySql
I haven't made any changes yet, only followed the installation procedure, and probably made some misstake. I hope you can help me.
Thanks for your help, Tina
Tina
 
Posts: 4
Joined: Tue Feb 22, 2011 9:04 pm

Re: Calendar is not shown properly

Postby chris » Tue Feb 22, 2011 9:36 pm

Hi,
Your path is set wrong.
This can be modified from the "config" section within the admin panel.
By the looks of things it should simply be set to "/calendar"

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Calendar is not shown properly

Postby Tina » Tue Feb 22, 2011 10:10 pm

Hi chris!
Thanks for a quick reply! Unfortunately, I don't understand, because the path is already set to /calendar (as you can see here:http://www.apartrooms.com/calendar/ac-admin/?page=config I haven't changed the password yet)

So, what else can it depend on?

Thanks again, Tina
Tina
 
Posts: 4
Joined: Tue Feb 22, 2011 9:04 pm

Re: Calendar is not shown properly

Postby chris » Tue Feb 22, 2011 10:34 pm

Hmmm, this is very strange.
As you say, the path is set correctly in admin.
And indeed in the admin panel it shows the calendar correctly.
However, on checking the source code for the first url that you posted, it clearly has this:

Code: Select all
<link rel="stylesheet" href="2011-01-31%20-%20v3.03.03//calendar/ac-contents/themes/default/css/avail-calendar.css">

So, I wonder where it is getting this part from?:
Code: Select all
2011-01-31%20-%20v3.03.03/

Have you modified the calendar/index.php file in any way?

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Calendar is not shown properly

Postby Tina » Tue Feb 22, 2011 11:07 pm

Hello again!
What a mistery! This is the code:
...
Code: Select all
<?php
//   include the calendar file
$the_file="ac-includes/cal.inc.php";
if(!file_exists($the_file)) die("<b>".$the_file."</b> not found");
else      require_once($the_file);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>cbolson.com - <?php echo AC_TITLE; ?></title>
      <link rel="stylesheet" href="2011-01-31%20-%20v3.03.03/<?php echo AC_DIR_CSS; ?>avail-calendar.css">
      <script type="text/javascript">      
      //   define vars
      var url_ajax_cal       = '<?php echo AC_DIR_AJAX; ?>calendar.ajax.php'; // ajax file for loading calendar via ajax
      var img_loading_day      = '<?php echo AC_DIR_IMAGES; ?>ajax-loader-day.gif'; // animated gif for loading   
      var img_loading_month   = '<?php echo AC_DIR_IMAGES; ?>ajax-loader-month.gif'; // animated gif for loading   
      //   don't change these values
      var id_item          = '<?php echo ID_ITEM; ?>'; // id of item to be modified (via ajax)
      var lang             = '<?php echo LANG; ?>'; // language
      var months_to_show      = <?php echo AC_NUM_MONTHS; ?>; // number of months to show
      var clickable_past      = '<?php echo AC_ACTIVE_PAST_DATES; ?>'; // previous dates
      </script>
      <script type="text/javascript" src="2011-01-31%20-%20v3.03.03/<?php echo AC_DIR_JS; ?>mootools-1.2.4-core-yc.js"></script>
      <script type="text/javascript" src="2011-01-31%20-%20v3.03.03/<?php echo AC_DIR_JS; ?>mootools-cal-public.js"></script>
   </head>
   <body>
   <?php
   echo '
   <div id="cal_wrapper">
      <div id="cal_controls">
         <div id="cal_prev" title="'.$lang["prev_X_months"].'"><img src="'.AC_DIR_IMAGES.'icon_prev.gif" class="cal_button"></div>
         <div id="cal_next" title="'.$lang["next_X_months"].'"><img src="'.AC_DIR_IMAGES.'icon_next.gif" class="cal_button"></div>
         
         <!-- optional calendar change options -->
         <div id="cal_admin">
            <form method="get">
            <select name="id_item" class="select" onchange="this.form.submit();">
               '.sel_list_items($_REQUEST["id_item"]).'
            </select>
            <select name="lang" class="select" onchange="this.form.submit();">
                  '.$list_languages_web.'
               </select>
            </form>
         </div>
         <!-- end options -->
         <div class="clear"></div>
      </div>
      <h2>'.itemTitle(ID_ITEM).'</h2>
      <div id="the_months">
         '.$calendar_months.'
      </div>
      <div id="key_wrapper">
         '.$calendar_states.'
         <div id="footer_data" style="clear:both;">
            '.$lang["last_update"].': '.get_cal_update_date(ID_ITEM).'
         </div>
      </div>
      <div class="clear"></div>
   </div>
   ';
   ?>
   </body>
</html>

....
and this is the css file:
Code: Select all
/* CHANGE THIS PATH ACCORDING TO YOUR THEME !!!!! */

/* define background image for special states - I use one single image that holds all the colors */
.cal_month ul li.booked_am,
.cal_month ul li.booked_pm,
.cal_month ul li.booked_pr_am,
.cal_month ul li.booked_pr_pm   {   background-image:url('http://www.apartrooms.com/calendar/ac-contents/themes/default/images/bg_days.png');}   

#cal_wrapper{
   font: 11px/1.6 Arial, sans-serif;
   color: #444;
   width:670px;
   margin:20px auto;
   }
#the_months{
   float:left;
   width:534px;
   }
.clear{   clear:both;}
#ajax_message{
   text-align:center;
   border-top:1px solid #CCC;
   border-bottom:1px solid #CCC;
   background: #FFFFEE;
   float:left;
   margin-left:10px;
   width:260px;
   }
/* month loading animation - push to center*/
.img_loading_month{
   margin:50px;
   }
/*
calendar key
***************************/

#key_wrapper{
   float:right;
   text-align:center;
   }
#key{
   width:122px;
   background: #EEE;
   color:#111;
   }
#key .cal_title{
   color:#FFF;
   }
#key ul{
   text-align:left;
   }
#key ul li{
   float:none;
   }
#key ul li span{
   margin-left:22px;
   width:90px;
   text-align:left;
   display:block;
   }
#key #footer_data{
   font-size:0.7em;
   clear:both;
   }


/*
calendar controls (back and next)
***************************/
#cal_controls{
   margin-bottom:10px;
   }
#cal_controls #cal_prev{
   float:left;
   }
#cal_controls #cal_next{   
   float:left;
   margin-left:2px;
   }
#cal_controls #cal_admin{
   float:left;
   margin-left:10px;
   }

/*
calendar month styles
***************************/
.cal_month{
   /* month div*/
   width:170px;
   border:1px solid #006699;
   background:#FFFFEE;
   line-height:20px;
   -moz-border-radius: 6px;
   -webkit-border-radius: 6px;
   padding-bottom:6px;
   float:left;
   margin-right:6px;
   margin-bottom:6px;
   min-height:194px;
   color:#666;
   }
#key .cal_title,
.cal_month .cal_title{
   border-bottom: 1px solid #CCC;
   background:#006699;
   padding:2px;
   text-align:center;
   color:#FFF;
   }   
.cal_month ul{
   clear:both;
   list-style:none;
   margin:0px;
   padding:4px;
   margin:auto;
   width:168px;
   color:#FFF;
   }
.cal_month ul li{
   float:left;
   width:20px;
   height:20px;
   border:1px solid #CCC;
   margin-right:1px;
   margin-bottom:1px;
   text-align:center;
   background-color:#DDD;
   color:#000;
   font-size:90%;
   -moz-border-radius: 3px;
   -webkit-border-radius: 3px;
   }

/* day titles (m,t,w etc. */
.cal_month ul.cal_weekday li{   
   color:#FFF;
   background-color:#006699;
   border:1px solid #006699;
   }
/* no month date */
.cal_month ul li.cal_empty{      
   background-color:#EEE;
   border:1px solid #EEE;
   color:#CCC;
   }

.cal_month ul li.booked         {   background-color: #FF0000;   }      /* complete day booked */
.cal_month ul li.booked_pr      {   background-color: #ff9700;   }      /* complete day provisionally booked */





/*
calendar date styles
class name must be the same as defined in admin panel
***************************/

.cal_month ul li.offer         {   background-color:lime;      }
.cal_month ul li.changeover      {   background-color:pink;      }




   
/* position background image for each state - adjust to your image */
.cal_month ul li.booked_am      {   background-position: 200px top;   }
.cal_month ul li.booked_pm      {   background-position: 230px top;   }
.cal_month ul li.booked_pr_am   {   background-position: 140px top;   }
.cal_month ul li.booked_pr_pm   {   background-position: 170px top;   }

.cal_month ul li.weekend      {   /*border:1px solid #3399CC;*//*altered via mootools*/}
.cal_month ul li.today         {   border:1px dotted #006699;   }   /* current date - MUST be defined last otherwise other classes might overwrite it*/
/*.cal_month ul li:hover{   background:#006699; color:#FFF;}*/


.tips{
   background: #000;
   padding:6px;
   -moz-border-radius: 3px;
   -webkit-border-radius: 3px;
   color:#FFF;
   border:2px solid #666;
}
.cal_month ul li.weeknum_spacer{
   width:4px;
   background-color:#FFFFEE;
   border:none;
   }
.cal_month ul li.weeknum{
   width:4px;
   background-color:green;
   }

....
Well i suppose you understand better if there're some errors. I'll keep looking into it.

Until next!
Thanks!
Tina
Tina
 
Posts: 4
Joined: Tue Feb 22, 2011 9:04 pm

Re: Calendar is not shown properly

Postby chris » Tue Feb 22, 2011 11:32 pm

Well, you can see it in there,
Somehow the "2011-01-31%20-%20v3.03.03/" has been added to the urls for the css and js files.
Just remove them and everything should be fine.

The question is, how did they get there?

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Calendar is not shown properly

Postby Tina » Wed Feb 23, 2011 11:38 am

Hello Chris! You're an angel!

It will remain a mistery, as I didn't change anything myself, and the date was set to January and I dowloaded it in February! :?

Well, so far so good, it seems to work well! When I have everything up and running I'll send you the link (I'll make it inbedded, or what it calls) and a big reward, of course!

Thanks again!
Tina
Tina
 
Posts: 4
Joined: Tue Feb 22, 2011 9:04 pm

Re: Calendar is not shown properly

Postby chris » Wed Feb 23, 2011 11:43 am

I'm glad that you sorted it.
It is very strange. That date was the date that the zip file was created (and it's original name) but I renamed the ZIP file before uploading it to my ftp.
I wonder if somehow this got added when you unzipped it or even when you uploaded it to your server.
What ftp client do you use (just out of interest)?

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Calendar is not shown properly

Postby joed89 » Tue May 17, 2011 10:05 am

I love the style of the calender. I got my own little business site running and I'm using ix for web hosting.. Can I use this calender too or do I need something special on the server that my package doesn't include?
joed89
 
Posts: 5
Joined: Wed May 11, 2011 1:02 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 5 guests

cron