Google Doc Embedder - Version 1.9.8

Version Description

  • Added: Viewer support for multiple new file types
  • Changed: Workaround for NextGEN Gallery incompatibility (thanks alex)
  • Changed: Defaults to Standard Viewer (IE problem is fixed!)
Download this release

Release Info

Developer k3davis
Plugin Icon wp plugin Google Doc Embedder
Version 1.9.8
Comparing to
See all releases

Code changes from version 1.9.7 to 1.9.8

Files changed (5) hide show
  1. functions.php → gde-functions.php +5 -1
  2. gviewer.php +22 -6
  3. options.php +1 -1
  4. readme.txt +48 -10
  5. uninstall.php +1 -1
functions.php → gde-functions.php RENAMED
@@ -22,7 +22,7 @@ function gde_init($reset = NULL) {
22
  'link_text' => 'Download (%FT, %FS)',
23
  'link_pos' => 'below',
24
  'link_func' => 'default',
25
- 'disable_proxy' => 'no',
26
  'bypass_check' => 'no',
27
  'ignore_conflicts' => 'no',
28
  'suppress_beta' => 'no'
@@ -175,6 +175,7 @@ function gde_shortUrl($u) {
175
  return wp_remote_fopen('http://tinyurl.com/api-create.php?url='.$u);
176
  }
177
 
 
178
  function gde_conflict_check() {
179
  global $gde_conflict_list;
180
 
@@ -185,6 +186,7 @@ function gde_conflict_check() {
185
  }
186
  return;
187
  }
 
188
 
189
  function gde_admin_warning() {
190
  global $gde_conflict_list;
@@ -195,9 +197,11 @@ function gde_admin_warning() {
195
  ";
196
  }
197
 
 
198
  function gde_t($message) {
199
  return __($message, basename(dirname(__FILE__)));
200
  }
 
201
 
202
  function gde_e($message) {
203
  _e($message, basename(dirname(__FILE__)));
22
  'link_text' => 'Download (%FT, %FS)',
23
  'link_pos' => 'below',
24
  'link_func' => 'default',
25
+ 'disable_proxy' => 'yes',
26
  'bypass_check' => 'no',
27
  'ignore_conflicts' => 'no',
28
  'suppress_beta' => 'no'
175
  return wp_remote_fopen('http://tinyurl.com/api-create.php?url='.$u);
176
  }
177
 
178
+ /*
179
  function gde_conflict_check() {
180
  global $gde_conflict_list;
181
 
186
  }
187
  return;
188
  }
189
+ */
190
 
191
  function gde_admin_warning() {
192
  global $gde_conflict_list;
197
  ";
198
  }
199
 
200
+ /*
201
  function gde_t($message) {
202
  return __($message, basename(dirname(__FILE__)));
203
  }
204
+ */
205
 
206
  function gde_e($message) {
207
  _e($message, basename(dirname(__FILE__)));
gviewer.php CHANGED
@@ -3,12 +3,12 @@
3
  /*
4
  Plugin Name: Google Doc Embedder
5
  Plugin URI: http://davismetro.com/gde/
6
- Description: Lets you embed Word Documents, PDF files, PowerPoint presentations, and TIFF images in a web page using the Google Docs Viewer (no Flash or PDF browser plug-ins required).
7
  Author: Kevin Davis
8
- Version: 1.9.7
9
  */
10
 
11
- $gde_ver = "1.9.7.98";
12
 
13
  /**
14
  * LICENSE
@@ -30,12 +30,12 @@ $gde_ver = "1.9.7.98";
30
  *
31
  * @package google-document-embedder
32
  * @author Kevin Davis <kev@tnw.org>
33
- * @copyright Copyright 2010 Kevin Davis
34
  * @license http://www.gnu.org/licenses/gpl.txt GPL 2.0
35
  * @link http://davismetro.com/gde/
36
  */
37
 
38
- include_once('functions.php');
39
  $gdeoptions = get_option('gde_options');
40
  $pUrl = plugins_url(plugin_basename(dirname(__FILE__)));
41
 
@@ -75,7 +75,7 @@ function gde_gviewer_func($atts) {
75
  }
76
 
77
  // supported file types - list acceptable extensions separated by |
78
- $exts = "doc|docx|pdf|ppt|pps|tif|tiff";
79
 
80
  // check link for validity
81
  $status = gde_validTests($file, $force);
@@ -257,4 +257,20 @@ function gde_admin_footer() {
257
  printf('%1$s plugin | Version %2$s<br />', $pdata['Title'], $pdata['Version']);
258
  }
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  ?>
3
  /*
4
  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: 1.9.8
9
  */
10
 
11
+ $gde_ver = "1.9.8.98";
12
 
13
  /**
14
  * LICENSE
30
  *
31
  * @package google-document-embedder
32
  * @author Kevin Davis <kev@tnw.org>
33
+ * @copyright Copyright 2011 Kevin Davis
34
  * @license http://www.gnu.org/licenses/gpl.txt GPL 2.0
35
  * @link http://davismetro.com/gde/
36
  */
37
 
38
+ include_once('gde-functions.php');
39
  $gdeoptions = get_option('gde_options');
40
  $pUrl = plugins_url(plugin_basename(dirname(__FILE__)));
41
 
75
  }
76
 
77
  // supported file types - list acceptable extensions separated by |
78
+ $exts = "doc|docx|pdf|ppt|pptx|pps|tif|tiff|xls|xlsx|pages|ai|psd|dxf|svg|eps|ps|ttf|xps";
79
 
80
  // check link for validity
81
  $status = gde_validTests($file, $force);
257
  printf('%1$s plugin | Version %2$s<br />', $pdata['Title'], $pdata['Version']);
258
  }
259
 
260
+ // temporarily move certain functions here to workaround NGG incompatibility
261
+ function gde_t($message) {
262
+ return __($message, basename(dirname(__FILE__)));
263
+ }
264
+
265
+ function gde_conflict_check() {
266
+ global $gde_conflict_list;
267
+
268
+ // Markdown
269
+ if (function_exists('mdwp_add_p')) {
270
+ $gde_conflict_list = "markdown";
271
+ add_action('admin_notices', 'gde_admin_warning');
272
+ }
273
+ return;
274
+ }
275
+
276
  ?>
options.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- include_once('functions.php');
3
 
4
  global $gdeoptions;
5
  $himg = plugins_url(plugin_basename(dirname(__FILE__))).'/help.png';
1
  <?php
2
+ include_once('gde-functions.php');
3
 
4
  global $gdeoptions;
5
  $himg = plugins_url(plugin_basename(dirname(__FILE__))).'/help.png';
readme.txt CHANGED
@@ -1,21 +1,33 @@
1
  === Google Doc Embedder ===
2
  Contributors: k3davis
3
  Donate link: http://pledgie.com/campaigns/6048
4
- Tags: doc, docx, pdf, pps, ppt, tiff, word, powerpoint, google, embed, google docs
5
  Requires at least: 2.8
6
- Tested up to: 3.1
7
  Stable tag: trunk
8
 
9
- Lets you embed Word documents (DOC, DOCX), PDF files, PowerPoint presentations (PPT, PPS), and TIFF images in a web page using the Google Docs Viewer (no Flash or PDF browser plug-ins required).
10
 
11
  == Description ==
12
 
 
 
 
13
  Google Doc Embedder lets you embed several types of files into your WordPress pages using the Google Docs Viewer - allowing inline viewing (and optional downloading) of the following file types, with no Flash or PDF browser plug-ins required:
14
 
15
- * DOC/DOCX
16
- * PDF
17
- * PPT/PPS
18
- * TIFF
 
 
 
 
 
 
 
 
 
19
 
20
  Similar to services like Scribd, Google Doc Embedder will allow you to embed these files directly into your page or post, not requiring the user to have Microsoft Word, Adobe Reader, PowerPoint, or other software installed to view the contents. Unlike Scribd, the files do not need to be uploaded to any service first - including Google Documents - but can exist anywhere publicly accessible on your site or the internet.
21
 
@@ -34,10 +46,26 @@ Go to "GDE Settings" (under "Settings" in the admin panel) to change defaults, o
34
  == Frequently Asked Questions ==
35
 
36
  = What file types can be embedded? =
37
- This plug-in currently can embed Microsoft Word (DOC/DOCX), PDF, PowerPoint (PPT/PPS), or TIFF files only. 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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  = How do I embed a file in my page or post? =
40
- Use the custom shortcode `[gview]` to embed the file, as shown:
41
 
42
  `[gview file="http://url.to/file.pdf"]`
43
 
@@ -67,6 +95,11 @@ That's not a question ;) but if you have any particular ideas on further develop
67
 
68
  == Changelog ==
69
 
 
 
 
 
 
70
  = 1.9.7 =
71
  * Fixed: Minor compatibility issue with some PHP versions
72
  * Changed: Confirmed compatibility with WP 3.1
@@ -122,4 +155,9 @@ That's not a question ;) but if you have any particular ideas on further develop
122
  * Added: Ability to set height/width to percentage (thanks eturfboer)
123
  * Fixed: Compatibility with PHP 5.3+, various function tuning
124
 
125
- <a href="http://davismetro.com/gde/changelog/" target="_blank">Full history...</a>
 
 
 
 
 
1
  === Google Doc Embedder ===
2
  Contributors: k3davis
3
  Donate link: http://pledgie.com/campaigns/6048
4
+ Tags: doc, docx, pdf, pps, ppt, xls, psd, svg, tiff, office, powerpoint, google docs, google
5
  Requires at least: 2.8
6
+ Tested up to: 3.2
7
  Stable tag: trunk
8
 
9
+ Lets you embed MS Office, PDF, and many other file types in a web page using the Google Docs Viewer (no Flash or PDF browser plug-ins required).
10
 
11
  == Description ==
12
 
13
+ An updated beta has been posted. <strong>Google Doc Embedder 2.0 beta 3</strong>
14
+ (<a href="http://davismetro.com/gde/beta-program/" target="_blank">more info</a>)
15
+
16
  Google Doc Embedder lets you embed several types of files into your WordPress pages using the Google Docs Viewer - allowing inline viewing (and optional downloading) of the following file types, with no Flash or PDF browser plug-ins required:
17
 
18
+ * Adobe PDF
19
+ * Microsoft Word (DOC/DOCX)
20
+ * Microsoft PowerPoint (PPT/PPTX/PPS)
21
+ * Microsoft Excel (XLS/XLSX)
22
+ * TIFF Images
23
+ * Apple Pages (PAGES)
24
+ * Adobe Illustrator (AI)
25
+ * Adobe Photoshop (PSD)
26
+ * Autodesk AutoCad (DXF)
27
+ * Scalable Vector Graphics (SVG)
28
+ * PostScript (EPS/PS)
29
+ * TrueType (TTF)
30
+ * XML Paper Specification (XPS)
31
 
32
  Similar to services like Scribd, Google Doc Embedder will allow you to embed these files directly into your page or post, not requiring the user to have Microsoft Word, Adobe Reader, PowerPoint, or other software installed to view the contents. Unlike Scribd, the files do not need to be uploaded to any service first - including Google Documents - but can exist anywhere publicly accessible on your site or the internet.
33
 
46
  == Frequently Asked Questions ==
47
 
48
  = What file types can be embedded? =
49
+ This plug-in currently can embed the following:
50
+
51
+ * Adobe PDF
52
+ * Microsoft Word (DOC/DOCX)
53
+ * Microsoft PowerPoint (PPT/PPTX/PPS)
54
+ * Microsoft Excel (XLS/XLSX)
55
+ * TIFF Images
56
+ * Apple Pages (PAGES)
57
+ * Adobe Illustrator (AI)
58
+ * Adobe Photoshop (PSD)
59
+ * Autodesk AutoCad (DXF)
60
+ * Scalable Vector Graphics (SVG)
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
 
67
  = How do I embed a file in my page or post? =
68
+ Type the custom shortcode `[gview]` into your page or post to embed the file, as shown (use of the HTML tab in the editor recommended):
69
 
70
  `[gview file="http://url.to/file.pdf"]`
71
 
95
 
96
  == Changelog ==
97
 
98
+ = 1.9.8 =
99
+ * Added: Viewer support for multiple new file types
100
+ * Changed: Workaround for NextGEN Gallery incompatibility (thanks alex)
101
+ * Changed: Defaults to Standard Viewer (IE problem is fixed!)
102
+
103
  = 1.9.7 =
104
  * Fixed: Minor compatibility issue with some PHP versions
105
  * Changed: Confirmed compatibility with WP 3.1
155
  * Added: Ability to set height/width to percentage (thanks eturfboer)
156
  * Fixed: Compatibility with PHP 5.3+, various function tuning
157
 
158
+ <a href="http://davismetro.com/gde/changelog/" target="_blank">Full history...</a>
159
+
160
+ == Upgrade Notice ==
161
+
162
+ = 1.9.8 =
163
+ Supports embedding of multiple new file types, and a fix for NextGEN Gallery compatibility.
uninstall.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- include_once('functions.php');
3
 
4
  // perform cleanup, be a good citizen
5
  $init = gde_init();
1
  <?php
2
+ include_once('gde-functions.php');
3
 
4
  // perform cleanup, be a good citizen
5
  $init = gde_init();