Recent Topics

Print Page Plugin. Does it take a genius to design one?

Started by on May 14, 2008 – Contents updated: May 14, 2008

May 14, 2008 00:01    

I've seen the Print Page and PDF page plus the not so useful Larger or Smaller text options in soooo many pages that I can't believe b2evolution hasn't it (them).
In an era of Global Warming, Food Crisis, Nuclear Threats, Communism comebacks, we don't want to be waisting resources, do we? We don't want to be waisting Ink, printing all those beautiful images our blogs tend to have, do we?
What we want is to be able to print the message, just the message, and the pictures with the message, but not its surroundings.
Each time we waste printer Ink, a portion of the Rain Forest is depleted to get the chemicals needed to make an ounce of red or blue ink.
We're destroying the world my friends!
Ok, so what if a great part of what I wrote above is not true!

Why hasn't anybody come up with a plugin for printing pages?

To those that wish to bash me for not designing it myself... I'm far from a genius and don't have the coding expertise needed. And PLEASE don't tell me some Themes have CSS ways to print pages. No, I want any theme to be able to.

Help save the whales! Create a Print Pages Plugin!

May 14, 2008 01:52

gcasanova wrote:

... Why hasn't anybody come up with a plugin for printing pages?

... And PLEASE don't tell me some Themes have CSS ways to print pages. No, I want any theme to be able to.

Too bad: it's because of the style sheet differences.

Back in the 1.* days I uploaded about 50 skins. They ALL had a print.css style sheet used for printing. They ALL worked for the skin they were part of because each style sheet is different.

Do you have a Header or a MainHeader? Is it an ID or a CLASS? That's the type of stuff that matters. So like if your sidebar is [[<div id="bSidebar">]] and you don't want the sidebar when you print then your style sheet for print media has to say

Code

#bSidebar {
display: none;
}

Of course, that won't do you any good if your sidebar is a class. For that your print.css sheet would need to say

.bSideBar {
display: none;
}

Therefore it MUST be skin-specific, OR, all skins absolutely must use the exact same ID selections and names as every other skin. Or b2evolution has to say "no listing skins that don't have a print.css file included.

May 14, 2008 02:16

EdB,

But couldn't there be like a Java Script for this? Or an Ajax? I've found a Page to PDF plugin in the other script, you know, the one that claims that is second to God...
Also this people have a send to friend Ajax script...

I know there are ways to print only text through some available option in your browser, but I also know of too many people that still claim that their screensavers are virii...
So why don't make things easier, if we can of course?

May 14, 2008 21:13

The thing is you CAN'T unless you know exactly what everyone's divs are. When a browser sends a page to a printer it sends exactly what it has UNLESS it has special instructions to do something unique for printing.

Has nothing to do with web to PDF - nothing at all.

So what EXACTLY will everyone call all their sidebars? Will everyone use id=sidebar or class=Sidebar or id=SideBar or class=bSidebar? How about footer and header? By the way, evopress uses <div id="sidebar"> and custom uses <div class="bSideBar"> for an example of what a plugin would be up against.

It would be easy to make a plugin that would cover the half dozen skins that exist, but I can assure you that of the next half dozen the plugin won't work for at least one of them. So what happens when the skins repository has 60 skins again? Therefore it comes back to what I already said: it should be part of the skin. In fact the default skins should have a print.css in them that works for that exact skin and the head section of the document needs to call that style sheet for the appropriate media type (print of course). THEN b2evolution could say "no skins accepted without a print.css included", then all skins would offer reasonably nice printing capability.


Form is loading...

Build your own website! – This forum is powered by b2evolution CMS, a complete engine for your website.