| View previous topic :: View next topic |
| Author |
Message |
peiqinglong
Joined: 12 Dec 2007 Posts: 18
|
Posted: Thu Jul 17, 2008 6:29 pm Post subject: Title on print out |
|
|
| Is there a way to put the title on the print out page so that when a person prints out a calendar, they know what calendar it is? Thanks! |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5160
|
Posted: Mon Jul 21, 2008 4:00 pm Post subject: |
|
|
Hi,
I'm sorry, but there is no option for this as we're trying to conserve space on the printable view. If you'd like, we can move this over to the hacking thyme forum and you may add the PHP code into the printable view to do this. |
|
| Back to top |
|
 |
peiqinglong
Joined: 12 Dec 2007 Posts: 18
|
Posted: Mon Jul 21, 2008 5:10 pm Post subject: |
|
|
Ian,
That would be great! Thanks! |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5160
|
Posted: Wed Jul 23, 2008 6:28 pm Post subject: |
|
|
Hi,
Around line 103, just after the line containing <?php add:
| Code: |
echo("<h3>{$_cur_cal->title}</h3>");
|
The surrounding h3 can be what ever you want. H2, add your own style etc..
Let me know if you have any questions / trouble. |
|
| Back to top |
|
 |
peiqinglong
Joined: 12 Dec 2007 Posts: 18
|
Posted: Wed Jul 23, 2008 6:55 pm Post subject: |
|
|
| esoft_ian wrote: |
Hi,
Around line 103, just after the line containing <?php add:
| Code: |
echo("<h3>{$_cur_cal->title}</h3>");
|
The surrounding h3 can be what ever you want. H2, add your own style etc..
Let me know if you have any questions / trouble. |
Ian, awesome! One question, is there a way to output the category also? For example if I'm viewing Calendar: Staff and I'm on category Investigators, is there a way for that to display like Staff - Investigators? Thanks! |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 2:18 am Post subject: Were you able to do this? |
|
|
I have been trying to add the selected category to the print view to no avail.
Any luck? |
|
| Back to top |
|
 |
peiqinglong
Joined: 12 Dec 2007 Posts: 18
|
Posted: Fri Aug 08, 2008 3:34 am Post subject: Re: Were you able to do this? |
|
|
| stevebab wrote: |
I have been trying to add the selected category to the print view to no avail.
Any luck? |
Yea, easy, add this: {$_cur_cal->get_category_name($GLOBALS['cal']->event_types)} |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 4:25 am Post subject: strange, but not working |
|
|
Thanks for the fast help!
Interesting -- that's what I had in my code and it doesn't return a value.
It doesn't error either-- which is good, but I can't figure out what I'm missing. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5160
|
Posted: Fri Aug 08, 2008 4:50 am Post subject: |
|
|
Hi Steve,
Replace $GLOBALS['cal']->event_types with $cal->event_types in that line. |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 5:08 am Post subject: Hmm |
|
|
Hi Ian,
Great to hear from you! Your posts are really a sight for sore eyes!
Thanks for that, but I still get the same result -- no value returned, but no error.
Here's what I've got:
| Code: |
| echo("Client: ".$_cur_cal->get_category_name($cal->event_types)); |
See anything weird. |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 5:49 am Post subject: No progress yet |
|
|
I'm also trying it this way without success:
| Code: |
| echo("Client: {$_cur_cal->get_category_name($cal->event_types)}"); |
|
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5160
|
Posted: Fri Aug 08, 2008 6:13 am Post subject: |
|
|
Hi Steve,
Are you placing that line somewhere below this line:
$cal->event_types = ($_GET['evnt_type'] ? $_GET['evnt_type'] : $_SESSION['evnt_type']);
? |
|
| Back to top |
|
 |
stevebab
Joined: 07 Apr 2008 Posts: 14
|
Posted: Fri Aug 08, 2008 3:26 pm Post subject: yep |
|
|
| Yeah, it is below that. Actually, I have it as a footer. |
|
| Back to top |
|
 |
esoft_ian
Joined: 12 Sep 2005 Posts: 5160
|
Posted: Fri Aug 08, 2008 3:27 pm Post subject: |
|
|
| Can you e-mail me your print.php please? ian@extros.. |
|
| Back to top |
|
 |
|