#2 Feb 14, 2007 01:08
Great.... works a treat.
I got really sick of playing with print.css files for hours and having one browser or another (yeah, I'm looking at you, IE and Opera) not display like all the rest. So I started using a link to the basic skin as my pretty printing page. Here's how it goes down.
Note: I'm using Francois' skin named custom and the skin named basic for this example. Each comes with b2evolution by default. This is designed for b2evolution v1.9.2.
1. If you don't allow skin switching on all your blogs then please skip to step #2.
1.a. Open the _main.php file of all skins. Find the section that lists the time of the post, the post author, the post word count, and what not. That section is sometimes named: bSmallHead.
1.b. Insert the following code, leaving off the php tags if you put this code in a section previously marked by php tags:
1.c. Save the _main.php files and upload them to your server (if needed). Then skip to step # 6.
2. Assuming you haven't altered it, make a copy of your a_stub.php file. Name the new copy: print.php
3.a. Open print.php and uncomment a line. Essentially, replace:
3.b. Change the blog represented by the print.php stub file so that the same print.php file may be used for every blog. Change:
4. Save the print.php file, upload it to the same directory as your index.php file, and then be sure it has read and execute permissions.
5. Open the _main.php files of all skins you use except the one named basic. Find the section that lists the time of the post, the post author, the post word count, and what not. That section is sometimes named: bSmallHead.
5.a. Insert the following code, leaving off the php tags if you put this code in a section previously marked by php tags:
5.b. Save the _main.php files and upload them to your server (if needed).
6. Save the print.gif icon attached to this forum post. Upload it to a all skin folders , except basic. Be sure the print.gif icon is in a subfolder named img. As an example, using Francois' custom skin, upload the print.gif icon to /skins/custom/img and then be sure it has read and execute permissions.
7. (Optional) Clean up the _main.php file of the basic skin. Find and delete the following:
That's it. You should be able to click a little print icon in the byline of your posts and see the text in the basic skin if everything worked.
Great.... works a treat.
Thank you so much for this walk through... I cannot thank you enough as this was a piece of the puzzle that I really wanted to figure out...
Great Work! But when i use the "more" tag in my posts it will only print the teaser. I think it's because of the $Item->ID(); in
Is there another $Item i can use that catchs the right URL with the "more" tag? E.g. everything after the /blog=2? in /blog=2?p=24&more=1&c=1&tb=1&pb=1#more24