Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Printable Calendar template  (Read 3412 times)
0 Members and 1 Guest are viewing this topic.
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 25, 2003, 12:50:00 AM »

I have written a template for presenting a printable calendar. The print.html template presents the viewer with a barebones calendar. There are no command options, no footer, and no links.

If you want to see what it looks like visit:

[dead link removed]

You can download the template and a read me of directions at:
http://www.rdtk.net/files/print_html.zip

I hope some of you can get some use from this.


------------------
Dale Ray

[This message has been edited by eladyar (edited August 20, 2004).]

Logged

JackVinson
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #1 on: March 26, 2003, 11:50:00 PM »

This works great for a normal calendar.  However, with a one-year or 90-day view (fullyear calendar template), the print.html template only displays the month range at the top of the calendar and forgets to display the calendar.

Any thoughts?

Jack

------------------

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 27, 2003, 12:57:00 AM »

The template I made is based on the dayspan template. Basically I stripped out the unwanted parts and figured out how to add the link to the default template.

If you are using the full year templates you would have to modify that template. No calendar is displayed because there are no routines to display the 90 day or full year calendar in the template I modified.

------------------
Dale Ray


[This message has been edited by eladyar (edited August 20, 2004).]

Logged

JackVinson
New Member
*

Karma: 0
Offline Offline

Posts: 0


« Reply #3 on: April 21, 2003, 11:31:00 PM »

Just wanted to follow-up on this one.  Since both your print.html template and the fullyear template are based on the same backbone it was quite easy to modify print.html to accomodate fullyear.  In fact, the only changes are in places that test the value of $VIEW. I just needed to add the clauses related to a value of "Ninety-Day" and everything else works like a charm.

Thanks for the code!

Jack

------------------

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: May 05, 2003, 01:04:00 AM »

I have updated the zip file, adding Jack's mod. The zip now includes a template for a printable calendar based on TubaDave's DaySpan template and another based on TubaDave's Fullyear with DaySpan template. There is also a readme included explaining how to use them.

You download the file at:
http://www.rdtk.net/files/print_html.zip

My thanks to everyone who contributes to this forum, especially TubaDave and Dan O.

Thanks also to Matt for the great script at a reasonable price!

------------------
Dale Ray


[This message has been edited by eladyar (edited August 20, 2004).]

Logged

paulmarx
New Member
*

Karma: 0
Offline Offline

Posts: 0

Electronics Technician


WWW
« Reply #5 on: October 27, 2003, 09:45:00 AM »

This is a great template and much needed, but when I follow all the instructions I get, at the top of the print-formatted calendar, the following lines:

[Include file (/var/www/cgi-bin/calendarscript/templates/calendars/default/styles.pl) could not be found]  [Include file (/var/www/cgi-bin/calendarscript/templates/calendars/default/styles_scripts.html) could not be found]

Well, sure enough, those files don't exist in my
CalendarScript 3.2 default template directory.  Should these includes be changed to point to something else, like maybe "preferences.pl" or such?

------------------

Logged
paulmarx
New Member
*

Karma: 0
Offline Offline

Posts: 0

Electronics Technician


WWW
« Reply #6 on: October 27, 2003, 10:02:00 AM »

.
Well, maybe these aren't the right files, but at a wild guess I substituted "preferences.pl" for "styles.pl" in the print.html file, and likewise "styles.css" for the "styles_scripts.html" reference, and it worked.  Maybe those aren't the right substitutions but it seems to make all the colors and such look OK.

My final "tweak" is wanting to figure out how to make the event listings on the "printable" calendar show only the start times, to tighten up the total calendar size and improve legibility.

I gotta say, having plunged time and even some dollars into this project (because Faith really, really needed to have and use this kind of software to co-ordinate things), I finally broke down and ordered "Learning Perl" and am plunging into that whole realm.

« Last Edit: November 06, 2008, 02:07:32 PM by DanO » Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #7 on: October 27, 2003, 08:26:00 PM »

.
** I substituted "preferences.pl" for "styles.pl" in the print.html file, and likewise "styles.css" for the "styles_scripts.html" reference, **

Sounds about right for using those pre-version 3.1 templates in CalendarScript 3.2+.

** wanting to figure out how to make the event listings on the "printable" calendar show only the start times **

Remove or comment out the code that prints them from the template. Try searching the template for "SCHEDULE FIELD(end_time)" or just "end_time" (without the quotes), likely to be in multiple places in it.

Dan O.
« Last Edit: November 06, 2008, 02:13:47 PM by DanO » Logged
paulmarx
New Member
*

Karma: 0
Offline Offline

Posts: 0

Electronics Technician


WWW
« Reply #8 on: November 07, 2003, 10:50:00 AM »

That seems to clinch it.  I deleted any line in print.html that had end_time in it, and it really does make for a more legible printed calendar in my opinion, and more likely to fit on one page.

I also had a very minor bug in that the name of the month, or week, etc. at the top of the printable calendar always had a "-"  (a dash) in front of it.  With patient wandering through the mountain of cat-on-the-keyboard tracks that is Perl scripting I actually found a dash in the middle of a line that seemed to have something to do with the title, and erasing that dash fixed it.  

Experiments with browsers showed me that getting a clean
calendar printout suitable for copying/reproduction in print
is aided by:

- printing in landscape mode ...on average appears to make
 most efficient use of the space
- tweaking your browser page settings for skinniest margins
 possible
- tweaking page settings to eliminate page numbers, URL listing, other similar extra web page printout stuff.

Of course if you have a zillion events it can still run
to several pages but if you're on the edge, these things
help get it all squeezed in.

All the fiddling was worth it because now our secretary can avoid having to manually draw/type up a calendar for our publications.

------------------

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #9 on: November 07, 2003, 02:16:00 PM »

Paul,

Glad the template helped.

The - (dash) in the Calendar title is meant to be between the calendar header (as defined in the calendarscript settings on the template settings page) for the calendar and the date range printed. If you don't have the calendar header defined the dash would look out of place. (edit: I just looked at the code and the dash should not print unless the header is defined, I don't know what was happening on your site)

EDIT: I have added your printing suggestions to the readme and also a version of the print.html template that does not print the events end times. The URL in the first message points to the updated file.

------------------
Dale Ray http://www.sscsoftball.org

[This message has been edited by eladyar (edited November 07, 2003).]

Logged

k9barry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #10 on: December 16, 2003, 12:23:00 PM »

Hope you do not mind but I had to modify the print.html file so it would print out the calendar name under the month, year heading.  If anyone is interested here is the changes I made to two lines below:

<% if ($VIEW eq "Month") { %><%= $MONTH_NAME %>, <%= $YEAR %><% } %>
   <% if ($VIEW ne "Month") { %><%= $RANGE_START %> to <%= $RANGE_END %><% } %>

to this:

<% if ($VIEW eq "Month") { %><%= $MONTH_NAME %>, <%= $YEAR %><br><font size="4"><%=$_PAGE_TITLE%><% } %></font>
   <% if ($VIEW ne "Month") { %><%= $RANGE_START %> to <%= $RANGE_END %><br><font size="4"><%=$_PAGE_TITLE%><% } %></font>

I added the following:

<br><font size="4"><%=$_PAGE_TITLE%> and </font> to each line.

The code is found in the print.html file around here:
##############not the complete code################

<!--#include file="styles_scripts.html"-->

</HEAD>
<BODY BGCOLOR="<%=$_BGCOLOR%>" LINK="<%=$_LINK%>" ALINK="<%=$_ALINK%>" VLINK="<%=$_VLINK%>" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" WIDTH="100%" HEIGHT="100%">
   <TR><TD COLSPAN="2" align="center" height="5%"><h1>
   <% if ($_HEADER) { %><%= $_HEADER %> - <% }%>
   <% if ($VIEW eq "Month") { %><%= $MONTH_NAME %>, <%= $YEAR %><br><font size="4"><%=$_PAGE_TITLE%><% } %></font>
   <% if ($VIEW ne "Month") { %><%= $RANGE_START %> to <%= $RANGE_END %><br><font size="4"><%=$_PAGE_TITLE%><% } %></font>
   </h1></TD></TR>
<TR>
   <TD VALIGN="top" ALIGN="left" WIDTH="100%">
      <!-- =============================== -->
      <!-- THIS IS THE ACTUAL DISPLAY AREA -->
      <!-- =============================== -->

Hope this helps anyone who needs the same features.  Thanks to the authors of the code for their work.

------------------

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #11 on: December 16, 2003, 01:01:00 PM »

 
quote:
Hope you do not mind but I had to modify the print.html file so it would print out the calendar name under the month, year heading

Thanks for contributing your modification to the rest of the CalendarScript users.

------------------
Dale Ray
http://www.sscsoftball.org

Logged

master_shinobi
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #12 on: March 23, 2005, 04:55:00 PM »

This works very well, Thanks for the great idea.

So how can I make it show printable view as weekly rather than monyhly.

thanks john

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #13 on: March 23, 2005, 09:20:00 PM »

** how can I make it show printable view as weekly rather than monthly **

The print template probably has a line something like this:

$VIEW = $in{view};

Changing it to:

$VIEW = "Week";

will force it to only print in that time frame. Of course, if you were on the week view (or any other time frame) of the calendar it would probably print out that same view anyway?

Dan O.

« Last Edit: November 06, 2008, 02:18:22 PM by DanO » Logged
master_shinobi
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #14 on: March 24, 2005, 03:26:00 AM »

Thank you that was just right

It was at the top of the page "nice and easy"

John

Logged
Pages: [1]   Go Up
Print
Jump to: