WordPress.org

Ready to get started?Download WordPress

Forums

Ajax Event Calendar
[resolved] Print Calendar (20 posts)

  1. saucysandy
    Member
    Posted 2 years ago #

    I've tried installing "print page" plugins but only the text is print or the whole page is (maybe I'm not using the right plugin). Could a "print calendar" function be implemented to appear below the calendar? I'm using it for a school Canteen Roster and school events calendar (just love the use of showing one category) so printing for parents would be a fantastic option for me.

  2. Eran Miller
    Member
    Plugin Author

    Posted 2 years ago #

    Add the functionality you desire above or below the shortcode, depending on where you want to display the information, for example:

    [calendar]
    <a href="window.print()">Print Page</a>

    Eran

  3. David Tierney
    Member
    Posted 2 years ago #

    For someone who is not a programmer, is there something simple like above that one could add to print a page? I tried what you put above wondering if that was an actual solution or just a placeholder for an idea, and it did not work.

    Thanks,

  4. Eran Miller
    Member
    Plugin Author

    Posted 2 years ago #

    I intended to post this:

    [calendar]
    <a href="javascript:window.print();">Print Page</a>

    Dave: This is the solution I am recommending. If you need a non-programmer solution, I would recommend looking for plugins specific to this functionality request.

    Eran

  5. David Tierney
    Member
    Posted 2 years ago #

    Hey that is fantastic! I never knew how easy it was to trigger printing in a link. Thanks.

    And I am sorry I seem to have triggered your defensive side. My question was a reasonable one and resulted in a very helpful answer for me and likely others who will find this post as I did and the original person posted.

    Again, nice plugin and thanks. Also, thanks for responding.

  6. Eran Miller
    Member
    Plugin Author

    Posted 2 years ago #

    Not defensive, I was answering the question: " I tried what you put above wondering if that was an actual solution or just a placeholder for an idea, and it did not work."

    My reply was merely stating that the code I posted was not a placeholder, but the solution I proposing, and that I wasn't going to be building further printing functionality into the calendar.

    I'm glad I could be of help.
    Eran

  7. saucysandy
    Member
    Posted 2 years ago #

    Thank you, Eran. This does work for me, however, it prints out the widgets on each side of my page. Would there be a solution to 'just' the calendar being printed without the sidebars? Here's my page http://www.mozinc.net/wordpress/calendar

    I really appreciate your assistance with this.

  8. Eran Miller
    Member
    Plugin Author

    Posted 2 years ago #

    You need to add print specific rules (that hide certain page elements) to your theme stylesheet. If you run searches in your favorite search engine on "Print Style Sheets", you'll find some good resources that can help.

    Eran

  9. saucysandy
    Member
    Posted 2 years ago #

    Thank you Eran, I will do some googling, thank you for directing me.

  10. David Tierney
    Member
    Posted 2 years ago #

    You would create a new stylesheet and add the following CSS rule to it:

    art-sidebar1, art-sidebar2 {display:none;}

    You can add the stylesheet via a plugin like Bunny's Print CSS plugin. Then add that rule to it. That should do it.

  11. saucysandy
    Member
    Posted 2 years ago #

    Thanks David, I must have my blonde hat on today. I have installed Bunny's plugin and see the CSS page, put the art-sidebar1, art-sidebar2 {display:none;} but no luck. Your instructions are clear but I'm just not getting it right.

  12. Eran Miller
    Member
    Plugin Author

    Posted 2 years ago #

    Saucy, make sure you include the period before each of those class names.
    .art-sidebar1, .art-sidebar2{display:none}

  13. David Tierney
    Member
    Posted 2 years ago #

    good call. My mistake. Let me know if that does not work.

  14. saucysandy
    Member
    Posted 2 years ago #

    I've been trying for hours, I hate being stupid but I just can't make it work. I've written sites in old style HTML in notebook using old school tables etc but CSS just confuses me. I've stuck the code in every place possible in the Bunny CSS plugin with no luck and then Eran's PHP file, with no luck. I'm sure it's me, not your code.

  15. David Tierney
    Member
    Posted 2 years ago #

    I just looked at your site, and see that you do have it in there a few times and it is correct and when I print your page it does print without the sidebars. Is that not what is happening for you?

    If you want to remove the navigation links at top of printed page, you can also add the following to your print style sheet:

    div.art-nav-center {display:none;}

  16. saucysandy
    Member
    Posted 2 years ago #

    Oh David, thank you so much! I didn't realise because of the links appearing. In my defence, I just got rid of the footer by using

    div.art-center-wrapper {display:none;}

    I think I'm starting to understand!

    Thanks so much, you've made my day, it prints exactly the way I want it to.

  17. saucysandy
    Member
    Posted 2 years ago #

    Actually, just to be fussy, Friday seems to expand to fit the page, would know a fix for that?

  18. David Tierney
    Member
    Posted 2 years ago #

    That one is a bit more complicated. Looking at the code, each column is given a specific width, except the final one. so the final one fills the rest of the space because the table is set to 100%. Not sure how those widths are calculated and I could give you something that might cause an issue down the road if you change how your calendar displays, such as if you make it 7 days.

    You can try this

    .cf-last {width:105px;}

    but just remember that in case you make a future change and don't want it that way anymore.

  19. devrag
    Member
    Posted 2 years ago #

    I'm in desperate need of some help printing my Ajax Event Calendar. My client has a very full calendar. I have created print CSS to suppress all the areas on the page I don't want. All that is fine, but I can't get the calendar itself to behave.

    I've stripped out all the fancy CSS and javascript for navigation, and created a page with just the calendar and this print CSS on our test site: work.hollywoodballroom.com/calendar-with-print-css
    At the bottom of the page, I have a javascript print screen link.
    When using the javascript print function,depending on the browser, Saturday's information is either truncated, or all the days' events show, but they moved to the left and are not below their days. Then again, sometimes the events stack on each other and print is covered up.

    In Firefox, I've played with the File > Print function, by shrinking the calendar to 50%. Above 50%, nothing shows up in any of the event boxes. At 50%, the information shows, but is not properly positioned.
    In Chrome, printing the page (right click > print) produces some readable events, but lots of overwritten information, and not all the days are even displayed.

    In IE9 gives me lots of empty boxes, followed by lots of overwritten information.

    I would be grateful for any wisdom the forum has to offer.

  20. devra
    Member
    Posted 2 years ago #

    I didn't realize this was a resolved post. I will post a new issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic