Version Description
- Fixed: HTML syntax bug when custom dimensions provided
Download this release
Release Info
Developer | k3davis |
Plugin | Google Doc Embedder |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2 to 2.2.1
- gviewer.php +11 -7
- readme.txt +6 -2
gviewer.php
CHANGED
@@ -5,10 +5,10 @@ Plugin Name: Google Doc Embedder
|
|
5 |
Plugin URI: http://davismetro.com/gde/
|
6 |
Description: Lets you embed MS Office, PDF, TIFF, and many other file types in a web page using the Google Docs Viewer (no Flash or PDF browser plug-ins required).
|
7 |
Author: Kevin Davis
|
8 |
-
Version: 2.2
|
9 |
*/
|
10 |
|
11 |
-
$gde_ver = "2.2.
|
12 |
|
13 |
/**
|
14 |
* LICENSE
|
@@ -62,24 +62,28 @@ function gde_gviewer_func($atts) {
|
|
62 |
$file = str_replace(" ", "%20", $file);
|
63 |
}
|
64 |
|
|
|
65 |
$width = str_replace("px", "", trim($width));
|
66 |
if (!$width || !preg_match("/^\d+%?$/", $width)) {
|
67 |
-
|
68 |
if ($gdeoptions['width_type'] == "pc") {
|
69 |
$width .= "%";
|
70 |
-
} else {
|
71 |
-
$width .= "px";
|
72 |
}
|
73 |
}
|
|
|
|
|
|
|
|
|
74 |
$height = str_replace("px", "", trim($height));
|
75 |
if (!$height || !preg_match("/^\d+%?$/", $height)) {
|
76 |
$height = $gdeoptions['default_height'];
|
77 |
if ($gdeoptions['height_type'] == "pc") {
|
78 |
$height .= "%";
|
79 |
-
} else {
|
80 |
-
$height .= "px";
|
81 |
}
|
82 |
}
|
|
|
|
|
|
|
83 |
|
84 |
// supported file types - list acceptable extensions separated by |
|
85 |
$exts = "doc|docx|pdf|ppt|pptx|pps|tif|tiff|xls|xlsx|pages|ai|psd|dxf|svg|eps|ps|ttf|xps|zip|rar";
|
5 |
Plugin URI: http://davismetro.com/gde/
|
6 |
Description: Lets you embed MS Office, PDF, TIFF, and many other file types in a web page using the Google Docs Viewer (no Flash or PDF browser plug-ins required).
|
7 |
Author: Kevin Davis
|
8 |
+
Version: 2.2.1
|
9 |
*/
|
10 |
|
11 |
+
$gde_ver = "2.2.1.98";
|
12 |
|
13 |
/**
|
14 |
* LICENSE
|
62 |
$file = str_replace(" ", "%20", $file);
|
63 |
}
|
64 |
|
65 |
+
// set or clean up dimension values
|
66 |
$width = str_replace("px", "", trim($width));
|
67 |
if (!$width || !preg_match("/^\d+%?$/", $width)) {
|
68 |
+
$width = $gdeoptions['default_width'];
|
69 |
if ($gdeoptions['width_type'] == "pc") {
|
70 |
$width .= "%";
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
+
if (!strpos($width, "%")) {
|
74 |
+
$width .= "px";
|
75 |
+
}
|
76 |
+
|
77 |
$height = str_replace("px", "", trim($height));
|
78 |
if (!$height || !preg_match("/^\d+%?$/", $height)) {
|
79 |
$height = $gdeoptions['default_height'];
|
80 |
if ($gdeoptions['height_type'] == "pc") {
|
81 |
$height .= "%";
|
|
|
|
|
82 |
}
|
83 |
}
|
84 |
+
if (!strpos($height, "%")) {
|
85 |
+
$height .= "px";
|
86 |
+
}
|
87 |
|
88 |
// supported file types - list acceptable extensions separated by |
|
89 |
$exts = "doc|docx|pdf|ppt|pptx|pps|tif|tiff|xls|xlsx|pages|ai|psd|dxf|svg|eps|ps|ttf|xps|zip|rar";
|
readme.txt
CHANGED
@@ -61,6 +61,7 @@ This plug-in currently can embed the following:
|
|
61 |
* PostScript (EPS/PS)
|
62 |
* TrueType (TTF)
|
63 |
* XML Paper Specification (XPS)
|
|
|
64 |
|
65 |
The file to embed must first be publicly 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.
|
66 |
|
@@ -102,6 +103,9 @@ That's not a question ;) but if you have any particular ideas on further develop
|
|
102 |
|
103 |
== Changelog ==
|
104 |
|
|
|
|
|
|
|
105 |
= 2.2 =
|
106 |
* Added: ZIP/RAR Archive support (thanks enkerli)
|
107 |
|
@@ -170,5 +174,5 @@ That's not a question ;) but if you have any particular ideas on further develop
|
|
170 |
|
171 |
== Upgrade Notice ==
|
172 |
|
173 |
-
= 2.
|
174 |
-
|
61 |
* PostScript (EPS/PS)
|
62 |
* TrueType (TTF)
|
63 |
* XML Paper Specification (XPS)
|
64 |
+
* Archive Files (ZIP/RAR)
|
65 |
|
66 |
The file to embed must first be publicly 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.
|
67 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 2.2.1 =
|
107 |
+
* Fixed: HTML syntax bug when custom dimensions provided
|
108 |
+
|
109 |
= 2.2 =
|
110 |
* Added: ZIP/RAR Archive support (thanks enkerli)
|
111 |
|
174 |
|
175 |
== Upgrade Notice ==
|
176 |
|
177 |
+
= 2.2.1 =
|
178 |
+
Minor bug fix release
|