WP-Print - Version 2.06

Version Description

Download this release

Release Info

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

Version 2.06

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.06 |
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,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_keys($rewrite_rules2);
47
+ $r_rule = array_shift($r_rule);
48
+ $r_rule = str_replace('/trackback', '',$r_rule);
49
+ $r_link = array_values($rewrite_rules2);
50
+ $r_link = array_shift($r_link);
51
+ $r_link = str_replace('tb=1', 'print=1', $r_link);
52
+ $print_rules = array($r_rule => $r_link, '(.+)/printpage/?$' => 'index.php?pagename='.$wp_rewrite->preg_index(1).'&print=1');
53
+ $wp_rewrite->rules = $print_rules + $wp_rewrite->rules;
54
+ }
55
+
56
+
57
+ ### Function: Print Public Variables
58
+ add_filter('query_vars', 'print_variables');
59
+ function print_variables($public_query_vars) {
60
+ $public_query_vars[] = 'print';
61
+ return $public_query_vars;
62
+ }
63
+
64
+
65
+ ### Function: Display Print Link
66
+ function print_link($text_post = 'Print This Post', $text_page = 'Print This Page') {
67
+ global $id;
68
+ $using_permalink = get_settings('permalink_structure');
69
+ $permalink = get_permalink();
70
+ if(!empty($using_permalink)) {
71
+ if(is_page()) {
72
+ echo '<a href="'.$permalink.'printpage/" title="'.$text_page.'" rel="nofollow">'.$text_page.'</a>';
73
+ } else {
74
+ echo '<a href="'.$permalink.'print/" title="'.$text_post.'" rel="nofollow">'.$text_post.'</a>';
75
+ }
76
+ } else {
77
+ echo '<a href="'.$permalink.'&amp;print=1" title="'.$text_post.'" rel="nofollow">'.$text_post.'</a>';
78
+ }
79
+ }
80
+
81
+
82
+ ### Function: Display Print Image Link
83
+ function print_link_image() {
84
+ global $id;
85
+ $using_permalink = get_settings('permalink_structure');
86
+ $permalink = get_permalink();
87
+ if(file_exists(ABSPATH.'/wp-content/plugins/print/images/print.gif')) {
88
+ $print_image = '<img src="'.get_settings('siteurl').'/wp-content/plugins/print/images/print.gif" alt="Print This Post/Page" />';
89
+ } else {
90
+ $print_image = 'Print';
91
+ }
92
+ if(!empty($using_permalink)) {
93
+ if(is_page()) {
94
+ echo '<a href="'.$permalink.'printpage/" title="Print This Page" rel="nofollow">'.$print_image.'</a>';
95
+ } else {
96
+ echo '<a href="'.$permalink.'print/" title="Print This Post" rel="nofollow">'.$print_image.'</a>';
97
+ }
98
+ } else {
99
+ echo '<a href="'.$permalink.'&amp;print=1" title="Print This Post/Page" rel="nofollow">'.$print_image.'</a>';
100
+ }
101
+ }
102
+
103
+
104
+ ### Function: Print Content
105
+ function print_content($display = true) {
106
+ global $links_text, $link_number, $pages, $multipage, $numpages, $post;
107
+ $max_url_char = 80;
108
+ if(!empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) {
109
+ $content = get_the_password_form();
110
+ } else {
111
+ if($multipage) {
112
+ for($page = 0; $page < $numpages; $page++) {
113
+ $content .= $pages[$page];
114
+ }
115
+ } else {
116
+ $content = $pages[0];
117
+ }
118
+ $content = apply_filters('the_content', $content);
119
+ $content = str_replace(']]>', ']]&gt;', $content);
120
+ if(!print_can('images')) {
121
+ $content = remove_image($content);
122
+ }
123
+ if(print_can('links')) {
124
+ preg_match_all('/<a(.+\s?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
125
+ for ($i=0; $i < count($matches[0]); $i++) {
126
+ $link_match = $matches[0][$i];
127
+ $link_number++;
128
+ $link_url = $matches[2][$i];
129
+ $link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('home') . $link_url : $link_url;
130
+ $link_text = $matches[4][$i];
131
+ $content = str_replace_one($link_match, '['.$link_number."] <a href=\"$link_url\" rel=\"external\">".$link_text.'</a>', $content);
132
+ if(strlen($link_url) > 100) {
133
+ $link_url = chunk_split($link_url, 100, "<br />\n");
134
+ }
135
+ if(preg_match('/<img(.+?)src=\"(.+?)\"(.*?)>/',$link_text)) {
136
+ $links_text .= '<br />['.$link_number.'] '.__('Image').': <b>'.$link_url.'</b>';
137
+ } else {
138
+ $links_text .= '<br />['.$link_number.'] '.$link_text.': <b>'.$link_url.'</b>';
139
+ }
140
+ }
141
+ }
142
+ }
143
+ if($display) {
144
+ echo $content;
145
+ } else {
146
+ return $content;
147
+ }
148
+ }
149
+
150
+
151
+ ### Function: Print Categories
152
+ function print_categories($before = '', $after = '') {
153
+ $temp_cat = strip_tags(get_the_category_list(',' , $parents));
154
+ $temp_cat = explode(', ', $temp_cat);
155
+ $temp_cat = implode($after.', '.$before, $temp_cat);
156
+ echo $before.$temp_cat.$after;
157
+ }
158
+
159
+
160
+ ### Function: Print Comments Content
161
+ function print_comments_content($display = true) {
162
+ global $links_text, $link_number;
163
+ $content = get_comment_text();
164
+ $content = apply_filters('comment_text', $content);
165
+ if(!print_can('images')) {
166
+ $content = remove_image($content);
167
+ }
168
+ if(print_can('links')) {
169
+ preg_match_all('/<a(.+\s?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
170
+ for ($i=0; $i < count($matches[0]); $i++) {
171
+ $link_match = $matches[0][$i];
172
+ $link_number++;
173
+ $link_url = $matches[2][$i];
174
+ $link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('home') . $link_url : $link_url;
175
+ $link_text = $matches[4][$i];
176
+ $content = str_replace_one($link_match, '['.$link_number."] <a href=\"$link_url\" rel=\"external\">".$link_text.'</a>', $content);
177
+ if(strlen($link_url) > 100) {
178
+ $link_url = chunk_split($link_url, 100, "<br />\n");
179
+ }
180
+ if(preg_match('/<img(.+?)src=\"(.+?)\"(.*?)>/',$link_text)) {
181
+ $links_text .= '<br />['.$link_number.'] '.__('Image').': <b>'.$link_url.'</b>';
182
+ } else {
183
+ $links_text .= '<br />['.$link_number.'] '.$link_text.': <b>'.$link_url.'</b>';
184
+ }
185
+ }
186
+ }
187
+ if($display) {
188
+ echo $content;
189
+ } else {
190
+ return $content;
191
+ }
192
+ }
193
+
194
+
195
+ ### Function: Print Comments
196
+ function print_comments_number() {
197
+ global $post;
198
+ $comment_text = '';
199
+ $comment_status = $post->comment_status;
200
+ if($comment_status == 'open') {
201
+ $num_comments = get_comments_number();
202
+ if($num_comments == 0) {
203
+ $comment_text = __('No Comments');
204
+ } elseif($num_comments == 1) {
205
+ $comment_text = __('1 Comment');
206
+ } else {
207
+ $comment_text = __($num_comments.' Comments');
208
+ }
209
+ } else {
210
+ $comment_text = __('Comments Disabled');
211
+ }
212
+ if(!empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) {
213
+ _e('Comments Hidden');
214
+ } else {
215
+ echo $comment_text;
216
+ }
217
+ }
218
+
219
+
220
+ ### Function: Print Links
221
+ function print_links($text_links = 'URLs in this post:') {
222
+ global $links_text;
223
+ if(!empty($links_text)) {
224
+ echo $text_links.$links_text;
225
+ }
226
+ }
227
+
228
+
229
+ ### Function: Load WP-Print
230
+ add_action('template_redirect', 'wp_print');
231
+ function wp_print() {
232
+ if(intval(get_query_var('print')) == 1) {
233
+ include(ABSPATH.'wp-content/plugins/print/wp-print.php');
234
+ exit;
235
+ }
236
+ }
237
+
238
+
239
+ ### Function: Add Print Comments Template
240
+ function print_template_comments($file = '') {
241
+ $file = ABSPATH.'wp-content/plugins/print/wp-print-comments.php';
242
+ return $file;
243
+ }
244
+
245
+
246
+ ### Function: Print Page Title
247
+ function print_pagetitle($print_pagetitle) {
248
+ return '&raquo; Print'.$print_pagetitle;
249
+ }
250
+
251
+
252
+ ### Function: Can Print?
253
+ function print_can($type) {
254
+ $print_options = get_settings('print_options');
255
+ return intval($print_options[$type]);
256
+ }
257
+
258
+
259
+ ### Function: Remove Image From Text
260
+ function remove_image($content) {
261
+ $content= preg_replace('/<img(.+?)src=\"(.+?)\"(.*?)>/', '',$content);
262
+ return $content;
263
+ }
264
+
265
+
266
+ ### Function: Replace One Time Only
267
+ function str_replace_one($search, $replace, $content){
268
+ if ($pos = strpos($content, $search)) {
269
+ return substr($content, 0, $pos).$replace.substr($content, $pos+strlen($search));
270
+ } else {
271
+ return $content;
272
+ }
273
+ }
274
+
275
+
276
+ ### Function: Print Options
277
+ add_action('activate_print/print.php', 'print_init');
278
+ function print_init() {
279
+ // Add Options
280
+ $print_options = array();
281
+ $print_options['comments'] = 0;
282
+ $print_options['links'] = 1;
283
+ $print_options['images'] = 1;
284
+ add_option('print_options', $print_options, 'Print Options');
285
+ }
286
+ ?>
print/wp-print-comments.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.0 Plugin: WP-Print 2.06 |
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(get_settings("date_format").' @ '.get_settings("time_format")); ?></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,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.0 Plugin: WP-Print 2.06 |
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
+ <meta name="Robots" content="noindex" />
36
+ <style type="text/css" media="screen, print">
37
+ Body {
38
+ font-family: Verdana, Arial, Tahoma;
39
+ font-size: 12px;
40
+ color: #000000;
41
+ }
42
+ #Outline {
43
+ text-align: left;
44
+ width: 90%;
45
+ margin-left: auto;
46
+ margin-right: auto;
47
+ padding: 10px;
48
+ border: 1px solid #000000;
49
+ }
50
+ #BlogTitle {
51
+ font-weight: bold;
52
+ font-size: 16px;
53
+ margin-bottom: 5px;
54
+ }
55
+ #BlogDate {
56
+ margin-top: 5px;
57
+ margin-bottom: 10px;
58
+ }
59
+ #BlogContent {
60
+ padding: 10px;
61
+ margin-top: 10px;
62
+ }
63
+ HR.Divider {
64
+ width: 80%;
65
+ height: 1px;
66
+ color: #000000;
67
+ }
68
+ #CommentTitle {
69
+ font-weight: bold;
70
+ font-size: 16px;
71
+ padding-bottom: 10px;
72
+ }
73
+ .CommentDate {
74
+ margin-top: 5px;
75
+ margin-bottom: 10px;
76
+ }
77
+ .CommentContent {
78
+ padding: 2px 10px 10px 10px;
79
+ }
80
+ </style>
81
+ </head>
82
+ <body>
83
+ <p align="center"><b>- <?php bloginfo('name'); ?> - <?php bloginfo('url')?> -</b></p>
84
+ <center>
85
+ <div id="Outline">
86
+ <?php if (have_posts()): ?>
87
+ <?php while (have_posts()): the_post(); ?>
88
+ <p id="BlogTitle"><?php the_title(); ?></p>
89
+ <p id="BlogDate">Posted By <u><?php the_author(); ?></u> On <?php the_time(get_settings("date_format").' @ '.get_settings("time_format")); ?> In <?php print_categories('<u>', '</u>'); ?> | <u><?php print_comments_number(); ?></u></p>
90
+ <div id="BlogContent"><?php print_content(); ?></div>
91
+ <?php endwhile; ?>
92
+ <hr class="Divider" align="center" />
93
+ <?php if(print_can('comments')): ?>
94
+ <?php comments_template(); ?>
95
+ <?php endif; ?>
96
+ <p align="left">Article printed from <?php bloginfo('name'); ?>: <b><?php bloginfo('url'); ?></b></p>
97
+ <p align="left">URL to article: <b><?php the_permalink(); ?></b></p>
98
+ <?php if(print_can('links')): ?>
99
+ <p align="left"><?php print_links(); ?></p>
100
+ <?php endif; ?>
101
+ <p align="right">Click <a href="#Print" onclick="window.print(); return false;" title="Click here to print.">here</a> to print.</p>
102
+ <?php else: ?>
103
+ <p align="center">No posts matched your criteria.</p>
104
+ <?php endif; ?>
105
+ </div>
106
+ </center>
107
+ </body>
108
+ </html>
readme.html ADDED
@@ -0,0 +1,390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.06 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.06&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.06%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="http://www.lesterchan.net/wordpress/2006/07/05/donations/print/" title="http://www.lesterchan.net/wordpress/2006/07/05/donations/print/">http://www.lesterchan.net/wordpress/2006/07/05/donations/print/</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 October 2006</p>
214
+ <div class="SubSubTitle">Changelog</div>
215
+ <ul>
216
+ <li>
217
+ <b>Version 2.06 (01-10-2006)</b>
218
+ <ul>
219
+ <li>NEW: Used Default Date/Time Format Under WordPress Options</li>
220
+ <li>NEW: Added robots: noindex To Printer Friendly Pages</li>
221
+ <li>NEW: Added rel="nofollow" To All Links Generated By WP-Print</li>
222
+ <li>FIXED: &lt;abbr&gt; Tag Mixed Up With &lt;a&gt;</li>
223
+ <li>FIXED: PHP5 Compatibility Issue</li>
224
+ <li>FIXED: Long URL Will Not Break Into More Than 1 Line</li>
225
+ </ul>
226
+ </li>
227
+ <li>
228
+ <b>Version 2.05 (01-06-2006)</b>
229
+ <ul>
230
+ <li>NEW: Added Print Options In WP Administration Panel Under 'Options -> Print'</li>
231
+ <li>NEW: Print Administration Panel And The Code That WP-Print Generated Is XHTML 1.0 Transitional</li>
232
+ <li>FIXED: Comment's Content Formatting</li>
233
+ </ul>
234
+ </li>
235
+ <li>
236
+ <b>Version 2.04 (01-04-2006)</b>
237
+ <ul>
238
+ <li>NEW: Able To Print Comments Together With Post Using $can_print_comments In wp-print.php</li>
239
+ <li>NEW: Moved wp-print.php To Plugin Folder</li>
240
+ <li>FIXED: Removed Link From Post Comment Count And Post Category</li>
241
+ </ul>
242
+ </li>
243
+ <li>
244
+ <b>Version 2.03 (01-03-2006)</b>
245
+ <ul>
246
+ <li>NEW: Added Print Image With print_link_image()</li>
247
+ <li>NEW: Automatically Break To Next Line If Link Contains More Than 100 Chars</li>
248
+ <li>FIXED: Comment Numbers Showing In Password Protected Post</li>
249
+ </ul>
250
+ </li>
251
+ <li>
252
+ <b>Version 2.02 (01-02-2006)</b>
253
+ <ul>
254
+ <li>FIXED: Able To View Password Protected Blog</li>
255
+ </ul>
256
+ </li>
257
+ <li>
258
+ <b>Version 2.01 (01-01-2006)</b>
259
+ <ul>
260
+ <li>NEW: Compatible With WordPress 2.0</li>
261
+ <li>NEW: Automatically Detect Whether You Are Using Nice Permalink</li>
262
+ <li>NEW: Automated Permalink</li>
263
+ <li>NEW: Now You Only Need To Insert 1 Line Into Your index.php Of Your Theme</li>
264
+ <li>NEW: GPL License Added</li>
265
+ <li>FIXED: Links Not Displaying Properly When Printing More Than 1 Post On A Single Page</li>
266
+ </ul>
267
+ </li>
268
+ <li>
269
+ <b>Version 2.00a (17-11-2005)</b>
270
+ <ul>
271
+ <li>NEW: Permlink For The Page Feature</li>
272
+ </ul>
273
+ </li>
274
+ <li>
275
+ <b>Version 2.00 (10-11-2005)</b>
276
+ <ul>
277
+ <li>NEW: Print Out A Summary Of URLS In The Post At The Bottom Of The Page</li>
278
+ </ul>
279
+ </li>
280
+ </ul>
281
+ </div>
282
+
283
+ <!-- Installation Instructions -->
284
+ <div id="Install" style="display: none;">
285
+ <div class="SubTitle">&raquo; Installation Instructions</div>
286
+ <ol>
287
+ <li>
288
+ Open <b>wp-content/plugins</b> Folder
289
+ </li>
290
+ <li>
291
+ Put:
292
+ <blockquote>Folder: print</blockquote>
293
+ </li>
294
+ <li>
295
+ <b>Activate</b> WP-Print Plugin
296
+ </li>
297
+ <li>
298
+ You MAY Need To Re-Generate The Permalink (<b>Options -> Permalinks Options -> Update Permalink Structure</b>)
299
+ </li>
300
+ <li>
301
+ Refer To <b>Usage</b> For Further Instructions
302
+ </li>
303
+ </ol>
304
+ </div>
305
+
306
+ <!-- Upgrade Instructions -->
307
+ <div id="Upgrade" style="display: none;">
308
+ <div class="SubTitle">&raquo; Upgrade Instructions</div>
309
+ <div class="SubSubTitle">From v2.0x To v2.06</div>
310
+ <ol>
311
+ <li>
312
+ <b>Deactivate</b> WP-Print Plugin
313
+ </li>
314
+ <li>
315
+ Open <b>wp-content/plugins</b> Folder
316
+ </li>
317
+ <li>
318
+ Overwrite:
319
+ <blockquote>Folder: print</blockquote>
320
+ </li>
321
+ <li>
322
+ <b>Activate</b> WP-Print Plugin
323
+ </li>
324
+ </ol>
325
+ <div class="SubSubTitle">From v1.0x To v2.06</div>
326
+ <ol>
327
+ <li>
328
+ <b>Deactivate</b> WP-Print Plugin
329
+ </li>
330
+ <li>
331
+ Open <b>wp-content/plugins</b> Folder
332
+ </li>
333
+ <li>
334
+ Delete:
335
+ <blockquote>File: print.php</blockquote>
336
+ </li>
337
+ <li>
338
+ Put:
339
+ <blockquote>Folder: print</blockquote>
340
+ </li>
341
+ <li>
342
+ Open <b>Root WordPress</b> Folder
343
+ </li>
344
+ <li>
345
+ Delete:
346
+ <blockquote>File: wp-print.php</blockquote>
347
+ </li>
348
+ <li>
349
+ <b>Activate</b> WP-Print Plugin
350
+ </li>
351
+ <li>
352
+ You MAY Need To Re-Generate The Permalink (<b>Options -> Permalinks Options -> Update Permalink Structure</b>)
353
+ </li>
354
+ <li>
355
+ Refer To <b>Usage</b> For Further Instructions
356
+ </li>
357
+ </ol>
358
+ </div>
359
+
360
+ <!-- Usage Instructions -->
361
+ <div id="Usage" style="display: none;">
362
+ <div class="SubTitle">&raquo; Usage Instructions</div>
363
+ <div class="SubSubTitle">General Usage</div>
364
+ <ol>
365
+ <li>
366
+ Open <b>wp-content/themes/&lt;YOUR THEME NAME&gt;/index.php</b>
367
+ <p>You may place it in <b>single.php</b>, <b>post.php</b> or <b>page.php</b> also.</p>
368
+ </li>
369
+ <li>
370
+ Find:
371
+ <blockquote>
372
+ &lt;?php while (have_posts()) : the_post(); ?&gt;
373
+ </blockquote>
374
+ </li>
375
+ <li>
376
+ Add Anywhere Below It:
377
+ <blockquote>
378
+ &lt;?php if(function_exists('wp_print')) { print_link(); } ?&gt;
379
+ </blockquote>
380
+ <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>
381
+ <p>Default: print_link('Print This Post', 'Print This Page')</p>
382
+ <p>If you want to use an image/icon instead, replace print_link(); with <b>print_link_image();</b></p>
383
+ </li>
384
+ </ol>
385
+ </div>
386
+ </div>
387
+ </div>
388
+ <p id="Copyright">WP-Print 2.06<br />Copyright &copy; 2006 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
389
+ </body>
390
+ </html>