View previous topic :: View next topic |
Author |
Message |
DonnaNJ Window Shopper

Joined: 20 Jun 2006 Posts: 24
|
Posted: Fri Jul 14, 2006 10:14 pm Post subject: adding extra info to calendar display ... |
|
|
I am working on the week only calendar.
I have a form that gets filled out and the info put into a MySQL db ... it includes a name and a date and a DONE stamp.
I've added a query to the week.php file to query the DB to pull back any data from this other table that falls in the week. Ok so far - echo statements varify that I'm picking up the info.
But I can't seem to get it to print in the box for the day ... (Actually I want it to show all week - until DONE is set to yes by the other form - so no figuring going on).
I'm not seeing where I can make it print ?
Can anyone explain this easily on the BB ?
Thanks
Donna
DBK Web Development.com _________________ Donna
DBK Web Development |
|
Back to top |
|
 |
Dan Admin / Developer

Joined: 19 Feb 2001 Posts: 2057
|
Posted: Sat Jul 15, 2006 12:45 am Post subject: |
|
|
You'll need to add it into the $calendar_main values that are assembled in the middle of week.php. Where exactly you place it depends on where you want it to show up, but right after $cell_content is assembled would be my guess.
Alternatively, you could put the data into a variable, then dump it into the ut_set_var() section at the bottom of week.php, and finally pull it into the week.tpl template as a separate item from the main body layout.
Cheers,
Dan |
|
Back to top |
|
 |
DonnaNJ Window Shopper

Joined: 20 Jun 2006 Posts: 24
|
Posted: Sat Jul 15, 2006 9:11 pm Post subject: |
|
|
[quote="Dan"]You'll need to add it into the $calendar_main values that are assembled in the middle of week.php. Where exactly you place it depends on where you want it to show up, but right after $cell_content is assembled would be my guess.
>>
This worked !
Believe it or not - I managed to add another row <tr><td> ... to $calendar_main ... and passed a hyperlink to the DB info ! Some days I amaze myself. But this code has been nice to customize.
Now - how can I make "all catagories" the default catagory ?
thanks
Donna _________________ Donna
DBK Web Development |
|
Back to top |
|
 |
Dan Admin / Developer

Joined: 19 Feb 2001 Posts: 2057
|
Posted: Sat Jul 15, 2006 9:29 pm Post subject: |
|
|
Glad you're enjoying playing under the hood.
Set the Default Category option in the 'set variables' section to --- (no selection) and it should show all by default.
Cheers,
Dan |
|
Back to top |
|
 |
DonnaNJ Window Shopper

Joined: 20 Jun 2006 Posts: 24
|
Posted: Tue Jul 18, 2006 7:33 pm Post subject: |
|
|
Dan wrote: | Glad you're enjoying playing under the hood.
Set the Default Category option in the 'set variables' section to --- (no selection) and it should show all by default.
Cheers,
Dan |
Ok - I added stuff to content - but it's showing up under every date - I only want it as long as one of the variable are no ...
so I need to sort out this multi=dimension array:
// build a multi-dimensional array for each day, the first part being
// the day number and the second being the contents for that day, i.e.:
//
// $day_array = array (
// "1" => array ("ID|Subject|Last_One|Recurring", "ID2|Subject2|Last_One2"),
// "2" => array ("ID|Subject|Last_One"),
// ....
// "31" => array ("ID|Subject|Last_One")
// );
// $day_array[$t_day][] = $myrow["ID"] ."|". $myrow["Subject"] ."|". $myrow["Last_One"];
I a name from a db - based on the reservation date.
I want to save the name I pulled from the db on the date specified ... until the checkout date.
I can pull all the info - and I saved it to content but then it prints everyday - so I need to sort it out so it only prints on the appropriate date s...
but this mutlidimnensional array is throughing me a bit.
thanks
donna _________________ Donna
DBK Web Development |
|
Back to top |
|
 |
Dan Admin / Developer

Joined: 19 Feb 2001 Posts: 2057
|
Posted: Wed Jul 19, 2006 12:44 pm Post subject: |
|
|
Ok, I think I see what you're trying to do.
You'll need to add a custom field or two to the database (and config array), if you haven't already, to signify your yes/no condition.
Next, tack that condition onto the end of $day_array, i.e.:
$day_array[$t_day][] = $myrow["ID"] ."|". $myrow["Subject"] ."|". $myrow["Last_One"] ."|". $myrow["flag"];
and grab that as element #3 (numbered from zero) for each day when the array is split() for daily assembly. You'll then have your flag handy for deciding whether or not to show the info for that day.
Cheers,
Dan |
|
Back to top |
|
 |
|