My Subscriptions

No active or expired subscriptions. View Available Subscriptions

News Feed

Receive our Newsletter

Advanced Search

Pages: 1 [2]
Print
Author Topic: Printable Calendar  (Read 4314 times)
joefresco
Newbie
*

Karma: +0/-0
Posts: 3


View Profile
« Reply #15 on: March 10, 2008, 10:54:23 PM »

I'm willing to write a simple function for basic printing (send variables to index2.php and automatically start up the Print dialog), but I'm waiting to hear back from the jcalpro developer on how I should go about it, so I can be sure the code gets put in the trunk so everyone can use it.
Logged
ravyn
Newbie
*

Karma: +0/-0
Posts: 3


View Profile
« Reply #16 on: April 12, 2008, 07:51:47 AM »

Here's another vote for having a "Print" function.  Printing in all views: monthly, weekly, daily, etc. would be fantastic!! 

Keep up the good work.  This is a great calendar component.
Logged
jclint
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« Reply #17 on: April 23, 2008, 05:47:48 PM »

I would love to purchase jcal, but the lack of printing is a complete dealbreaker. Printing Please!
Logged
rlegris
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« Reply #18 on: July 01, 2008, 05:43:45 PM »

Does anyone know if this has been implemented yet?
I really need printing of monthly calendar, had no idea it wasn't available until after I installed!
Logged
joefresco
Newbie
*

Karma: +0/-0
Posts: 3


View Profile
« Reply #19 on: July 07, 2008, 12:25:24 PM »

I finally got around to doing this.  My method only requires editing theme.php so it doesn't actually touch the jcalpro code at all.

First, you'll need to create an icon_print.png file and put in your theme's images folder.  I didn't use the icon_print.gif already supplied with jcalpro because its dimensions are not 23x23 like the other main menu icons.

The following is added to $template_main_menu:
Code:
<!-- BEGIN print_view -->
<td><img src="{URL}images/spacer.gif" width="10" height="25" border="0" alt="" /></td>
<td class="buttontext" align="center" valign="middle" nowrap="nowrap">
<a href="{PRINT_TGT}" title="{PRINT_LNK}" class="buttontext" target="_blank" onclick="{PRINT_STATUS}">
<img src="{URL}themes/spartan/images/icon-print.png" border="0" alt="{PRINT_LNK}" /><br />
{PRINT_LNK}</a>
</td>
<!-- END print_view -->

Then this is added after </table> in $template_main_menu:
Code:
{PRINT_JSCRIPT}

Then in function theme_main_menu(), add the following lines below all the lines containing "if (!$CONFIG_EXT[])":
Code:
if (!strpos($_SERVER["REQUEST_URI"], "index.php")) {
$print_link = "#";
$status = 'javascript:window.print(); return false;';
$print_jscript = '
<script type="text/javascript">
window.onload = function() {
window.print();
}
</script>';
} else {
$print_link = str_replace("index.php", "index2.php", $_SERVER["REQUEST_URI"]);
$status = "window.open('".$print_link."','win2','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no'); return false;";
$print_jscript = "";
}

Then append the following lines to the end of $param in that same function (and be sure to add a comma at the end of the SEARCH_LNK line):
Code:
'{PRINT_LNK}'=> "Print",
'{PRINT_TGT}'=> $print_link,
'{PRINT_STATUS}'=> $status,
'{PRINT_JSCRIPT}'=> $print_jscript

Hope that helps.
Logged
MRJIT
Global Moderator
Sr. Member
*****

Karma: +17/-2
Posts: 282


View Profile
« Reply #20 on: July 07, 2008, 03:14:02 PM »

Thanks for sharing this.

I know i'll be checking this out as soon as i get the opportunity
Logged

Just a happy customer
 Please read this post before posting in the forum.
V-man
Administrator
Hero Member
*****

Karma: +15/-3
Posts: 2197


Ignorance is curable, stupid is forever.


View Profile
« Reply #21 on: July 07, 2008, 03:19:54 PM »

Looks great. Can you send a demo?
Logged

*** Please read this post and the FAQs before posting in the forum. ***
*** Documentation links: JCal Pro | Advanced Search ***

Support questions via PM or e-mail will be ignored.
MRJIT
Global Moderator
Sr. Member
*****

Karma: +17/-2
Posts: 282


View Profile
« Reply #22 on: July 07, 2008, 03:44:03 PM »

I just tried your code. (I couldn't wait) it works a dream. Thanks!!!
Logged

Just a happy customer
 Please read this post before posting in the forum.
Pages: 1 [2]
Print
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com

Original Joomla Template design by RocketTheme ( Conversion by Bloc)