k3davis
Forum Replies Created
-
That…. would be a bug. Periodically Google changes their code and some of those changes aren’t immediately obvious to me. I’ll get a fix out there soon. Thanks for pointing it out.
Currently all of the toolbar customization settings are global (can’t be changed per instance).
Kevin
After some initial research this seems possible… would require some thought though about which settings make sense globally and which don’t. Height and width doesn’t seem like a great candidate because of the variety of themes. Viewer type and toolbar customization might be applicable though. Not sure what else. If you have more feedback about this, I’d welcome it.
Thanks for the suggestion.
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] File sizeI understand better what you’re saying now. However, I hesitate to implement this suggestion for a number of reasons. I don’t think this option would be generally helpful for the vast majority of the users of the plugin. Also, the maximum file size is a moving target from site to site, as mentioned above, and perhaps even impossible to determine accurately. (In your suggested scenario, it’s possible that files of 9MB would still appear but not work.) To make matters worse, some servers are configured in such a way that I don’t have a 100% reliable method of obtaining the file size in the first place.
Here’s a hint toward implementing it yourself, though, if you’re interested in trying it. Find this block of code in gviewer.php (currently around line 70):
$fsize = gde_formatBytes($status['fsize']); $code =<<<HERE %A% <iframe src="%U%" class="gde-frame" style="width:%W%; height:%H%; border: none;" scrolling="no"></iframe>\n %B% HERE;and try replacing these relevant portions:
$fsize = gde_formatBytes($status['fsize']); $max_mb_size = '10'; // set max size to display (in MB) if ($status['fsize'] > $max_mb_size*1024*1024) { $code = "%A% File too large to embed.\n %B%"; } else { $code =<<<HERE %A% <iframe src="%U%" class="gde-frame" style="width:%W%; height:%H%; border: none;" scrolling="no"></iframe>\n %B% HERE; }You can of course change the text to your liking, or just remove it, but the %A% and %B% show the download link (depending on whether you’ve set the position to above or below the viewer) so you’ll want to leave one or both of these.
Let me know if you need more help. I’ll keep considering if this idea is something that should be implemented into the plugin as a setting in the future.
Kevin
Hi rohanpai,
Thanks for your comments. Unfortunately that is not possible at the moment, and to be honest I never thought of it. I’m sorry about that, and will look into implementing this in a future version.
Kevin
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] File sizeHi again,
The memory limitation is one of a number of things, depending on your setup. Google, mainly, and perhaps your local PHP configuration (especially if using the Enhanced Viewer). There is no “magic number” that is a file too big. It seems to vary from 7-12MB, generally.
Your best option is to optimize your embedded documents for web use. If you’re embedding a PDF, you only need to have the document at a screen resolution, not print-ready. This should result in a small enough file even on very large and graphics intensive documents. Then, if you need to allow download of a “higher resolution” version as well, you can add that link without embedding it.
In short, Google’s viewer can’t handle large files due to the nature of how it operates. You must adequately compress the files to have good results. Since I don’t have access to the file size limit, and it varies from place to place based on configuration and network condition, I’m not sure how I can account for this in the plugin.
If I have misunderstood your question/request, please let me know.
Thanks,
Kevin
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] Lost in Translationsime0n,
I’ll think more about that. It’s kind of a unique use as far as I know, but maybe such a function would be useful to others.
You can make your links using the viewer tool directly, that way you can still keep your documents in WordPress and link to the full screen viewer.
https://docs.google.com/viewer
Hopefully that’s useful in the meantime.
Hi bashquandry,
Honestly I haven’t done any of the work to see how difficult it would be to do this, so I’m not sure. The plugin was designed to use the public viewer and not the Docs (now “Drive”) functionality, with user authentication and the whole bit. So I’m not sure off the cuff how feasible that extension would be. I will look into it for the future.
Thanks for asking – it’s good to know what options people are looking for when I go to improve the plugin.
Kevin
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] Lost in TranslationIf you don’t want to embed the document on the page directly, you can really just make a download link yourself that’s set to open the full screen version in a new tab. I know you lose a little of the convenience of the shortcode, but if you’re not actually embedding anything all you really need is a straight-up link.
I do want to include a collapsible sort of view in a future version, but a feature that just makes a link isn’t much of a feature in this case… π
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] Embedding xls fileHi jbierman,
The issue here is that the file you’re linking to, while it ends in XLS, is actually an HTML document. When I open it in Excel, it warns me of this (extension doesn’t match file type). I save it as a native XLS document, and it embeds normally using GDE, with no (obvious) loss of formatting.
Hope this helps!
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] Lost in TranslationHi sime0n,
Unless Google improves their algorithm this probably won’t change. I’m sure they are balancing the convenience of the internal conversion with the need for speed, resulting in a fair amount of compression that may not serve certain types of designs very well.
I’ve found that while I can make changes to the viewer interface fairly easily, there is little I can do about the document quality itself. I had an experimental build that generated its own renderings of the page, allowing me to set my own resolution and so on, but it suffered from a lot of inconveniencies – most notably the need for certain somewhat uncommon PHP extensions to be installed and working on Apache, which severely limits the plugin’s usefulness (including no IIS support).
Given Google’s history of releasing “neat” tools and often letting them languish afterward, I honestly wouldn’t really expect vast improvements. The viewer inherits to some degree from that of Google Drive which is still an active product of theirs, so it’s possible it will get better in the future, but by no means guaranteed.
Hope this helps.
Kevin
Forum: Plugins
In reply to: [Google Doc Embedder] [Plugin: Google Doc Embedder] Embedding xls fileI don’t see the plugin being used on that page.
The message you mention is Google generated, but the plugin may come in to play along the way – I’d have to see the URL and error message to know for sure. You can post here or use the “Support” link in your plugin list or the footer of the settings page.
Kevin
Forum: Plugins
In reply to: [Google Doc Embedder] Google Doc Embedder download linkThe download link is working fine in all browsers with all the documents I’ve tried.
Please submit a support request using the “Support” link in your plugin list (or in the footer of the settings page) if you need help with some specific documents. You haven’t provided any info for me to help you.
Thanks,
Kevin
There are many plugins and tutorials on the web that explain this. Here is one (at random). Google “how to install google analytics in wordpress” or something similar for others. Once the tracking code is working on your site and you’ve set the GDE options as above, you should be all set.
mahabub78,
You will need to have an account with Google Analytics and the tracking code enabled and successfully gathering stats on the rest of your site.
You will need to enable in GDE Settings the “Track downloads in Google Analytics” under Download Link Options.
It may take some time to appear if these have not been active already, but you should in time see these downloads show up in GA under Content > Events. GDE tracks downloads as events rather than Pageviews to avoid artificially inflating your site’s regular “hit” stats.
Hope this helps.