I'm trying to embed multiple images into simpleviewer. So far, I have been UNABLE to embed only one image, so embedding multiple doesn't seem to be happening. The bits of code I've included are inserted into a gallery-node.tpl.php file.
Here is what I am currently using which displays "You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.":
<?php
print swf('/<?php print $node->field_gallery_image[0][filepath] ?>');
?>I have been able to make simplyviewer display by inserting a direct image path such as:
<?php
print swf('/path/to/image.jpg');
?>However, that only displayed simpleviewer and did not actually show the image.
If this is not a bug and simply my bad coding, sorry for marking as such; however, recommendations for fixing the code is greatly appreciated.
Comments
Comment #1
ron williams commentedUsing code found in the documentation on drupal.org, I've created the following which views the first 2 images in a file_field named field_gallery_image, in addition I this in a node-gallery.tpl.php file:
The only problem is both images are required or a blank space is displayed, In addition you are limited to 2 images. I would like to move the comma to be part of the $node->field_gallery_image[#][filename] output area to prevent blank items. In addition, if someone has a recommendation for extending this past adding additional filename #'s, I would definitely appreciate it.
Comment #2
matt2000 commentedComment #3
Stuart Greenfield commentedThe code sample from matt2000 looks good to me - did it fix your issue?
Comment #4
ron williams commentedYes, code did work. Matt and I were conversing via IM and I forgot to note that it worked here.
This is definitely useful and in my opinion, works as a replacement to flash gallery.
Comment #5
Stuart Greenfield commentedGlad it worked - I'm going to reopen the thread, and set it as a documentation task. Usage of SWF Tools seems to be taking off, and examples like this are excellent for showing how people have used it. I'd like to add this example to the docs!
Comment #6
Stuart Greenfield commentedClosing this thread again as the code in #3 is no longer needed. You can use the built in CCK formatter feature to automatically send a list of images to Wijering image rotator or simpleviewer with no coding needed.