Version Description
- Installation bug fix.
Download this release
Release Info
Developer | k3davis |
Plugin | Google Doc Embedder |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.3
- gviewer.php +4 -2
- readme.txt +10 -3
gviewer.php
CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Google Doc Embedder
|
|
5 |
Plugin URI: http://wordpress.org/extend/plugins/google-document-embedder/
|
6 |
Description: Lets you embed PDF files and PowerPoint presentations in a page or post using the Google Document Viewer.
|
7 |
Author: Kevin Davis
|
8 |
-
Version: 1.0
|
9 |
*/
|
10 |
|
11 |
/* Copyright 2009 Kevin Davis. E-mail: kev@tnw.org
|
@@ -24,6 +24,8 @@ Version: 1.0
|
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
|
|
|
|
27 |
// usage: [gview file="http://path.to/file.pdf" save="1" width="600" height="500"]
|
28 |
function gviewer_func($atts) {
|
29 |
|
@@ -103,7 +105,7 @@ function gde_option_page() {
|
|
103 |
add_options_page(t('GDE Settings'), t('GDE Settings'), 'administrator', basename(__FILE__), 'gde_options');
|
104 |
}
|
105 |
function gde_options() {
|
106 |
-
if ( function_exists('current_user_can') && !current_user_can('manage_options') ) die(t('
|
107 |
if (! user_can_access_admin_page()) wp_die( t('You do not have sufficient permissions to access this page') );
|
108 |
|
109 |
require(ABSPATH. '/wp-content/plugins/google-document-embedder/options.php');
|
5 |
Plugin URI: http://wordpress.org/extend/plugins/google-document-embedder/
|
6 |
Description: Lets you embed PDF files and PowerPoint presentations in a page or post using the Google Document Viewer.
|
7 |
Author: Kevin Davis
|
8 |
+
Version: 1.0.3
|
9 |
*/
|
10 |
|
11 |
/* Copyright 2009 Kevin Davis. E-mail: kev@tnw.org
|
24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
27 |
+
include('wpframe.php');
|
28 |
+
|
29 |
// usage: [gview file="http://path.to/file.pdf" save="1" width="600" height="500"]
|
30 |
function gviewer_func($atts) {
|
31 |
|
105 |
add_options_page(t('GDE Settings'), t('GDE Settings'), 'administrator', basename(__FILE__), 'gde_options');
|
106 |
}
|
107 |
function gde_options() {
|
108 |
+
if ( function_exists('current_user_can') && !current_user_can('manage_options') ) die(t('An error occurred.'));
|
109 |
if (! user_can_access_admin_page()) wp_die( t('You do not have sufficient permissions to access this page') );
|
110 |
|
111 |
require(ABSPATH. '/wp-content/plugins/google-document-embedder/options.php');
|
readme.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
=== Google Doc Embedder ===
|
2 |
Contributors: k3davis
|
|
|
3 |
Tags: pdf, ppt, powerpoint, google, embed, google docs, document
|
4 |
Requires at least: 2.5
|
5 |
Tested up to: 2.9-rare
|
@@ -23,12 +24,12 @@ Note: This plugin utilizes an undocumented feature of the Google Document viewer
|
|
23 |
|
24 |
For basic usage, please see the FAQ.
|
25 |
|
26 |
-
Go to "GDE Settings" (under "Settings"
|
27 |
|
28 |
== Frequently Asked Questions ==
|
29 |
|
30 |
= What file types can be embedded? =
|
31 |
-
This
|
32 |
|
33 |
= How do I embed a file in my page or post? =
|
34 |
Use the custom shortcode `[gview]` to embed the file, as shown:
|
@@ -38,13 +39,16 @@ Use the custom shortcode `[gview]` to embed the file, as shown:
|
|
38 |
|
39 |
Optional attributes:
|
40 |
|
41 |
-
* `save=` : Set to 0 if you wish to suppress the direct download link to the file under the embedded viewer
|
42 |
* `width=` : To override the default width of the viewer, enter a new width value (number in pixels)
|
43 |
* `height=` : To override the default height of the viewer, enter a new height value (number in pixels)
|
44 |
|
45 |
= Nothing is showing up! What do I do? =
|
46 |
View the source on the web page where you've embedded the viewer. In order to degrade gracefully in case an error occurs, error messages will be inserted as HTML comments in these pages at the spot the viewer is called.
|
47 |
|
|
|
|
|
|
|
48 |
== Screenshots ==
|
49 |
|
50 |
1. Appearance of embedded viewer (blank file)
|
@@ -52,6 +56,9 @@ View the source on the web page where you've embedded the viewer. In order to de
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
55 |
= 1.0 =
|
56 |
* Added options page.
|
57 |
|
1 |
=== Google Doc Embedder ===
|
2 |
Contributors: k3davis
|
3 |
+
Donate link: http://pledgie.com/campaigns/6048
|
4 |
Tags: pdf, ppt, powerpoint, google, embed, google docs, document
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.9-rare
|
24 |
|
25 |
For basic usage, please see the FAQ.
|
26 |
|
27 |
+
Go to "GDE Settings" (under "Settings" in the admin panel) to change defaults, or override individually using the shortcode syntax in the FAQ.
|
28 |
|
29 |
== Frequently Asked Questions ==
|
30 |
|
31 |
= What file types can be embedded? =
|
32 |
+
This plug-in can embed PDF or PPT files only. The file to embed must first be available somewhere on the internet. You can upload it to your WordPress site using the standard techniques, or link to a file on another site. **You do not need to save the file in Google Documents first to embed it.**
|
33 |
|
34 |
= How do I embed a file in my page or post? =
|
35 |
Use the custom shortcode `[gview]` to embed the file, as shown:
|
39 |
|
40 |
Optional attributes:
|
41 |
|
42 |
+
* `save=` : Set to 0 if you wish to suppress the direct download link to the file under the embedded viewer (1 for on, by default)
|
43 |
* `width=` : To override the default width of the viewer, enter a new width value (number in pixels)
|
44 |
* `height=` : To override the default height of the viewer, enter a new height value (number in pixels)
|
45 |
|
46 |
= Nothing is showing up! What do I do? =
|
47 |
View the source on the web page where you've embedded the viewer. In order to degrade gracefully in case an error occurs, error messages will be inserted as HTML comments in these pages at the spot the viewer is called.
|
48 |
|
49 |
+
= I wish the plug-in had feature XYZ... =
|
50 |
+
That's not a question ;) but if you have any particular ideas on further development of this plug-in, please <a href="http://wordpress.org/tags/google-document-embedder?forum_id=10#postform">post a message</a> and I'll see what I can do.
|
51 |
+
|
52 |
== Screenshots ==
|
53 |
|
54 |
1. Appearance of embedded viewer (blank file)
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 1.0.3 =
|
60 |
+
* Installation bug fix.
|
61 |
+
|
62 |
= 1.0 =
|
63 |
* Added options page.
|
64 |
|