Page 1 of 1

How.... "To print" (Still again !) ?

Posted: Thu Jan 20, 2005 12:40 pm
by sourcelab
Hello!

Excuse me, I speak English very with difficulty, but I have a
difficult question.

I want to insert in a post a button "Print
the post".
This question was already put.
But, I do not arrive there.

I did what this post says:

- I have create the style sheet
a:link,
a:visited {
color: black;
text-decoration: none;
}

.serendipity_entryIcon,
#serendipityRightSideBar,
#serendipityLeftSideBar {
display: none;
}

- I installed it plug-in in directory "/Plugins/"

http://www.jannis.to/schrott/serendipit ... ugget.phps


But, next, how to then insert the URL to print, with the button?

Which URL does one have to indicate so that the style sheet is
taken into account?

In short, I am lost! :roll:

Thank you 1000 times for your assistance!



:) :)

Re: How.... "To print" (Still again !) ?

Posted: Thu Jan 20, 2005 3:18 pm
by garvinhicking
In fact, everything was written here: http://www.s9y.org/forums/viewtopic.php?t=517

In the head nugget plugin just enter

Code: Select all

<link rel="stylesheet" type"text/css" href="http://yourblog.com/templates/templatename/print_style.css" media="print">
(where your print_style.css must reside in the templates/templatename/ folder, depending where you saved it. Just enter the full URL to the CSS stylesheet).

As soon as you've pasted this code snippet into the head nugget plugin, you're ready to go.

You don't need to create a button on the page; if the user hits his browsers "print" button, the stylesheet will be loaded automatically.

Posted: Thu Jan 20, 2005 5:14 pm
by sourcelab
Thank you for your answer !
But... is not good.
I carried out well all that this post says.

First of all, the format impression does not function :

- here a page after modification
http://quickweb.free.fr/t1.pdf

- here the desired page, such as I would like to obtain it.
http://quickweb.free.fr/t2.pdf
(this file is the result of a modification with an editor HTML)


In fact, if there were a button to print, one could not display all
the headings. It is the "Format impression", which makes it possible
to read the article with the screen.
The files show it well, but it
would be necessary that is not only to print.

For example, if I takes any site:
http://www.news-eco.com/communiques/pay ... n_3670.php

and the format impression:
http://www.news-eco.com/index.php?loc=P ... 70&print=1

It is exactly that which I seek!

Posted: Thu Jan 20, 2005 5:39 pm
by garvinhicking
You can do all of that via CSS. However you need CSS knowledge. You need to set 'display: none' to all CSS things you don't want to show up in printing.

So there's a bit of work ahead, unless someone other wants to do that and share his results here?

Another approach is to modify HTML code using the Serendipity 0.8 Smarty Templating feature. There you could also add a print button, because you can affect all the HTML display.

Regards,
Garvin

Posted: Thu Jan 20, 2005 6:35 pm
by Guest