| View previous topic :: View next topic |
| Author |
Message |
damonp
Joined: 07 Aug 2007 Posts: 12
|
Posted: Tue Aug 07, 2007 6:04 pm Post subject: problems with imbedded cal |
|
|
www.ypsielbow.com
on Sat night it skips a week then on sunday its fine... please help me resolve...
here is the code:
body {font-family: arial; font-size:9pt; color: CCCCCC }
a:text {
font-family: Arial;
font-size: 9px;
color: #333333;
text-decoration: none;
}
/***********
* GENERAL *
***********/
#cal a:visited { text-decoration: none; }
#cal a:link { text-decoration: none; }
#cal a:hover { text-decoration: underline; }
#cal div.month_mini table { border-collapse: collapse; }
#cal .spacer_tiny { height: 1px; padding: 0px; }
#cal .spacer_small { height: 2px; width: 2px; padding: 0px; }
#cal .spacer { height: 20px; width: 20px; padding: 0px; }
#cal img, #cal .heading { vertical-align: middle; }
#cal table { color: #000000; }
/**********
* HEADER *
**********/
#cal .heading { background: #E58200; }
#cal .heading { color: #fff; }
#cal .heading { font-size: 12px; }
#cal .heading { font-weight: bold; }
/******************
* WEEKDAY HEADER *
******************/
#cal .row_header { background: #000; }
#cal .row_header { color: #fff; }
#cal .row_header { font-size: 9px; }
/********************************
* DAYS
*
* .cal_content = days in month
* .cal_disabled = days not in month
* .cal_selected = highlighted days
*
*******************************/
#cal .cal_content { background: #FFFFFF; }
#cal .cal_content { color: #000; }
#cal .cal_disabled { background: #5C3317; }
#cal .cal_disabled { color: #5C3317; }
#cal .cal_selected { background: #c0c0c0; }
#cal .cal_selected { color: #000; }
/**********************************
*
* EVENTS
*
* .cal_event = normal events
* .cal_event_imp = flagged events
* font.*, a.* = event title
*
*********************************/
#cal font.cal_event, #cal a.cal_event:link, #cal a.cal_event:visited, #cal a:link, #cal a:visited { color: #5C3317; }
#events table tr td a:link, #events table tr td a:visited { color: #555555; } |
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Wed Aug 08, 2007 1:18 pm Post subject: |
|
|
Hi,
Sorry for the delay. I don't see it skipping up a week on Saturday. Which date are you seeing this on? |
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
Posted: Wed Aug 08, 2007 1:32 pm Post subject: |
|
|
| every week... |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Wed Aug 08, 2007 1:37 pm Post subject: |
|
|
| I see it going from Friday 8/11 to Sat 8/12 to Sun 8/13. Could you please tell me what you mean by it skips a week? |
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
Posted: Wed Aug 08, 2007 1:39 pm Post subject: |
|
|
| right, it does now, but on saturday only it will skip a week... so on Aug 11 it will show the week of the 19th... |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Wed Aug 08, 2007 11:53 pm Post subject: |
|
|
| I see what you're saying. Would you mind if the list started on the current day rather than the first day of the current week? |
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
Posted: Wed Aug 08, 2007 11:56 pm Post subject: |
|
|
| that would actually be preferred.... |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
Posted: Thu Aug 09, 2007 12:39 am Post subject: |
|
|
Use this for your loop:
| Code: |
$time = _ex_localtime();
$ev_start = _ex_date("Y-n-j", $time);
$ev_end = _ex_date("Y-n-j", $time + ( 86400 * 56));
$events = $cal->get_event_list($ev_end, $ev_start);
for($i = 0; $i < count($events); $i++)
{
$day = $time + (86400 * $i);
// if we don't have any events today move on
if(!count($events[$i])) {
continue;
}
.. etc.. stuff you already have ..
|
You'll need to remove the extra } that used to close the foreach($weeks..) loop. Also, where you print the date, change it to:
| Code: |
| echo($cal->format_date("l n/j/Y",$day)); |
That should do it. |
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
Posted: Thu Aug 09, 2007 3:21 pm Post subject: |
|
|
| Im sorry, in the intrest of not screwing it up, would you mind attaching the edited file? |
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5275
|
|
| Back to top |
|
 |
damonp
Joined: 07 Aug 2007 Posts: 12
|
|
| Back to top |
|
 |
|