WP-Print - Version 2.05

Version Description

Download this release

Release Info

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

Version 2.05

print/images/print.gif ADDED
Binary file
print/print-options.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.0 Plugin: WP-Print 2.05 |
6
+ | Copyright (c) 2005 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://www.lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Print Options Page |
14
+ | - wp-content/plugins/print/print-options.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Variables Variables Variables
21
+ $base_name = plugin_basename('print/print-options.php');
22
+ $base_page = 'admin.php?page='.$base_name;
23
+ $id = intval($_GET['id']);
24
+
25
+ ### If Form Is Submitted
26
+ if($_POST['Submit']) {
27
+ $print_options = array();
28
+ $print_options['comments'] = intval($_POST['print_comments']);
29
+ $print_options['links'] = intval($_POST['print_links']);
30
+ $print_options['images'] = intval($_POST['print_images']);
31
+ $update_print_queries = array();
32
+ $update_print_text = array();
33
+ $update_print_queries[] = update_option('print_options', $print_options);
34
+ $update_print_text[] = __('Print Options');
35
+ $i=0;
36
+ $text = '';
37
+ foreach($update_print_queries as $update_print_query) {
38
+ if($update_print_query) {
39
+ $text .= '<font color="green">'.$update_print_text[$i].' '.__('Updated').'</font><br />';
40
+ }
41
+ $i++;
42
+ }
43
+ if(empty($text)) {
44
+ $text = '<font color="red">'.__('No Print Option Updated').'</font>';
45
+ }
46
+ }
47
+
48
+ ### Get Print Options
49
+ $print_options = get_settings('print_options');
50
+ ?>
51
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
52
+ <div class="wrap">
53
+ <h2><?php _e('Print Options'); ?></h2>
54
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
55
+ <fieldset class="options">
56
+ <legend><?php _e('Print Options'); ?></legend>
57
+ <table width="100%" border="0" cellspacing="3" cellpadding="3">
58
+ <tr valign="top">
59
+ <th align="left" width="30%"><?php _e('Print Comments?'); ?></th>
60
+ <td align="left">
61
+ <select name="print_comments" size="1">
62
+ <option value="1"<?php selected('1', $print_options['comments']); ?>><?php _e('Yes'); ?></option>
63
+ <option value="0"<?php selected('0', $print_options['comments']); ?>><?php _e('No'); ?></option>
64
+ </select>
65
+ </td>
66
+ </tr>
67
+ <tr valign="top">
68
+ <th align="left" width="30%"><?php _e('Print Links?'); ?></th>
69
+ <td align="left">
70
+ <select name="print_links" size="1">
71
+ <option value="1"<?php selected('1', $print_options['links']); ?>><?php _e('Yes'); ?></option>
72
+ <option value="0"<?php selected('0', $print_options['links']); ?>><?php _e('No'); ?></option>
73
+ </select>
74
+ </td>
75
+ </tr>
76
+ <tr valign="top">
77
+ <th align="left" width="30%"><?php _e('Print Images?'); ?></th>
78
+ <td align="left">
79
+ <select name="print_images" size="1">
80
+ <option value="1"<?php selected('1', $print_options['images']); ?>><?php _e('Yes'); ?></option>
81
+ <option value="0"<?php selected('0', $print_options['images']); ?>><?php _e('No'); ?></option>
82
+ </select>
83
+ </td>
84
+ </tr>
85
+ </table>
86
+ </fieldset>
87
+ <div align="center">
88
+ <input type="submit" name="Submit" class="button" value="<?php _e('Update Options'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="Cancel" class="button" onclick="javascript:history.go(-1)" />
89
+ </div>
90
+ </form>
91
+ </div>
print/print.php ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WP-Print
4
+ Plugin URI: http://www.lesterchan.net/portfolio/programming.php
5
+ Description: Displays A Printable Version Of Your WordPress Weblog Post.
6
+ Version: 2.05
7
+ Author: GaMerZ
8
+ Author URI: http://www.lesterchan.net
9
+ */
10
+
11
+
12
+ /* Copyright 2006 Lester Chan (email : gamerz84@hotmail.com)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation; either version 2 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
+ */
28
+
29
+
30
+ ### Function: Print Option Menu
31
+ add_action('admin_menu', 'print_menu');
32
+ function print_menu() {
33
+ if (function_exists('add_options_page')) {
34
+ add_options_page(__('Print'), __('Print'), 'manage_options', 'print/print-options.php') ;
35
+ }
36
+ }
37
+
38
+
39
+ ### Function: Print htaccess ReWrite Rules
40
+ add_filter('generate_rewrite_rules', 'print_rewrite');
41
+ function print_rewrite($wp_rewrite) {
42
+ $r_rule = '';
43
+ $r_link = '';
44
+ $rewrite_rules2 = $wp_rewrite->generate_rewrite_rule($wp_rewrite->permalink_structure.'print');
45
+ array_splice($rewrite_rules2, 1);
46
+ $r_rule = array_shift(array_keys($rewrite_rules2));
47
+ $r_rule = str_replace('/trackback', '',$r_rule);
48
+ $r_link = array_shift(array_values($rewrite_rules2));
49
+ $r_link = str_replace('tb=1', 'print=1', $r_link);
50
+ $print_rules = array($r_rule => $r_link, '(.+)/printpage/?$' => 'index.php?pagename='.$wp_rewrite->preg_index(1).'&print=1');
51
+ $wp_rewrite->rules = $print_rules + $wp_rewrite->rules;
52
+ }
53
+
54
+
55
+ ### Function: Print Public Variables
56
+ add_filter('query_vars', 'print_variables');
57
+ function print_variables($public_query_vars) {
58
+ $public_query_vars[] = 'print';
59
+ return $public_query_vars;
60
+ }
61
+
62
+
63
+ ### Function: Display Print Link
64
+ function print_link($text_post = 'Print This Post', $text_page = 'Print This Page') {
65
+ global $id;
66
+ $using_permalink = get_settings('permalink_structure');
67
+ $permalink = get_permalink();
68
+ if(!empty($using_permalink)) {
69
+ if(is_page()) {
70
+ echo '<a href="'.$permalink.'printpage/" title="'.$text_page.'">'.$text_page.'</a>';
71
+ } else {
72
+ echo '<a href="'.$permalink.'print/" title="'.$text_post.'">'.$text_post.'</a>';
73
+ }
74
+ } else {
75
+ echo '<a href="'.$permalink.'&amp;print=1" title="'.$text_post.'">'.$text_post.'</a>';
76
+ }
77
+ }
78
+
79
+
80
+ ### Function: Display Print Image Link
81
+ function print_link_image() {
82
+ global $id;
83
+ $using_permalink = get_settings('permalink_structure');
84
+ $permalink = get_permalink();
85
+ if(file_exists(ABSPATH.'/wp-content/plugins/print/images/print.gif')) {
86
+ $print_image = '<img src="'.get_settings('siteurl').'/wp-content/plugins/print/images/print.gif" alt="Print This Post/Page" />';
87
+ } else {
88
+ $print_image = 'Print';
89
+ }
90
+ if(!empty($using_permalink)) {
91
+ if(is_page()) {
92
+ echo '<a href="'.$permalink.'printpage/" title="Print This Page">'.$print_image.'</a>';
93
+ } else {
94
+ echo '<a href="'.$permalink.'print/" title="Print This Post">'.$print_image.'</a>';
95
+ }
96
+ } else {
97
+ echo '<a href="'.$permalink.'&amp;print=1" title="Print This Post/Page">'.$print_image.'</a>';
98
+ }
99
+ }
100
+
101
+
102
+ ### Function: Print Content
103
+ function print_content($display = true) {
104
+ global $links_text, $link_number, $pages, $multipage, $numpages, $post;
105
+ $max_url_char = 80;
106
+ if(!empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) {
107
+ $content = get_the_password_form();
108
+ } else {
109
+ if($multipage) {
110
+ for($page = 0; $page < $numpages; $page++) {
111
+ $content .= $pages[$page];
112
+ }
113
+ } else {
114
+ $content = $pages[0];
115
+ }
116
+ $content = apply_filters('the_content', $content);
117
+ $content = str_replace(']]>', ']]&gt;', $content);
118
+ if(!print_can('images')) {
119
+ $content = remove_image($content);
120
+ }
121
+ if(print_can('links')) {
122
+ preg_match_all('/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
123
+ for ($i=0; $i < count($matches[0]); $i++) {
124
+ $link_match = $matches[0][$i];
125
+ $link_number++;
126
+ $link_url = $matches[2][$i];
127
+ $link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('home') . $link_url : $link_url;
128
+ $link_text = $matches[4][$i];
129
+ $content = str_replace($link_match, '['.$link_number."] <a href=\"$link_url\" target=\"_blank\">".$link_text.'</a>', $content);
130
+ if(strlen($link_url) > $max_url_char) {
131
+ $link_url = substr($link_url, 0, $max_url_char).'<br />'.substr($link_url, $max_url_char, strlen($link_url));
132
+ }
133
+ if(preg_match('/<img(.+?)src=\"(.+?)\"(.*?)>/',$link_text)) {
134
+ $links_text .= '<br />['.$link_number.'] '.__('Image').': <b>'.$link_url.'</b>';
135
+ } else {
136
+ $links_text .= '<br />['.$link_number.'] '.$link_text.': <b>'.$link_url.'</b>';
137
+ }
138
+ }
139
+ }
140
+ }
141
+ if($display) {
142
+ echo $content;
143
+ } else {
144
+ return $content;
145
+ }
146
+ }
147
+
148
+
149
+ ### Function: Print Categories
150
+ function print_categories($before = '', $after = '') {
151
+ $temp_cat = strip_tags(get_the_category_list(',' , $parents));
152
+ $temp_cat = explode(', ', $temp_cat);
153
+ $temp_cat = implode($after.', '.$before, $temp_cat);
154
+ echo $before.$temp_cat.$after;
155
+ }
156
+
157
+
158
+ ### Function: Print Comments Content
159
+ function print_comments_content($display = true) {
160
+ global $links_text, $link_number;
161
+ $max_url_char = 100;
162
+ $content = get_comment_text();
163
+ $content = apply_filters('comment_text', $content);
164
+ if(!print_can('images')) {
165
+ $content = remove_image($content);
166
+ }
167
+ if(print_can('links')) {
168
+ preg_match_all('/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
169
+ for ($i=0; $i < count($matches[0]); $i++) {
170
+ $link_match = $matches[0][$i];
171
+ $link_number++;
172
+ $link_url = $matches[2][$i];
173
+ $link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('home') . $link_url : $link_url;
174
+ $link_text = $matches[4][$i];
175
+ $content = str_replace($link_match, '['.$link_number."] <a href=\"$link_url\" target=\"_blank\">".$link_text.'</a>', $content);
176
+ if(strlen($link_url) > $max_url_char) {
177
+ $link_url = substr($link_url, 0, $max_url_char).'<br />'.substr($link_url, $max_url_char, strlen($link_url));
178
+ }
179
+ if(preg_match('/<img(.+?)src=\"(.+?)\"(.*?)>/',$link_text)) {
180
+ $links_text .= '<br />['.$link_number.'] '.__('Image').': <b>'.$link_url.'</b>';
181
+ } else {
182
+ $links_text .= '<br />['.$link_number.'] '.$link_text.': <b>'.$link_url.'</b>';
183
+ }
184
+ }
185
+ }
186
+ if($display) {
187
+ echo $content;
188
+ } else {
189
+ return $content;
190
+ }
191
+ }
192
+
193
+
194
+ ### Function: Print Comments
195
+ function print_comments_number() {
196
+ global $post;
197
+ $comment_text = '';
198
+ $comment_status = $post->comment_status;
199
+ if($comment_status == 'open') {
200
+ $num_comments = get_comments_number();
201
+ if($num_comments == 0) {
202
+ $comment_text = __('No Comments');
203
+ } elseif($num_comments == 1) {
204
+ $comment_text = __('1 Comment');
205
+ } else {
206
+ $comment_text = __($num_comments.' Comments');
207
+ }
208
+ } else {
209
+ $comment_text = __('Comments Disabled');
210
+ }
211
+ if(!empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) {
212
+ _e('Comments Hidden');
213
+ } else {
214
+ echo $comment_text;
215
+ }
216
+ }
217
+
218
+
219
+ ### Function: Print Links
220
+ function print_links($text_links = 'URLs in this post:') {
221
+ global $links_text;
222
+ if(!empty($links_text)) {
223
+ echo $text_links.$links_text;
224
+ }
225
+ }
226
+
227
+
228
+ ### Function: Load WP-Print
229
+ add_action('template_redirect', 'wp_print');
230
+ function wp_print() {
231
+ if(intval(get_query_var('print')) == 1) {
232
+ include(ABSPATH.'wp-content/plugins/print/wp-print.php');
233
+ exit;
234
+ }
235
+ }
236
+
237
+
238
+ ### Function: Add Print Comments Template
239
+ function print_template_comments($file = '') {
240
+ $file = ABSPATH.'wp-content/plugins/print/wp-print-comments.php';
241
+ return $file;
242
+ }
243
+
244
+
245
+ ### Function: Print Page Title
246
+ function print_pagetitle($print_pagetitle) {
247
+ return '&raquo; Print'.$print_pagetitle;
248
+ }
249
+
250
+
251
+ ### Function: Can Print?
252
+ function print_can($type) {
253
+ $print_options = get_settings('print_options');
254
+ return intval($print_options[$type]);
255
+ }
256
+
257
+
258
+ ### Function: Remove Image From Text
259
+ function remove_image($content) {
260
+ $content= preg_replace('/<img(.+?)src=\"(.+?)\"(.*?)>/', '',$content);
261
+ return $content;
262
+ }
263
+
264
+
265
+ ### Function: Print Options
266
+ add_action('activate_print/print.php', 'print_init');
267
+ function print_init() {
268
+ // Add Options
269
+ $print_options = array();
270
+ $print_options['comments'] = 0;
271
+ $print_options['links'] = 1;
272
+ $print_options['images'] = 1;
273
+ add_option('print_options', $print_options, 'Print Options');
274
+ }
275
+ ?>
print/wp-print-comments.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.0 Plugin: WP-Print 2.05 |
6
+ | Copyright (c) 2005 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://www.lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Printer Friendly Page For Comments |
14
+ | - wp-print-comments.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+ ?>
19
+ <?php if($comments) : ?>
20
+ <?php $comment_count = 1; ?>
21
+ <p id="CommentTitle"><?php print_comments_number(); ?> To "<?php the_title(); ?>"</p>
22
+ <?php foreach ($comments as $comment) : ?>
23
+ <p class="CommentDate"><b>#<?php echo $comment_count; ?> <?php comment_type(); ?></b> By <u><?php comment_author(); ?></u> On <?php comment_date('jS F Y @ H:i'); ?></p>
24
+ <div class="CommentContent"><?php print_comments_content(); ?></div>
25
+ <?php $comment_count++; ?>
26
+ <?php endforeach; ?>
27
+ <hr class="Divider" align="center" />
28
+ <?php endif; ?>
print/wp-print.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.0 Plugin: WP-Print 2.05 |
6
+ | Copyright (c) 2005 Lester "GaMerZ" Chan |
7
+ | |
8
+ | File Written By: |
9
+ | - Lester "GaMerZ" Chan |
10
+ | - http://www.lesterchan.net |
11
+ | |
12
+ | File Information: |
13
+ | - Printer Friendly Page |
14
+ | - wp-print.php |
15
+ | |
16
+ +----------------------------------------------------------------+
17
+ */
18
+
19
+
20
+ ### Variables
21
+ $links_text = '';
22
+
23
+ ### Actions
24
+ add_action('init', 'print_content');
25
+
26
+ ### Filters
27
+ add_filter('wp_title', 'print_pagetitle');
28
+ add_filter('comments_template', 'print_template_comments');
29
+ ?>
30
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
31
+ <html xmlns="http://www.w3.org/1999/xhtml">
32
+ <head>
33
+ <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
34
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
35
+ <style type="text/css" media="screen, print">
36
+ Body {
37
+ font-family: Verdana, Arial, Tahoma;
38
+ font-size: 12px;
39
+ color: #000000;
40
+ }
41
+ #Outline {
42
+ text-align: left;
43
+ width: 90%;
44
+ margin-left: auto;
45
+ margin-right: auto;
46
+ padding: 10px;
47
+ border: 1px solid #000000;
48
+ }
49
+ #BlogTitle {
50
+ font-weight: bold;
51
+ font-size: 16px;
52
+ margin-bottom: 5px;
53
+ }
54
+ #BlogDate {
55
+ margin-top: 5px;
56
+ margin-bottom: 10px;
57
+ }
58
+ #BlogContent {
59
+ padding: 10px;
60
+ margin-top: 10px;
61
+ }
62
+ HR.Divider {
63
+ width: 80%;
64
+ height: 1px;
65
+ color: #000000;
66
+ }
67
+ #CommentTitle {
68
+ font-weight: bold;
69
+ font-size: 16px;
70
+ padding-bottom: 10px;
71
+ }
72
+ .CommentDate {
73
+ margin-top: 5px;
74
+ margin-bottom: 10px;
75
+ }
76
+ .CommentContent {
77
+ padding: 2px 10px 10px 10px;
78
+ }
79
+ </style>
80
+ </head>
81
+ <body>
82
+ <p align="center"><b>- <?php bloginfo('name'); ?> - <?php bloginfo('url')?> -</b></p>
83
+ <center>
84
+ <div id="Outline">
85
+ <?php if (have_posts()): ?>
86
+ <?php while (have_posts()): the_post(); ?>
87
+ <p id="BlogTitle"><?php the_title(); ?></p>
88
+ <p id="BlogDate">Posted By <u><?php the_author(); ?></u> On <?php the_time('jS F Y @ H:i'); ?> In <?php print_categories('<u>', '</u>'); ?> | <u><?php print_comments_number(); ?></u></p>
89
+ <div id="BlogContent"><?php print_content(); ?></div>
90
+ <?php endwhile; ?>
91
+ <hr class="Divider" align="center" />
92
+ <?php if(print_can('comments')): ?>
93
+ <?php comments_template(); ?>
94
+ <?php endif; ?>
95
+ <p align="left">Article printed from <?php bloginfo('name'); ?>: <b><?php bloginfo('url'); ?></b></p>
96
+ <p align="left">URL to article: <b><?php the_permalink(); ?></b></p>
97
+ <?php if(print_can('links')): ?>
98
+ <p align="left"><?php print_links(); ?></p>
99
+ <?php endif; ?>
100
+ <p align="right">Click <a href="#Print" onclick="window.print(); return false;" title="Click here to print.">here</a> to print.</p>
101
+ <?php else: ?>
102
+ <p align="center">No posts matched your criteria.</p>
103
+ <?php endif; ?>
104
+ </div>
105
+ </center>
106
+ </body>
107
+ </html>
readme.html ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-Print 2.05 Readme</title>
6
+ <style type="text/css" media="screen">
7
+ /* Default Style */
8
+ BODY {
9
+ font-family: Verdana, Arial;
10
+ font-size: 12px;
11
+ color: #000000;
12
+ background: #FFFFFF;
13
+ }
14
+ P {
15
+ padding-left: 10px;
16
+ }
17
+ BLOCKQUOTE {
18
+ margin: 10px 20px 0px 20px;
19
+ padding: 10px;
20
+ border: 1px solid #8d8d8d;
21
+ background-color: #f5f5f5;
22
+ }
23
+ LI {
24
+ margin-top: 20px;
25
+ }
26
+ UL LI UL LI {
27
+ margin-top: 10px;
28
+ }
29
+ A, A:active, A:link, A:visited {
30
+ color: #2d3a4c;
31
+ text-decoration: none;
32
+ }
33
+ A:hover {
34
+ color: #5577a5;
35
+ text-decoration: underline;
36
+ }
37
+ /* Place Holder Style */
38
+ #Container {
39
+ width: 780px;
40
+ margin-left: auto;
41
+ margin-right: auto;
42
+ }
43
+ #Content {
44
+ background-color: #fafafa;
45
+ border: 1px solid #a2b6cb;
46
+ padding: 10px;
47
+ margin-top: -13px;
48
+ }
49
+ /* Title Style */
50
+ #Title {
51
+ font-family: Verdana, Arial;
52
+ font-size: 22px;
53
+ font-weight: bold;
54
+ color: #389aff;
55
+ border-bottom: 1px solid #389aff;
56
+ margin-bottom: 10px;
57
+ }
58
+ .SubTitle {
59
+ font-family: Verdana, Arial;
60
+ font-size: 18px;
61
+ font-weight: bold;
62
+ color: #5b87b4;
63
+ }
64
+ .SubSubTitle {
65
+ font-family: Verdana, Arial;
66
+ font-size: 14px;
67
+ font-weight: bold;
68
+ color: #73a4d6;
69
+ }
70
+ /* Tabs */
71
+ UL#Tabs {
72
+ font-family: Verdana, Arial;
73
+ font-size: 12px;
74
+ font-weight: bold;
75
+ list-style-type: none;
76
+ padding-bottom: 28px;
77
+ border-bottom: 1px solid #a2b6cb;
78
+ margin-bottom: 12px;
79
+ z-index: 1;
80
+ }
81
+ #Tabs LI.Tab {
82
+ float: right;
83
+ height: 25px;
84
+ background-color: #deedfb;
85
+ margin: 2px 0px 0px 5px;
86
+ border: 1px solid #a2b6cb;
87
+ }
88
+ #Tabs LI.Tab A {
89
+ float: left;
90
+ display: block;
91
+ color: #666666;
92
+ text-decoration: none;
93
+ padding: 5px;
94
+ }
95
+ #Tabs LI.Tab A:hover {
96
+ background-color: #bfe0fe;
97
+ border-bottom: 1px solid #bfe0fe;
98
+ }
99
+ /* Selected Tab */
100
+ #Tabs LI.SelectedTab {
101
+ float: right;
102
+ height: 25px;
103
+ background-color: #fafafa;
104
+ margin: 2px 0px 0px 5px;
105
+ border-top: 1px solid #a2b6cb;
106
+ border-right: 1px solid #a2b6cb;
107
+ border-bottom: 1px solid #fafafa;
108
+ border-left: 1px solid #a2b6cb;
109
+ }
110
+ #Tabs LI.SelectedTab A {
111
+ float: left;
112
+ display: block;
113
+ color: #666666;
114
+ text-decoration: none;
115
+ padding: 5px;
116
+ cursor: default;
117
+ }
118
+ /* Copyright */
119
+ #Copyright {
120
+ text-align: center;
121
+ }
122
+ </style>
123
+ <script type="text/javascript">
124
+ // Index Page
125
+ function index() {
126
+ // Tab
127
+ document.getElementById('IndexTab').className = 'SelectedTab';
128
+ document.getElementById('InstallTab').className = 'Tab';
129
+ document.getElementById('UpgradeTab').className = 'Tab';
130
+ document.getElementById('UsageTab').className = 'Tab';
131
+ // Page
132
+ document.getElementById('Index').style.display= 'block';
133
+ document.getElementById('IndexTab').className = 'SelectedTab';
134
+ document.getElementById('Install').style.display = 'none';
135
+ document.getElementById('Upgrade').style.display = 'none';
136
+ document.getElementById('Usage').style.display = 'none';
137
+ }
138
+ // Installation Page
139
+ function install() {
140
+ // Tab
141
+ document.getElementById('IndexTab').className = 'Tab';
142
+ document.getElementById('InstallTab').className = 'SelectedTab';
143
+ document.getElementById('UpgradeTab').className = 'Tab';
144
+ document.getElementById('UsageTab').className = 'Tab';
145
+ // Page
146
+ document.getElementById('Index').style.display= 'none';
147
+ document.getElementById('Install').style.display = 'block';
148
+ document.getElementById('Upgrade').style.display = 'none';
149
+ document.getElementById('Usage').style.display = 'none';
150
+ }
151
+ // Upgrade Page
152
+ function upgrade() {
153
+ // Tab
154
+ document.getElementById('IndexTab').className = 'Tab';
155
+ document.getElementById('InstallTab').className = 'Tab';
156
+ document.getElementById('UpgradeTab').className = 'SelectedTab';
157
+ document.getElementById('UpgradeTab').href = 'Tab';
158
+ document.getElementById('UsageTab').className = 'Tab';
159
+ // Page
160
+ document.getElementById('Index').style.display= 'none';
161
+ document.getElementById('Install').style.display = 'none';
162
+ document.getElementById('Upgrade').style.display = 'block';
163
+ document.getElementById('Usage').style.display = 'none';
164
+ }
165
+ // Usage Page
166
+ function usage() {
167
+ // Tab
168
+ document.getElementById('IndexTab').className = 'Tab';
169
+ document.getElementById('InstallTab').className = 'Tab';
170
+ document.getElementById('UpgradeTab').className = 'Tab';
171
+ document.getElementById('UsageTab').className = 'SelectedTab';
172
+ // Page
173
+ document.getElementById('Index').style.display= 'none';
174
+ document.getElementById('Install').style.display = 'none';
175
+ document.getElementById('Upgrade').style.display = 'none';
176
+ document.getElementById('Usage').style.display = 'block';
177
+ }
178
+ </script>
179
+ </head>
180
+ <body>
181
+ <div id="Container">
182
+ <!-- Title -->
183
+ <div id="Title">WP-Print 2.05&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
184
+
185
+ <!-- Tabs -->
186
+ <ul id="Tabs">
187
+ <li id="UsageTab" class="Tab"><a href="#Usage" onclick="usage(); return false;" title="Usage Instructions">Usage</a></li>
188
+ <li id="UpgradeTab" class="Tab"><a href="#Upgrade" onclick="upgrade(); return false;" title="Upgrade Instructions">Upgrade</a></li>
189
+ <li id="InstallTab" class="Tab"><a href="#Installation" onclick="install(); return false;" title="Installation Instructions">Installation</a></li>
190
+ <li id="IndexTab" class="SelectedTab"><a href="#Index" onclick="index(); return false;" title="Index Instructions">Index</a></li>
191
+ </ul>
192
+
193
+ <!-- Content -->
194
+ <div id="Content">
195
+ <!-- Index -->
196
+ <div id="Index">
197
+ <div class="SubTitle">&raquo; Index</div>
198
+ <div class="SubSubTitle">Plugin Information</div>
199
+ <p><b>Author</b><br /><b>&raquo;</b> Lester 'GaMerZ' Chan</p>
200
+ <p>
201
+ <b>EMail:</b><br /><b>&raquo;</b>
202
+ <script type="text/javascript">
203
+ /* <![CDATA[*/
204
+ document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-Print%202.05%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
205
+ /* ]]> */
206
+ </script>
207
+ </p>
208
+ <p><b>Website:</b><br /><b>&raquo;</b> <a href="http://www.lesterchan.net/" title="http://www.lesterchan.net/">http://www.lesterchan.net/</a></p>
209
+ <p><b>Demo:</b><br /><b>&raquo;</b> <a href="htp://www.lesterchan.net/blogs/wp-print.php?p=647" title="http://www.lesterchan.net/blogs/wp-print.php?p=647">http://www.lesterchan.net/blogs/wp-print.php?p=647</a></p>
210
+ <p><b>Documentation:</b><br /><b>&raquo;</b> <a href="http://dev.wp-plugins.org/wiki/wp-print" title="http://dev.wp-plugins.org/wiki/wp-print">http://dev.wp-plugins.org/wiki/wp-print</a></p>
211
+ <p><b>Development:</b><br /><b>&raquo;</b> <a href="http://dev.wp-plugins.org/browser/wp-print/" title="http://dev.wp-plugins.org/browser/wp-print/">http://dev.wp-plugins.org/browser/wp-print/</a></p>
212
+ <p><b>Support Forums:</b><br /><b>&raquo;</b> <a href="http://forums.lesterchan.net/viewforum.php?f=11" title="http://forums.lesterchan.net/viewforum.php?f=11">http://forums.lesterchan.net/viewforum.php?f=11</a></p>
213
+ <p><b>Updated:</b><br /><b>&raquo;</b> 1st June 2006</p>
214
+ <div class="SubSubTitle">Changelog</div>
215
+ <ul>
216
+ <li>
217
+ <b>Version 2.05 (01-06-2006)</b>
218
+ <ul>
219
+ <li>NEW: Added Print Options In WP Administration Panel Under 'Options -> Print'</li>
220
+ <li>NEW: Print Administration Panel And The Code That WP-Print Generated Is XHTML 1.0 Transitional</li>
221
+ <li>FIXED: Comment's Content Formatting</li>
222
+ </ul>
223
+ </li>
224
+ <li>
225
+ <b>Version 2.04 (01-04-2006)</b>
226
+ <ul>
227
+ <li>NEW: Able To Print Comments Together With Post Using $can_print_comments In wp-print.php</li>
228
+ <li>NEW: Moved wp-print.php To Plugin Folder</li>
229
+ <li>FIXED: Removed Link From Post Comment Count And Post Category</li>
230
+ </ul>
231
+ </li>
232
+ <li>
233
+ <b>Version 2.03 (01-03-2006)</b>
234
+ <ul>
235
+ <li>NEW: Added Print Image With print_link_image()</li>
236
+ <li>NEW: Automatically Break To Next Line If Link Contains More Than 100 Chars</li>
237
+ <li>FIXED: Comment Numbers Showing In Password Protected Post</li>
238
+ </ul>
239
+ </li>
240
+ <li>
241
+ <b>Version 2.02 (01-02-2006)</b>
242
+ <ul>
243
+ <li>FIXED: Able To View Password Protected Blog</li>
244
+ </ul>
245
+ </li>
246
+ <li>
247
+ <b>Version 2.01 (01-01-2006)</b>
248
+ <ul>
249
+ <li>NEW: Compatible With WordPress 2.0</li>
250
+ <li>NEW: Automatically Detect Whether You Are Using Nice Permalink</li>
251
+ <li>NEW: Automated Permalink</li>
252
+ <li>NEW: Now You Only Need To Insert 1 Line Into Your index.php Of Your Theme</li>
253
+ <li>NEW: GPL License Added</li>
254
+ <li>FIXED: Links Not Displaying Properly When Printing More Than 1 Post On A Single Page</li>
255
+ </ul>
256
+ </li>
257
+ <li>
258
+ <b>Version 2.00a (17-11-2005)</b>
259
+ <ul>
260
+ <li>NEW: Permlink For The Page Feature</li>
261
+ </ul>
262
+ </li>
263
+ <li>
264
+ <b>Version 2.00 (10-11-2005)</b>
265
+ <ul>
266
+ <li>NEW: Print Out A Summary Of URLS In The Post At The Bottom Of The Page</li>
267
+ </ul>
268
+ </li>
269
+ </ul>
270
+ </div>
271
+
272
+ <!-- Installation Instructions -->
273
+ <div id="Install" style="display: none;">
274
+ <div class="SubTitle">&raquo; Installation Instructions</div>
275
+ <ol>
276
+ <li>
277
+ Open <b>wp-content/plugins</b> Folder
278
+ </li>
279
+ <li>
280
+ Put:
281
+ <blockquote>Folder: print</blockquote>
282
+ </li>
283
+ <li>
284
+ <b>Activate</b> WP-Print Plugin
285
+ </li>
286
+ <li>
287
+ You MAY Need To Re-Generate The Permalink (<b>Options -> Permalinks Options -> Update Permalink Structure</b>)
288
+ </li>
289
+ <li>
290
+ Refer To <b>Usage</b> For Further Instructions
291
+ </li>
292
+ </ol>
293
+ </div>
294
+
295
+ <!-- Upgrade Instructions -->
296
+ <div id="Upgrade" style="display: none;">
297
+ <div class="SubTitle">&raquo; Upgrade Instructions</div>
298
+ <div class="SubSubTitle">From v2.0x To v2.05</div>
299
+ <ol>
300
+ <li>
301
+ <b>Deactivate</b> WP-Print Plugin
302
+ </li>
303
+ <li>
304
+ Open <b>wp-content/plugins</b> Folder
305
+ </li>
306
+ <li>
307
+ Overwrite:
308
+ <blockquote>Folder: print</blockquote>
309
+ </li>
310
+ <li>
311
+ <b>Activate</b> WP-Print Plugin
312
+ </li>
313
+ </ol>
314
+ <div class="SubSubTitle">From v1.0x To v2.05</div>
315
+ <ol>
316
+ <li>
317
+ <b>Deactivate</b> WP-Print Plugin
318
+ </li>
319
+ <li>
320
+ Open <b>wp-content/plugins</b> Folder
321
+ </li>
322
+ <li>
323
+ Delete:
324
+ <blockquote>File: print.php</blockquote>
325
+ </li>
326
+ <li>
327
+ Put:
328
+ <blockquote>Folder: print</blockquote>
329
+ </li>
330
+ <li>
331
+ Open <b>Root WordPress</b> Folder
332
+ </li>
333
+ <li>
334
+ Delete:
335
+ <blockquote>File: wp-print.php</blockquote>
336
+ </li>
337
+ <li>
338
+ <b>Activate</b> WP-Print Plugin
339
+ </li>
340
+ <li>
341
+ You MAY Need To Re-Generate The Permalink (<b>Options -> Permalinks Options -> Update Permalink Structure</b>)
342
+ </li>
343
+ <li>
344
+ Refer To <b>Usage</b> For Further Instructions
345
+ </li>
346
+ </ol>
347
+ </div>
348
+
349
+ <!-- Usage Instructions -->
350
+ <div id="Usage" style="display: none;">
351
+ <div class="SubTitle">&raquo; Usage Instructions</div>
352
+ <div class="SubSubTitle">General Usage</div>
353
+ <ol>
354
+ <li>
355
+ Open <b>wp-content/themes/&lt;YOUR THEME NAME&gt;/index.php</b>
356
+ <p>You may place it in <b>single.php</b>, <b>post.php</b> or <b>page.php</b> also.</p>
357
+ </li>
358
+ <li>
359
+ Find:
360
+ <blockquote>
361
+ &lt;?php while (have_posts()) : the_post(); ?&gt;
362
+ </blockquote>
363
+ </li>
364
+ <li>
365
+ Add Anywhere Below It:
366
+ <blockquote>
367
+ &lt;?php if(function_exists('wp_print')) { print_link(); } ?&gt;
368
+ </blockquote>
369
+ <p>The <b>first value</b> you pass in is the text for printing post. The <b>second value</b> is the text for printing page.</p>
370
+ <p>Default: print_link('Print This Post', 'Print This Page')</p>
371
+ <p>If you want to use an image/icon instead, replace print_link(); with <b>print_link_image();</b></p>
372
+ </li>
373
+ </ol>
374
+ </div>
375
+ </div>
376
+ </div>
377
+ <p id="Copyright">WP-Print 2.05<br />Copyright &copy; 2006 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
378
+ </body>
379
+ </html>