Topic: Howto publish using Drupal

Hi,

If anybody wanted to work with Drupal, here I posted a small guide to do a 1 minute gallery publication using Drupal 4.7

http://www.christianloza.com/howToDrupalSimpleviewer

The tools apply for simpleviewer 1.7, but I'll release soon another guide on 1.8

Hope you find it useful.

Chris.

Re: Howto publish using Drupal

Thanks Chris!

Felix Turner
SimpleViewer Support Team.

Re: Howto publish using Drupal

Hey, I published a new set that works with 1.8

Chris.

Re: Howto publish using Drupal

Hi,

Trying to integrate a SimpleViewer gallery within my Drupal site I used at part of your tutorial.
(no I'm not complaining about an important thesis having been erased).
The php inclusion works fine, but the result is....yerk.

My HTML page looks like this and the gallery is nicely layed out and everything.
But the integrated version looks like this.
Has anyone a clue why the Flash player isn't taking the space it requires? I'm running out of ideas (and of hair to pull at).

Thanks!

Re: Howto publish using Drupal

No one?

Re: Howto publish using Drupal

Hi,
I'm not seeing any evidence of SV here
http://www.cso-guingamp.info/node/61
maybe your working on it?

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: Howto publish using Drupal

Hey Marc P

When looking at the source of your webpage i can see you did copy the wrong code:

You have all this inside a <div>:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>PoPfolio</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style>
    HTML, BODY                 {
        height: 100%;
    }
    EMBED, OBJECT, TABLE#viewer {
        height: 100%;
    }
</style>
    </head>
    <body>
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
                    <param name="movie" value="http://www.cso-guingamp.info/files/photos/viewer.swf" />
                    <param name="quality" value="high" />
                    <param name="scale" value="noscale" />
                    <param name="bgcolor" value="#FFFFFF" />
                    <param name="FlashVars" value="xmlDataPath=http://www.cso-guingamp.info/files/photos/gallery.xml" />

                    <embed src="http://www.cso-guingamp.info/files/photos/viewer.swf" quality="high" scale="noscale" bgcolor="#FFFFFF" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" FlashVars="xmlDataPath=http://www.cso-guingamp.info/files/photos/gallery.xml" width="100%" height="100%"></embed>
                </object>
    </body>
</html>



Please try to copy only this part into drupal:


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
                    <param name="movie" value="http://www.cso-guingamp.info/files/photos/viewer.swf" />
                    <param name="quality" value="high" />
                    <param name="scale" value="noscale" />
                    <param name="bgcolor" value="#FFFFFF" />
                    <param name="FlashVars" value="xmlDataPath=http://www.cso-guingamp.info/files/photos/gallery.xml" />

                    <embed src="http://www.cso-guingamp.info/files/photos/viewer.swf" quality="high" scale="noscale" bgcolor="#FFFFFF" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" FlashVars="xmlDataPath=http://www.cso-guingamp.info/files/photos/gallery.xml" width="100%" height="100%"></embed>
                </object>


That should help...

Re: Howto publish using Drupal

Hi,

I think I'm going to run through the entire proces izelpii described in his tutorial, Picasa, Perl and all the stuff.
My Drupal node is

<?php
include&#40;"./files/photos/gallery.html"&#41;;
?>

And the gallery.html file is

<object classid="clsid&#58;D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http&#58;//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
<param name="movie" value="http&#58;//www.cso-guingamp.info/files/photos/viewer.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="bgcolor" value="#FFFFFF" />
<param name="FlashVars" value="xmlDataPath=http&#58;//www.cso-guingamp.info/files/photos/gallery.xml" />

<embed src="http&#58;//www.cso-guingamp.info/files/photos/viewer.swf" quality="high" scale="noscale" bgcolor="#FFFFFF" pluginspage="http&#58;//www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" FlashVars="xmlDataPath=http&#58;//www.cso-guingamp.info/files/photos/gallery.xml" width="100%" height="100%"></embed>
</object>

as suggested by moka.

And it gives the same result : viewing gallery.html gives good result while viewing the included version doesn't.

(And yes Flash ho I was working on it! ;-))

Re: Howto publish using Drupal

Problem solved...adjusting the width and height values in the HTML page was the answer...

Re: Howto publish using Drupal

I have developed a module for Acidfree/SimpleViewer integration. Unfortunately, SimpleViewer needs to be patched to accept different filenames. The patch is easy to apply, but you will need to buy a PRO version of SimpleViewer.

Maybe Felix can include a feature for different image/thumb filenames in the free version?

Features:

[b]

Re: Howto publish using Drupal

What format do you need your image/thumb filenames in?

Felix Turner
SimpleViewer Support Team.

Re: Howto publish using Drupal

Like on
www.salsaffm.de/acidflash_xml/1155:

Example:
<image>
<filename>files/active/1/1211_small.jpg</filename>
<thumb>files/active/1/1211_thumb.jpg</thumb>
<caption></caption>
</image>

But actually the _small or _thumb can be different, dependent on the Acidfree/image module settings.

Re: Howto publish using Drupal

<filename>files/active/1/1211_small.jpg</filename>
<thumb>files/active/1/1211_thumb.jpg</thumb> 

Yeah like you said, thats not possible with the basic SimpleViewer. Does Acidfree not allow you to customize your filepaths?

You can set your imagepath to be "files/active/1/small_" and thumbpath to be "files/active/1/thumb_"  which would give you image filenames like "files/active/1/small_1211.jpg" and thumbs like "files/active/1/thumb_1211.jpg".

The other option would be to use an intermediate php file called getThumbPath.php. In this case you would set thumbPath="getThumbPath.php?filename=". getThumbPath.php would take the filename and write out the required absolute URL.

Felix Turner
SimpleViewer Support Team.

Re: Howto publish using Drupal

No, the path is built by the Filemanager module and could potentially change even within a gallery. The user id is included in the path and an "overflow" mechanism creates new directories if >500 files. That's why I have used the site root as imagePath.

Streaming the images over php is quite unperformant (might be a problem for larger sites).

The patch I applied allows for an optional third entry in the XML file to specify the thumbnail filename - if not present, the image filename is taken:

XMLManager.as

--> Line 47, insert after "public var imageFileNames:Array;"

public var thumbFileNames&#58;Array;

--> Line 73, insert after "imageFileNames = [];"

thumbFileNames = &#91;&#93;;

--> Line 141, insert after "imageFileNames.push(resultNode.childNodes[0].firstChild.nodeValue);"

if &#40;resultNode.childNodes&#91;2&#93;.firstChild.nodeValue&#41;
    thumbFileNames.push&#40;resultNode.childNodes&#91;2&#93;.firstChild.nodeValue&#41;;
else
    thumbFileNames.push&#40;resultNode.childNodes&#91;0&#93;.firstChild.nodeValue&#41;;

ThumbArea.as

--> Line 140, change "imageFileNames" to "thumbFileNames":

mThumbs&#91;i&#93; = new Thumb&#40;mClip_mc.mcDisplayArea.mcSlidingDisplayArea, i,mXMLManager.thumbPath + mXMLManager.thumbFileNames&#91;i&#93;&#41;;

Re: Howto publish using Drupal

I'm currently using the Flash Gallery module for drupal and love it.  Thanks Felix for SimpleViewer.  The module uses SWFObject.  I'd like to somehow modify the module to use it as a way for users to select an image but I'm not  sure how to get the current/last image viewed from simpleviewer.  Is there a way to do this?

Thanks

Re: Howto publish using Drupal

@mrjohn: Not exactly sure waht you want to do here, but you can use a link in the <caption> of your XML file. This link could include the image name or number as parameter for the target page.

Re: Howto publish using Drupal

Thanks machito. 

What I'm trying to do (which will probably be very ambitious given I'm a newbie) is to use simpleviewer as a way for people to select a photo from a gallery or album and save it in some cck generated node or flexinode.  They could scroll through the gallery using the simpleviewer interface until they found the "right" image.  When the node is saved I would like to pick up the last image the looked at and save the node id or url.  When they go back to view the cck node, the slideshow would start from the saved node id or url if it still exists.

I'm not sure if this makes sense or if it can be done....Any advise would be helpful...

Also, would love to give the acidfree-simpleviewer slideshow a try.  Please let us know when it is ready.

Re: Howto publish using Drupal

Sounds feasible to me, but will involve a lot of php and ActionScript (Flash) programming. I am not aware of a solution that does all you need.
There is, however, a Drupal extension for selecting images (but I never tried it). Maybe you can combine that one with my Acidflash/SimpleViewer functionality (or with the one Dries has supplied).
To let SimpleViewer start with a specific image would mean either a) to patch/extend SimpleViewer or b) to program an XML feed (callback URL), which would sort the images according to your needs (see Dries module for an example).

Hope that helps!

Re: Howto publish using Drupal

Yes, thanks that helps.  Do you remember what the name of the module to select images is?

My current thoughts are:
* use the flash gallery as a basis for possibly a new module.  it should be similar to flash gallery but just made for this specific purpose.  for functions that do not need to be modified I would just make a wrapper that will called the flash gallery function.

* use cck with some compute fields.
* a compute field would be used to call the simpleviewer.
* a compute field to save the "selected" image
* and maybe one compute field would be used to select the gallery
xml would be generate similarly to how dries module does it.

my first thought is to set the starting position from within simpleviewer.  I would pass in the starting position via setVariable.  not sure if the xmlmanager (? will probably get the source code and take a look at the code in the next day or two) should be use it to "sort" the data or if the viewer can be forwared to the starting image.  the url for the image could be passed in via caption field in the xml. 

as for the other direction (getting the current/last image url from flash to drupal):
I saw a tutorial on the adobe flash site and it shows how to use callbacks to execute a js function from within activescript or flash.  I thought the js function could set the value of the current image's url in the compute field when the user advances the slideshow.  not sure how much this will slow things down or if this would work.  the compute field would have the "save to db" option on.

any thoughts or suggestions...
thanks

Re: Howto publish using Drupal

Interesting idea about the image picker. You'd need to be able to configure each image with a custom javascript call to the current page.

Anyway, just so people know, SWF Tools (drupalDOTorg/project/swftools) is supporting SimpleViewer and Flash Gallery is being converted to use SWF Tools.

Sorry, I can't post links yet.