Recent Topics

1 Feb 01, 2008 07:06    

My b2evolution Version: 2.x

I request a plugin which will print out just the post title, the author and the post content, without any of the extra elements of a blog post or the comments.

I often want to show my friends my blog posts, but I find the copying pasting of blog posts into word processors very tiresome, especially for multiple posts.

A plugin which will just display a post/article without any additional formatting or CSS will work wonders for printing.

2 Feb 01, 2008 07:47

Hi Hari,

It is possible to have alternate css file for printing. It is called through something like this:

<link href="printer.css" rel="stylesheet" type="text/css" media="print" />


There are other possibilities, like

@media print {
  * {
  background-color: white !important;
  background-image: none !important;
  }
}


in the original stylesheet.

In the print stylesheet you want to cut out as much as possible. This can be done by not including certain features like the background image and by deliberate hiding items, like

.header {
display: none;
}


or

.header {
visibility: hidden;
}

Do Google for more information on this topic.

Good luck

3 Feb 01, 2008 08:58

afwas, thanks for replying.

I was aware of the CSS approach. Just wanted to know whether something like this could be made into a plugin so that we can keep the original style files unaltered and use a separate printable version which is generated by PHP code.

In that case, it becomes easier just to output plain HTML without any style, but just the blog title and post content.

Also I feel this feature should be restricted by permissions and also the ability to generate/process multiple articles for a printer-friendly version outputting it as HTML or PDF (so that the blog can become like a book).

Once I learn the plugin system of b2evolution, I might do a plugin for this.

4 Apr 11, 2008 01:10

any updates on this Printer Friendly pages?

5 Apr 20, 2008 15:44

I am too VERY interested in a plugin for printing clean pages. Not a hack, but a plugin.
I believe this should be part of b2evolution.
There may be lots of work around solutions... like css, like copying all text, opening a word doc. pasting and printing, but that's not the idea. I believe there should be a print plugin as well as a PDF plugin.
Again. with PDF there are work arounds but, again, that's not the idea...

6 Apr 20, 2008 16:54

Some skins contains already alternate css file for printing.

7 Apr 20, 2008 16:59

Some do, but all should. That's my point.

8 Mar 20, 2009 05:34

I'm having an issue with printer friendly page.

i created a print.css. this works fine.
my css [url=http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.thechristianalert.org%2Findex.php%3Fblog%3D5&profile=css21&usermedium=all&warning=1&lang=en]validates fine[/url].

My problem is that - when I do print preview, I get a blank page. It is always the first page that is blank.

What do you guys think it's wrong? This is in IE and firefox.
check this sample link and do preview:
http://www.thechristianalert.org/index.php/2007/03/03/elijahprophethistory?blog=5

10 Mar 20, 2009 06:10

esanchez wrote:

I'm having an issue with printer friendly page.

i created a print.css. this works fine.
my css [url=http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.thechristianalert.org%2Findex.php%3Fblog%3D5&profile=css21&usermedium=all&warning=1&lang=en]validates fine[/url].

My problem is that - when I do print preview, I get a blank page. It is always the first page that is blank.

What do you guys think it's wrong? This is in IE and firefox.
check this sample link and do preview:
http://www.thechristianalert.org/index.php/2007/03/03/elijahprophethistory?blog=5

Try to delete the overflow property, I'm not 100% sure but sometimes it helps.

#content {
/*IE has a bug w/ background color so use width and overflow*/
background-color:#FFFFFF;
 width: 100%;
    overflow: auto;
}

11 Mar 20, 2009 16:33

@sam2kb - beautiful That fixed that.

Could you tell me what the difference is between a div# and plan #DIVName?

I've seen samples where people use div#content and #content.

When do you use either one? My print preview margins are still pretty big and I've been trying to fix them.

12 Mar 20, 2009 17:44

it is rather easy to add a print.css into each file...

but how about slapping a common "print skin" to skins folder and call it by "permalink?tempskin=printmode" each time we need it ?

13 Mar 20, 2009 18:01

tilqicom wrote:

it is rather easy to add a print.css into each file...

but how about slapping a common "print skin" to skins folder and call it by "permalink?tempskin=printmode" each time we need it ?

You da man! That's how it should be done. A plugin will simply add a tempskin=printmode to the current URL.

14 Mar 20, 2009 18:10

<OT>And this plugin will know the visitor chose print from their browser's file menu? And it will automagically know the names and natures of various divs? A long LONG time ago I did about 45 skin upgrades and all of them had a print.css file that matched what each skin needed to have. I actually managed to make it be 'generic' for all of those skins even though that is a wasted effort because most of the div names didn't show up in most of the skins.

It's not so hard for the original skinner to do ... unless they're lazy or just cloning an existing skin without thinking about the end users.<?OT>

15 Mar 20, 2009 18:17

The idea is to create a basic skin which will display the requested post, and maybe blog title and some footer notes like "find this article at {permalink}".

Something like RSS skin.

16 Mar 20, 2009 18:41

The tempPrint skin may work if we published all of the b2Evo Div names.

The reason I don't use them it's because it's hard to find a difinite list of what's the header call, what's the content call, what's the sidebar call, etc.

if we had that, that would make it easier for skinners to follow.

That said, this tempSkin could just assume the section names and if people don't follow the b2Evo naming standard, well, that's their problem. I think the skin idea is terrific though. We could even include a "Printer Icon" or "Printer Friendly" next to the "Leave a comment" link/text.

17 Mar 20, 2009 18:54

Urm, I think you miss the point, the print would be a skin in it's own right, all divs would be known and there would be no widgets ;)

¥

18 Mar 20, 2009 19:08

Ah so then you put a "print me" link on the page and hope the visitor uses it? That'd work well I reckon. I just pulled my credit reports and they gave a printme button that did it the way you're thinking of.

Pop it up in a new window though. That way the printme page doesn't need a goback button yah?

Better than a "per skin" model ... for most cases (which is a disclaimer all great thoughts need eh?).

19 Mar 20, 2009 19:10

Right. I missed that. That sounds even better. We could also call the skin and use it in our "mobile" friendly pages or custom skins.

Right now, I have a custom skin for mobile phones but it's cumbersome. this new skin would do the trick.
http://www.thechristianalert.org/m/

So perhaps we should call this skin: TextOnly

20 Mar 20, 2009 19:17

You can call it whatever you like, if you code it ;)

¥

*edit*
I hate to tell you, but yer mobile skin totally fails in my paranoid no js, no x-site requests of any sort, non-mobile machine.

21 Mar 20, 2009 19:36

yeah, that's another problem I've noticed too.

I think coding it would be easier but last time I heard -- there was no way to call a post directly. That's where we got stuck.

It would be nice to be able to call individual post with a format/render method:
...site/index.php?post=id?Render=TextOnly

or something.


Form is loading...