Version Description
Removed a PHP file that was no longer being used by the plugin - this caused a false-positive security alert and caused the plugin to be removed from the repository temporarily.
Download this release
Release Info
Developer | danlester |
Plugin | Google Doc Embedder |
Version | 2.6.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.2 to 2.6.3
- gviewer.php +2 -2
- js/tb-newwin.php +0 -101
- readme.txt +12 -7
gviewer.php
CHANGED
@@ -8,7 +8,7 @@ Author: Kevin Davis, Dan Lester
|
|
8 |
Author URI: https://wordpress.org/plugins/google-document-embedder/
|
9 |
Text Domain: google-document-embedder
|
10 |
Domain Path: /languages/
|
11 |
-
Version: 2.6.
|
12 |
License: GPLv2
|
13 |
*/
|
14 |
|
@@ -38,7 +38,7 @@ License: GPLv2
|
|
38 |
*/
|
39 |
|
40 |
// boring init junk
|
41 |
-
$gde_ver = "2.6.
|
42 |
$gde_db_ver = "1.2"; // update also in gde_activate()
|
43 |
|
44 |
require_once( plugin_dir_path( __FILE__ ) . 'functions.php' );
|
8 |
Author URI: https://wordpress.org/plugins/google-document-embedder/
|
9 |
Text Domain: google-document-embedder
|
10 |
Domain Path: /languages/
|
11 |
+
Version: 2.6.3
|
12 |
License: GPLv2
|
13 |
*/
|
14 |
|
38 |
*/
|
39 |
|
40 |
// boring init junk
|
41 |
+
$gde_ver = "2.6.3";
|
42 |
$gde_db_ver = "1.2"; // update also in gde_activate()
|
43 |
|
44 |
require_once( plugin_dir_path( __FILE__ ) . 'functions.php' );
|
js/tb-newwin.php
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// access wp functions externally (allow translation)
|
4 |
-
require_once('../libs/lib-bootstrap.php');
|
5 |
-
|
6 |
-
if ( isset( $_GET['a'] ) && $_GET['a'] == "fs" ) {
|
7 |
-
$tip = __('View in full screen', 'google-document-embedder');
|
8 |
-
$func = "gdeFullScreen";
|
9 |
-
$ico = "openFullScreenButtonIcon";
|
10 |
-
} else {
|
11 |
-
$tip = __('Open in new window', 'google-document-embedder');
|
12 |
-
$func = "gdeNewWin";
|
13 |
-
$ico = "openInViewerButtonIcon";
|
14 |
-
}
|
15 |
-
|
16 |
-
if ( isset( $_GET['url'] ) ) {
|
17 |
-
$url = $_GET['url'];
|
18 |
-
if ( isset( $_GET['hl'] ) ) {
|
19 |
-
$lang = $_GET['hl'];
|
20 |
-
} else {
|
21 |
-
$lang = "";
|
22 |
-
}
|
23 |
-
} elseif ( isset( $_GET['p'] ) ) {
|
24 |
-
$allowPrint = true;
|
25 |
-
}
|
26 |
-
|
27 |
-
header("Content-type: text/javascript");
|
28 |
-
|
29 |
-
?>
|
30 |
-
/* override open in new window behavior */
|
31 |
-
|
32 |
-
if (top === self) {
|
33 |
-
// don't show button at all if this is already full screen
|
34 |
-
var dv = document.getElementById('controlbarOpenInViewerButton');
|
35 |
-
dv.style.display = "none";
|
36 |
-
} else {
|
37 |
-
// replace new window function
|
38 |
-
|
39 |
-
// get current button and title
|
40 |
-
var dv2 = document.getElementById('controlbarOpenInViewerButton');
|
41 |
-
var btntext = dv2.getAttribute("title");
|
42 |
-
|
43 |
-
// recreate button (change icon, tip, and function)
|
44 |
-
var dv1 = document.createElement("div");
|
45 |
-
dv1.setAttribute("id", "gdeControlbarOpenInViewerButton");
|
46 |
-
dv1.setAttribute("class", "goog-inline-block goog-toolbar-button-outer-box");
|
47 |
-
dv1.setAttribute("onclick", "<?php echo $func; ?>();");
|
48 |
-
|
49 |
-
<?php
|
50 |
-
// use WP language (not Google) for tooltip if full screen - this string doesn't exist in Google version
|
51 |
-
if ( isset( $_GET['a'] ) && $_GET['a'] == "fs" ) {
|
52 |
-
?>
|
53 |
-
dv1.setAttribute("title", "<?php echo $tip; ?>");
|
54 |
-
<?php
|
55 |
-
} else {
|
56 |
-
// use Google language version for new window, instead of WP language
|
57 |
-
?>
|
58 |
-
dv1.setAttribute("title", btntext);
|
59 |
-
<?php
|
60 |
-
}
|
61 |
-
?>
|
62 |
-
|
63 |
-
dv1.innerHTML = '<div class="goog-inline-block goog-toolbar-button-inner-box"><div id="<?php echo $ico; ?>" class="toolbar-button-icon"></div></div>';
|
64 |
-
|
65 |
-
// replace the button
|
66 |
-
var parentDiv = dv2.parentNode;
|
67 |
-
parentDiv.replaceChild(dv1, dv2);
|
68 |
-
}
|
69 |
-
|
70 |
-
function gdeFullScreen() {
|
71 |
-
// open
|
72 |
-
var thisIFrame = gdeGetUrl();
|
73 |
-
|
74 |
-
parent.window.location = thisIFrame;
|
75 |
-
}
|
76 |
-
|
77 |
-
function gdeNewWin() {
|
78 |
-
// open
|
79 |
-
var thisIFrame = gdeGetUrl();
|
80 |
-
|
81 |
-
window.open(thisIFrame, '_blank');
|
82 |
-
}
|
83 |
-
|
84 |
-
function gdeGetUrl() {
|
85 |
-
var thisIFrame = document.URL;
|
86 |
-
|
87 |
-
<?php
|
88 |
-
if ( isset( $allowPrint ) ) {
|
89 |
-
// load the stripped chrome viewer (with print button)
|
90 |
-
?>
|
91 |
-
thisIFrame = thisIFrame.replace("embedded=true", "chrome=true");
|
92 |
-
<?php
|
93 |
-
} elseif ( isset ( $url ) ) {
|
94 |
-
// use Google page, but allow opening in same window
|
95 |
-
?>
|
96 |
-
thisIFrame = "https://docs.google.com/viewer?url=" + "<?php echo $url; ?>&chrome=true&hl=<?php echo $lang; ?>";
|
97 |
-
<?php
|
98 |
-
}
|
99 |
-
?>
|
100 |
-
return thisIFrame;
|
101 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: danlester, k3davis
|
|
3 |
Tags: doc, docx, pdf, ppt, pptx, xls, office, powerpoint, google, document, embed
|
4 |
Author URI: https://wordpress.org/plugins/google-document-embedder/
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
|
@@ -13,13 +13,13 @@ Lets you embed PDF, MS Office, and many other file types in a web page using the
|
|
13 |
|
14 |
Google Doc Embedder lets you embed several types of files into your WordPress pages using the free Google Docs Viewer - allowing inline viewing (and optional downloading) of a wide range of popular file types, with no Flash or PDF browser plug-ins required.
|
15 |
|
16 |
-
> <strong>NOTE: Recent changes by Google to their viewer mean that some other plugins may be more suitable
|
17 |
>
|
18 |
> * If you are able to store your files in Google Drive, try the [Google Drive Embedder plugin](http://wp-glogin.com/wpgoogledoctodrive). This will be faster to display, and more reliable.
|
19 |
> * To make it difficult for users to download the full PDF (the old 'enhanced mode'), please find out more about [our new plugin - PDF Embedder Secure](http://wp-pdf.com/secure/?utm_source=GDE%20Readme&utm_medium=wordpressorg&utm_campaign=Freemium).
|
20 |
> * Mobile-friendly functionality for viewing PDFs is available in [PDF Embedder Premium](http://wp-pdf.com/premium/?utm_source=GDE%20Readme%20Premium&utm_medium=wordpressorg&utm_campaign=Freemium).
|
21 |
>
|
22 |
-
> If this plugin works as you require then
|
23 |
|
24 |
= More about Google Doc Embedder =
|
25 |
|
@@ -78,6 +78,10 @@ Go to "GDE Settings" (under "Settings" in the admin panel) to change defaults, o
|
|
78 |
|
79 |
== Frequently Asked Questions ==
|
80 |
|
|
|
|
|
|
|
|
|
81 |
= Where can the files live? =
|
82 |
The file to embed must first be publicly available somewhere on the internet, in order for Google to retrieve the document for conversion.
|
83 |
You can upload it to your WordPress site using the standard techniques, or link to a file on another site. For testing purposes, your site can run locally or on private networks, but the documents you wish to embed must be publicly accessible.
|
@@ -129,10 +133,6 @@ supported by the plug-in.
|
|
129 |
|
130 |
If you are able to store your files in Google Drive, you may want to try the [Google Drive Embedder plugin](http://wp-glogin.com/wpgoogledoctodrive). This will be faster to display, and more reliable in that case.
|
131 |
|
132 |
-
= Does it work in Multisite environments? =
|
133 |
-
The plugin works on network installs, though it must be activated on a per-site basis (not network activated). There are no multisite
|
134 |
-
specific features at this time, but it will function normally in this environment. If you use GDE in a multisite environment, I welcome your feedback on what functionality you would like to see.
|
135 |
-
|
136 |
== Screenshots ==
|
137 |
|
138 |
1. Default appearance of embedded viewer (cropped)
|
@@ -143,6 +143,11 @@ specific features at this time, but it will function normally in this environmen
|
|
143 |
|
144 |
== Changelog ==
|
145 |
|
|
|
|
|
|
|
|
|
|
|
146 |
= 2.6.2 =
|
147 |
|
148 |
Additional checks to protect against XSS/CSRF vulnerability reported by Tristan Madani.
|
3 |
Tags: doc, docx, pdf, ppt, pptx, xls, office, powerpoint, google, document, embed
|
4 |
Author URI: https://wordpress.org/plugins/google-document-embedder/
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.8
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
|
13 |
|
14 |
Google Doc Embedder lets you embed several types of files into your WordPress pages using the free Google Docs Viewer - allowing inline viewing (and optional downloading) of a wide range of popular file types, with no Flash or PDF browser plug-ins required.
|
15 |
|
16 |
+
> <strong>NOTE: Recent changes by Google to their viewer mean that some other plugins may be more suitable:</strong><br>
|
17 |
>
|
18 |
> * If you are able to store your files in Google Drive, try the [Google Drive Embedder plugin](http://wp-glogin.com/wpgoogledoctodrive). This will be faster to display, and more reliable.
|
19 |
> * To make it difficult for users to download the full PDF (the old 'enhanced mode'), please find out more about [our new plugin - PDF Embedder Secure](http://wp-pdf.com/secure/?utm_source=GDE%20Readme&utm_medium=wordpressorg&utm_campaign=Freemium).
|
20 |
> * Mobile-friendly functionality for viewing PDFs is available in [PDF Embedder Premium](http://wp-pdf.com/premium/?utm_source=GDE%20Readme%20Premium&utm_medium=wordpressorg&utm_campaign=Freemium).
|
21 |
>
|
22 |
+
> If this plugin works as you require then feel free to continue to use it, but please do not expect support beyond urgent security fixes. It is not guaranteed that Google will continue to offer or support their Document Viewer.
|
23 |
|
24 |
= More about Google Doc Embedder =
|
25 |
|
78 |
|
79 |
== Frequently Asked Questions ==
|
80 |
|
81 |
+
= How can I get support for this plugin? =
|
82 |
+
|
83 |
+
Because Google Document Viewer does not seem to be something that Google is fully committed to supporting, there will no longer be any active development of this plugin by the original author. You may use the support forum attached to this plugin on wordpress.org to post support questions, and active users are encouraged to help each other out where possible. However, the forum will not be monitored by any official development team. If you discover any security vulnerabilities please contact WordPress directly as usual.
|
84 |
+
|
85 |
= Where can the files live? =
|
86 |
The file to embed must first be publicly available somewhere on the internet, in order for Google to retrieve the document for conversion.
|
87 |
You can upload it to your WordPress site using the standard techniques, or link to a file on another site. For testing purposes, your site can run locally or on private networks, but the documents you wish to embed must be publicly accessible.
|
133 |
|
134 |
If you are able to store your files in Google Drive, you may want to try the [Google Drive Embedder plugin](http://wp-glogin.com/wpgoogledoctodrive). This will be faster to display, and more reliable in that case.
|
135 |
|
|
|
|
|
|
|
|
|
136 |
== Screenshots ==
|
137 |
|
138 |
1. Default appearance of embedded viewer (cropped)
|
143 |
|
144 |
== Changelog ==
|
145 |
|
146 |
+
= 2.6.3 =
|
147 |
+
|
148 |
+
Removed a PHP file that was no longer being used by the plugin - this caused a false-positive security alert and caused
|
149 |
+
the plugin to be removed from the repository temporarily.
|
150 |
+
|
151 |
= 2.6.2 =
|
152 |
|
153 |
Additional checks to protect against XSS/CSRF vulnerability reported by Tristan Madani.
|