WP-Print - Version 1.00

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Print
Version 1.00
Comparing to
See all releases

Version 1.00

Files changed (2) hide show
  1. readme.txt +58 -0
  2. wp-print.php +77 -0
readme.txt ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -> Print Plugin For WordPress
2
+ --------------------------------------------------
3
+ Author -> Lester 'GaMerZ' Chan
4
+ Email -> lesterch@singnet.com.sg
5
+ Website -> http://www.lesterchan.net/
6
+ Demo -> http://www.lesterchan.net/blogs/wp-print.php?p=647
7
+ Updated -> 3rd September 2005
8
+ --------------------------------------------------
9
+
10
+
11
+ -> Installation Instructions
12
+ --------------------------------------------------
13
+ // Open root Wordpress folder
14
+
15
+ Put
16
+ ------------------------------------------------------------------
17
+ wp-print.php
18
+ ------------------------------------------------------------------
19
+
20
+
21
+ // Go to Manage > Files > Common -> .htaccess (for rewrite rules)
22
+ // Note: If you ARE using nice permalink url
23
+ Find:
24
+ ------------------------------------------------------------------
25
+ RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ <BLOG URL>/index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,L]
26
+ ------------------------------------------------------------------
27
+ Add Below It:
28
+ ------------------------------------------------------------------
29
+ RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/print/?$ <BLOG URL>/wp-print.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA,L]
30
+ ------------------------------------------------------------------
31
+
32
+ // Open wp-content/themes/<YOUR THEME NAME>/index.php
33
+
34
+ Find:
35
+ ------------------------------------------------------------------
36
+ <?php while (have_posts()) : the_post(); ?>
37
+ ------------------------------------------------------------------
38
+ Add Below It:
39
+ ------------------------------------------------------------------
40
+ <a href="<?php the_permalink(); ?>print/">Print This Article</a>
41
+ ------------------------------------------------------------------
42
+
43
+
44
+ // Note: If you ARE NOT using nice permalink url
45
+ // Open wp-content/themes/<YOUR THEME NAME>/index.php
46
+
47
+ Find:
48
+ ------------------------------------------------------------------
49
+ <?php while (have_posts()) : the_post(); ?>
50
+ ------------------------------------------------------------------
51
+ Add Below It:
52
+ ------------------------------------------------------------------
53
+ <?php if(is_page()) : ?>
54
+ <a href="wp-print.php?page_id=<?=the_ID()?>">Print This Article</a>
55
+ <?php else : ?>
56
+ <a href="wp-print.php?p=<?=the_ID()?>">Print This Article</a>
57
+ <?php endif; ?>
58
+ ------------------------------------------------------------------
wp-print.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Print Plugin For WordPress
4
+ * - wp-print.php
5
+ *
6
+ * Copyright � 2004-2005 Lester "GaMerZ" Chan
7
+ */
8
+
9
+
10
+ // Require WordPress Header
11
+ require('wp-blog-header.php');
12
+ ?>
13
+
14
+ <!DOCTYPE HTML PUBLIC "-//W3C//Dp HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dp">
15
+ <html>
16
+ <head>
17
+ <title><?php bloginfo('name')?> > Print > <?php echo single_post_title('')?></title>
18
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
19
+ <style type="text/css" media="screen, print">
20
+ Body {
21
+ font-family: Verdana, Arial, Tahoma;
22
+ font-size: 12px;
23
+ color: #000000;
24
+ }
25
+ #Outline {
26
+ text-align: left;
27
+ width: 90%;
28
+ margin-left: auto;
29
+ margin-right: auto;
30
+ padding: 10px;
31
+ border: 1px solid #000000;
32
+ }
33
+ #BlogTitle {
34
+ font-weight: bold;
35
+ font-size: 16px;
36
+ margin-bottom: 5px;
37
+ }
38
+ #BlogDate {
39
+ margin-top: 5px;
40
+ margin-bottom: 10px;
41
+ }
42
+ #BlogContent {
43
+ padding: 10px;
44
+ margin-top: 10px;
45
+ }
46
+ HR#Divider {
47
+ width: 80%;
48
+ height: 1px;
49
+ color: #000000;
50
+ }
51
+ </style>
52
+ </head>
53
+ <body>
54
+ <p align="center"><b>- <?php bloginfo('name'); ?> - <?php bloginfo('url')?> -</b></p>
55
+ <center>
56
+ <div id="Outline">
57
+ <?php if (have_posts()) : ?>
58
+ <?php while (have_posts()) : the_post(); ?>
59
+ <p id="BlogTitle"><?php the_title(); ?></p>
60
+ <p id="BlogDate">Posted By <?php the_author(); ?> On <?php the_time('jS F Y @ H:i'); ?> In <?php the_category(', '); ?> | <a href="<?php comments_link(); ?>"><?php comments_number(); ?></a></p>
61
+ <div id="BlogContent">
62
+ <?php for($page = 1; $page <= $numpages; $page++) { ?>
63
+ <?php the_content(); ?>
64
+ <?php } ?>
65
+ </div>
66
+ <?php endwhile; ?>
67
+ <?php else : ?>
68
+ <p>No Posts Matched Your Criteria</p>
69
+ <?php endif; ?>
70
+ <p><hr id="Divider" align="center"></p>
71
+ <p align="left">Article printed from <?=get_bloginfo('name')?>: <b><?=get_bloginfo('url')?></b></p>
72
+ <p align="left">URL to article: <b><?=get_permalink()?></b></p>
73
+ <p align="right">Click <a href="javascript:window.print();">here</a> to print.</p>
74
+ </div>
75
+ </center>
76
+ </body>
77
+ </html>