Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 241 lines (157 sloc) 10.646 kb
d30edda @ericmann Initial commit.
authored
1 === WP Publication Archive ===
2 Contributors: ericmann
9037f37 @ericmann Version Update
authored
3 Donate link: http://jumping-duck.com/wordpress/plugins
d30edda @ericmann Initial commit.
authored
4 Tags: document management, pdf, doc, archive
e9eb330 @ericmann Update upgrade notice
authored
5 Requires at least: 3.5
6 Tested up to: 3.6
0cf3bee @ericmann Version bump
authored
7 Stable tag: 3.0.1
006e418 @ericmann Update Thumbnail Documentation
authored
8 License: GPLv2
d30edda @ericmann Initial commit.
authored
9
10 Allows users to upload, manage, search, and download publications, documents, and similar content (PDF, Power-Point, etc.).
11
12 == Description ==
13
006e418 @ericmann Update Thumbnail Documentation
authored
14 WP Publication Archive adds a custom content type for storing, tagging, and categorizing downloadable content external to standard WordPress posts and pages. You can add downloadable PDF files, Word documents, and PowerPoint presentations. These files will be stored in the standard WordPress uploads directory but will be managed separately through a custom post type interface in the WordPress admin area.
13f7478 @ericmann Update readme and version numbers
authored
15
d30edda @ericmann Initial commit.
authored
16 == Installation ==
17
18 1. Upload the entire `wp-publication-archive` folder to the `/wp-content/plugins/` directory
19 1. Activate the plugin through the 'Plugins' menu in WordPress
20 1. Use the "Add Publications" menu to begin adding publications.
21 1. Use the built-in menu system to manage your publications.
22
23 == Frequently Asked Questions ==
24
25 = How do I upload a new file? =
26
006e418 @ericmann Update Thumbnail Documentation
authored
27 **Option 1:** Use the built-in media uploader on the "Add Publication" screen.
28
29 **Option 2:** Upload a file to your server via FTP (or to a remote host like AWS) and place the *full* URL (including the `http://`) in the Publication field on the Edit Publication page.
d30edda @ericmann Initial commit.
authored
30
31 = How do I list my publications? =
32
33 You can display a list of publications either by includeing the [wp-publication-archive] shortcode on a post/page or by placing <?php wp_publication_archive(); ?> in your theme template files. WordPress will render your publication list automatically.
34
f902d02 @ericmann Add Dropdown Template
authored
35 = Can I show publications in a dropdown rather than as a list? =
36
37 Yes! Simply add `showas="dropdown"` as a parameter within the regular shortcode, and the plugin will use a dropdown template rather than a list template. For example:
38
39 [wp-publication-archive showas="dropdown" /]
40
796d686 @ericmann Adding author filter to shortcode.
authored
41 = Can I filter the list by category =
42
006e418 @ericmann Update Thumbnail Documentation
authored
43 Yes! Just include `categories="cat1,cat2"` in your shortcode where "cat1" and "cat2" are the *names* of the categories you want to display.
796d686 @ericmann Adding author filter to shortcode.
authored
44
45 = Can I filter the list by author? =
46
47 Yes! Just include `author="author-name"` in your shortcode where "author-name" is the *slug* of the author you want to display.
48
d30edda @ericmann Initial commit.
authored
49 = What File Types are Available =
50
51 By default, the plug-in contains icons for several common file types. The icons include:
52
53 - Standard document files
54 - Spreadsheet formats (i.e. Excel, Open Office Calc)
55 - Video
56 - Image
57 - Audio
58 - Adobe PDF
59 - Zip
60
61 All other file types will feature a generic "file" icon.
62
815a94e @ericmann URL Masking
authored
63 = Some of my files aren't downloading. What's wrong? =
64
65 There could be any of a hundred causes for this. Most likely, your files are just too large to be handled by your server.
66
67 By default, both file opens and downloads are streamed to your server. This means the plugin will attempt to open the file (whether it's remote or locally-hosted) and will stream the contents of the file to the browser. This has the advantage of never exposing the raw download URL to the user.*
68
69 Unfortunately, it means your server has to download the file first before it can pass it along to the user. For smaller files, this isn't an issue. But for much larger files, connections can time out.
70
71 If you are serving large files, you can force the **file open** URL to forward connections rather than stream them. This means requests to your file open URL (i.e. `http://site.com/publication/title/wppa_open`) will receive a 303 "See Other" redirect pointing them to the original resource. It's less work for your server, but the end user *will* see the original URL.
72
73 Just add `add_filter( 'wppa_mask_url', '__return_false' );` to your `functions.php` file to turn off URL masking and use the redirect method instead.
74
75 When you add this filter, the **file download** URL will behave the exact same way - redirecting requests to the original resource rather than streaming the file to the browser. Unfortunately, this leaves the exact behavior of the link up to the browser - some will attempt to download the file, some will open it instead.
76
77 * A future version of the plugin will allow you to have password-protected downloads. Hiding the raw URL of a file is important for this feature to work.
78
006e418 @ericmann Update Thumbnail Documentation
authored
79 = How do I use the thumbnail feature? =
80
81 Thumbnail support is extended through the plugin, but not actually implemented in any templates. You can upload a custom thumbnail for each Publication, and the URL will be stored in the Publication's meta field in the database under the `wpa-upload_image` key.
82
83 You can get the raw thumbnail URL by requesting it directly with `get_post_meta()`. Alternatively, the `WP_Publication_Archive_Item` class contains some useful helper methods for printing the thumbnail URL wrapped in proper HTML tags. You can use code similar to the following:
84
85 <?php
86 $pub = get_post( $publication_id );
87 $pub = new WP_Publication_Archive_Item( $pub->ID, $pub->post_title, $pub->post_date );
88
89 // Return the Publication thumbnail for use elsewhere
90 $thumb = $pub->get_the_thumbnail();
91
92 // Echo/print the thumbnail to the browser
93 $pub->the_thumbnail();
94
95 These helper methods will generate HTML tags similar to:
96
97 <div class="publication_thumbnail">
98 <img src="http://site.com/thumbnail.png" />
99 </div>
100
101 Also, the actual thumbnail URL printed will be passed through a filter. You can intercept this and do whatever you need to with the URL (add query arguments, switch http/https protocols, etc).
102
103 add_filter( 'wpa-upload_image', 'your_custom_function', 10, 2 );
104
105 The filter passes two arguments, the raw URL for the thumbnail and the ID of the publication.
106
d08b75f @ericmann Better MIME Type Handling
authored
107 = Why are some files downloaded even though I clicked "open?" =
108
109 The open behavior is 100% dependent on your browser. In some cases (i.e. PDFs) the file will open in the browser using a built-in viewer. In other cases (i.e. Zips) there is no in-browser viewer for that file type, so the browser will download the file instead.
110
111 The plugin makes every attempt possible to return the correct MIME type for each file so that the browser know what to do with it. But in some cases (i.e. Zips or unknown file types), the plugin will return a type of `application/octet-stream` which the browser sees as a generic file and just downloads to a generic, often extensonless, filename.
112
113 If you're coming up against a situation like this, I recommend you use the Download link instead.
114
d30edda @ericmann Initial commit.
authored
115 == Screenshots ==
116
117 No screenshots are available at this time.
118
119 == Changelog ==
120
0cf3bee @ericmann Version bump
authored
121 = 3.0.1
122 * Revert the dropdown template's file opening functionality to auto-open the file
123
4ef90a9 @ericmann Add Admin Notices
authored
124 = 3.0 =
125 * Add publication landing pages (with template)
126 * Add publication archive pages (with template)
127 * Update streaming methods to use `readfile()`
128 * Allow category archives for publications
129 * Add category count widget for publications
130 * Add related publication sidebar widget
131 * Update content field to store summary in post content
132
08fdff4 @ericmann Version Bump
authored
133 = 2.5.7.2 =
134 * Fix a short PHP open tag.
135
ae2a97b @ericmann Version bump for hotfix 2.5.7.1
authored
136 = 2.5.7.1 =
137 * Hotfix to correct a search term issue.
138
1a9285f @ericmann Version bump.
authored
139 = 2.5.7 =
140 * Normalize PHP file endings to remove extra whitespace.
141
528a898 @ericmann Version bump
authored
142 = 2.5.6 =
143 * Fix a data sanitation but that was mistakenly removing links from publication summaries.
144
bf97c28 @ericmann Fix an Include. Allow _blank
authored
145 = 2.5.5 =
146 * Fix a broken include path for the Widget.
147 * Allow targetting a blank tab/window with the `wp_pubarch_open_in_blank` filter.
148
7f8be56 @ericmann Fix a Plugin Conflict
authored
149 = 2.5.4 =
150 * Convert `wppa_` function and translation prefix to `wp_pubarch_` to avoid a conflict with WP Photo Album +.
151 * Update strings
152
24adb1a @ericmann Re-add a Deprecated Filter
authored
153 = 2.5.3 =
154 * Re-add a deprecated tag that I thought no one was actually using.
155
c687980 @ericmann Bump version
authored
156 = 2.5.2 =
157 * Fix an issue caused by unnecessary whitespace.
158
4214816 @ericmann Silence a Warning
authored
159 = 2.5.1 =
160 * Add some checking to prevent All-in-One Event Calendar from triggering a warning with an improper filter call.
161
9037f37 @ericmann Version Update
authored
162 = 2.5 =
815a94e @ericmann URL Masking
authored
163 * Removed antiquated openfile.php (allow direct file downloads).
08c48e5 @ericmann Dynamic Templating
authored
164 * Made the publication list template-ready.
22372d6 @ericmann Open and Download links
authored
165 * Change the "download" link to a pair of "download" or "open" links.
c67dfed @ericmann Custom Search
authored
166 * Included publication description in WordPress search.
815a94e @ericmann URL Masking
authored
167 * Enable URL masking for file downloads.
9037f37 @ericmann Version Update
authored
168
904d779 @ericmann Initial merge of changes from #7. Works - but can't add a publication…
authored
169 = 2.3.4 =
170 * Add thumbnail support
171
b734f2b Fixing a typo and tagging 2.3.3
Eric Mann authored
172 = 2.3.3 =
173 * Immediate fix to a typo
174
796d686 @ericmann Adding author filter to shortcode.
authored
175 = 2.3.2.1 =
176 * Add "author" filter to shortcode
177
4856c1b @ericmann Updating readme.
authored
178 = 2.3.2 =
179 * Fixes pagination bug
180 * Fixes issue where some installations could not load files starting with "http://"
181
65bfc9c @ericmann Update version #s and fix DIV issue.
authored
182 = 2.3.1 =
183 * URGENT SECURITY UPDATE
184 * Fix some outstanding bugs
185
13f7478 @ericmann Update readme and version numbers
authored
186 = 2.3 =
187 * Add publications to standard WordPress search results
188
029e66c @ericmann Update readme
authored
189 = 2.2 =
190 * Add pagination for more than 10 publications
32746d9 @ericmann Tagging stable in readme
authored
191 * Add category filter to shortcode
029e66c @ericmann Update readme
authored
192
ab01340 @ericmann Remove an extra space that was causing a PHP parsing error.
authored
193 = 2.1.1 =
194 * Remove an extra space that was throwing a PHP parsing error
195
519aef9 @ericmann * Remove erroneous CSS declaration from post/page edit screens
authored
196 = 2.1.0 =
197 * Remove erroneous CSS declaration from post/page edit screens
198 * Silence a $_POST[] error
199 * Fix a typo on displaying the list of archived files
200 * Adds simple pagination
201
edace4e @ericmann Fix bootstrap function.
authored
202 = 2.0.1 =
203 * Fix PHP error in bootstrap function
204
d30edda @ericmann Initial commit.
authored
205 = 2.0 =
206 * Rewrite plug-in to use custom post types rather than extra database tables
207 * Add new UI for adding publications
208 * Hard-code file type icons
209
210 = 1.1.1 =
211 * Minor repairs to abanoned script to make it compatible with WP>2.5
212
213 = 1.1 =
214 * Original release of WP Publications Archive by Luis Lino
215
216 == Upgrade Notice ==
217
e9eb330 @ericmann Update upgrade notice
authored
218 = 3.0 =
219 Please flush your permalinks by visiting the Settings >> Permalinks page in WordPress, otherwise your download links WILL NOT WORK.
220
006e418 @ericmann Update Thumbnail Documentation
authored
221 = 2.5 =
222 Major changes have been made to the way publications are linked and downloaded. If you had previously changed any code for `openfile.php` or the linking/downloading mechanism, be prepared to manually update your Publications should any of them break.
223
65bfc9c @ericmann Update version #s and fix DIV issue.
authored
224 = 2.3.1 =
225 URGENT SECURITY UPDATE!!!
226
029e66c @ericmann Update readme
authored
227 = 2.2 =
228 This version will *only* work with PHP 5 or above!
229
d30edda @ericmann Initial commit.
authored
230 = 2.0 =
231 Upgrading from 1.1 or 1.1.1 to 2.0 will *not* automatically transfer your publications to the new system.
232
233 == Licenses ==
234
71fef58 @ericmann License Update
authored
235 WP Publication Archive is licensed under the GNU General Public License, version 2.
d30edda @ericmann Initial commit.
authored
236
237 This system was based on the original wp-publications-archive plug-in published by Luis Lino and Siemens Networks, S.A. at http://code.google.com/p/wp-publications-archive/.
238
239 The filing cabinet menu icon was created by Glyphish (http://glyphish.com) and is distributed under a Creative Commons Attribution license.
240
241 Filetype icons come from the Crystal Project (http://www.everaldo.com/crystal/) released under the LGPL (http://www.everaldo.com/crystal/?action=license).
Something went wrong with that request. Please try again.