Currently when you select the "Issuu filefield as pageflip" display formatter for a field on a node it just displays the flash viewer. This works great, but if you are viewing the node on a device without flash support (like an iPad or iPhone) there is no way to get to the document.

My solution was to add an addition display formatter that has a link to the actual PDF file below the flash pageflip viewer. I have attached the patch that adds this formatter for review.

CommentFileSizeAuthor
download.patch1.31 KBmichaelk
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

marvil07’s picture

Version: 6.x-1.0-rc1 » 6.x-1.x-dev
Status: Needs review » Needs work
+++ issuu.module	(working copy)
@@ -480,6 +488,14 @@
+function theme_issuu_formatter_ffpageflipdownload($element) {
+  $pageflip = theme_issuu_formatter_ffpageflip($element);
+  ¶
+  $download = l(t('View PDF without Viewer'), $element['#item']['filepath']);
+  ¶
+  return $pageflip . $download;
+}
+
 function theme_issuu_formatter_ffpresentation($element) {
   global $base_url;
   $data = $element['#item']['data']['doc_metadata'];
  • Please use theme('issuu_formatter_ffpageflip') instead.
  • issuu not only accepts PDF files, so the text should be a little more general.
  • Probably we want to use one of the filefield theme functions instead of showing it directly, so we re-use code.
  • Let's also see if issuu provides a way to do this graceful degradation.
  • It will also be great if a general way to do this will be available on the main widget, and better if it could be added to d7 version first.
+++ issuu.module	(working copy)
@@ -480,6 +488,14 @@
+function theme_issuu_formatter_ffpageflipdownload($element) {
+  $pageflip = theme_issuu_formatter_ffpageflip($element);
+  ¶
+  $download = l(t('View PDF without Viewer'), $element['#item']['filepath']);
+  ¶
+  return $pageflip . $download;
+}
+
 function theme_issuu_formatter_ffpresentation($element) {
   global $base_url;
   $data = $element['#item']['data']['doc_metadata'];
  • Please use theme('issuu_formatter_ffpageflip') instead.
  • issuu not only accepts PDF files, so the text should be a little more general.
  • Probably we want to use one of the filefield theme functions instead of showing it directly, so we re-use code.
  • Let's also see if issuu provides a way to do this graceful degradation.
  • It will also be great if a general way to do this will be available on the main widget, and better if it could be added to d7 version first.
  • Maybe we just need to change the approach to use the text shown on embed code when it is not shown, and add an option that let's choose if we should add that behavior.