stephenharris / Event-Organiser

WordPress plug-in, Event Organiser, development repository
http://wordpress.org/extend/plugins/event-organiser/
GNU General Public License v3.0
100 stars 76 forks source link

Printable Calendar #11

Open stephenh1988 opened 11 years ago

stephenh1988 commented 11 years ago

Would be great to have a 'print' button for the fullCalendar. This would trigger a window to open with a printable version of the calendar (for the current view).

It seems the author of fullCalendar has looked at this before (http://code.google.com/p/fullcalendar/issues/detail?id=35) but the ticket went cold.

I keep a fork of his plug-in (with a branch specifically containing adjustments made for Event Organiser at https://github.com/stephenh1988/fullcalendar ).

I'll start a ticket there, and hopefully it can be achieved for 1.7.

Suggestions and/or code and/or +1s welcome! But I'd like to keep this ticket on EO integration with this potential new feature - so for things regarding this functionality that is only related to fullCalendar please use this ticket: https://github.com/stephenh1988/fullcalendar/issues/1

bhwebworks commented 11 years ago

+1

stephenh1988 commented 11 years ago

@bhwebworks or anyone else interested in this feature - could you try making the changes included in the above referenced commit.

You could try just using the dev-1.7 branch - but its not particularly stable at this point.

The changes are fairly minor, just added some css.

The above commit (I hope) represents an improvement on what currently exists, but I had hoped to be able to add a button to allow the calendar to be printed on its own - this turned out to be trickier than anticipated. The above commits simply adds appropriate styling for when the user prints the entire page.

Thoughts suggestions, welcome :)

bhwebworks commented 11 years ago

That looks better, at least in Chrome. Firefox seems to butcher it either way.

Plus all the header, navigation, and footer stuff is still printing out.

I'm using Genesis so I tried adding

.page-id-31 #header, .page-id-31 #footer, .page-id-31 #footer-widgets {display: none !important;}

and that cleaned it up nicely, almost putting the entire calendar on one page. What about adding a body class for the full calendar page that would let us zero in on that easier without using the page-id? I realize the #header and #footer IDs are going to depend on individual themes, but it would make it easier to work with, at least for now.

An integrated print button would be sweet...

bhwebworks commented 11 years ago

I just noticed that in Firefox Print Preview the event titles and times appear or not depending on the Scale and whether it's Portrait or Landscape, which probably has more to do with Firefox than EO, I'm guessing.

bhwebworks commented 11 years ago

Disregard what I said earlier about the body class for the full calendar. I realize now that the print CSS removing the header and footer needs to apply to the entire site, not just the calendar page.

bhwebworks commented 11 years ago

So after adding a @media print query from HTML5 Boilerplate and some specific styling for my theme, the month print preview looks pretty good in Firefox and IE. In Chrome month print preview Saturday runs off the page - not sure why it's doing that.

I would suggest removing the bottom border from each event. It looks much cleaner without all the extra lines, and I don't think the end users need to know that each event is a link when it's printed out on paper.

I printed out a month in both Chrome and Firefox, and neither one printed out the table lines (borders), even though they showed in the print previews. Not sure why that's happening, but in my opinion it would be better if they were there.

stephenh1988 commented 11 years ago

Sorry for the delay in getting back to you. Thanks for the feedback!

What about adding a body class for the full calendar page that would let us zero in on that easier without using the page-id?

The trouble is the calendar is just a shortcode and may not even be used on a 'page' at all (ala do_shortcode()). There's pretty much no way of telling if the shortcode is being displayed on a given page when at the head. That said, the css added for the fullcalendar should only be loaded when the calendar is - so I could try to hide the header/footers without specifying the page-id. But this seems intrusive.

I would suggest removing the bottom border from each event.

Will do!

Neither one printed out the table lines (borders), even though they showed in the print previews

Admittedly I had just been using the print preview, will check this out.

An integrated print button would be sweet...

Yup, unfortunately its very difficult to print just a section of HTML - currently an integrated print button would be just a shortcut for File > Print. (Maybe using frames could work...?). I'll focus on the styling for 1.7, but I'll keep trying for an integrated print button.

stephenh1988 commented 11 years ago

@bhwebworks implemented your suggestion - I've re-added a coloured border since events may span more than one day. I've not tested the table outlines when printing yet though.

stephenharris commented 11 years ago

I'm content with changes as is currently - but would be happy to revisit this.

I will leave this ticket open, because a dedicated 'print calendar' button (which prints just the calendar) is still a hope - though will probably require someone with greater js skills than I have. As such changing the milestone to 'Future Release'

winterstreet commented 10 years ago

Hello, Just curious if there has been any change on this, or if this might be included in (near) future release. Thanks

stephenharris commented 9 years ago

Afraid not, still an open-ended ticket.

d0m-live commented 9 years ago

I am looking for a Wordpress calendar plugin that can import from Google calendar and is able to print a month view. Has this feature been implemented? If not what would need to happen to get it going?

d0m-live commented 9 years ago

I followed the link https://code.google.com/p/fullcalendar/issues/detail?id=35 and found that he resolved the issue. I then followed his link to the release and found his calendar prints great. http://fullcalendar.io/js/fullcalendar-2.3.2/demos/agenda-views.html

The one thing I didn't like is multiple event in a day don't show.

I looked for a Wordpress plugin of FullCalendar and found one so I installed it. http://demo.wp-events-plugin.com/calendar/

The problem is it only shows today's events.

Your calendar works better in the way it displays, but this calendar prints what you see (until I put it in wordpress, weird. Maybe this plugin is off an old version)

Looking at is some more the them effects both plugin calendars. Maybe the print view just needs a specific font, size with specific css to format it and it would be OK.

stephenharris commented 9 years ago

Hi @dzmartin The plugin provides minimal print styling. This ticket remains open for a dedicated print button to print the calendar only.

Unfortunately a solution for this (that doesn't rely on hacky methods involving pop-ups) doesn't seem to exist.

Open to suggestions though :)