WordPress.org

Ready to get started?Download WordPress

Forums

Simpleviewer and WordPress, let's do this. (56 posts)

  1. slambert
    Member
    Posted 8 years ago #

    I've looked and looked trying to integrate WP and SimpleViewer using the Kimili Flash Embed Pugin. There's a few posts, but nothing that really lays out how it's done, especially with the recent update of the Kimili plugin.

    So let's solve this! I'm willing to post instructions to the Codex if someone can help me figure this out. Right now, using the available info I pieced together, I can get the Simpleviewer to load in a post, but no images. (The gallery works because it will load outside a wordpress post.) I am using Kimili Flash Embed 1.0 and WordPress 2.0

    I know I'm not the only one who wants this...

  2. davidchait
    Member
    Posted 8 years ago #

    No need for that plugin. When I did this, there was a lot of 'funkiness' with paths to files, but I have SV embedded in a Page (that is, the script block is in the Page content/body directly) without further plugin effort needed. After all, the embedding part is pure HTML/script goodness! ;)

    For files, imageData.xml, viewer.swf are in the wp-root, as are my /images and /thumbs directories (and frankly all other SV stuff... everything in the wp-root).

    I can't remember what I did to buildgallery.php -- I thought I changed some things but I don't see the changes at the moment. My directory paths at the top are both blanks (i.e., root).

    Ahh, but now looking into my imageData.xml, I see what I did... I think I manually ended up fixing up paths there:

    imagePath="../images/" thumbPath="../thumbs/">

    and then in the CDATA block for each image:

    <A href="../images/IMG_FILE.JPG"

    I think the 'trick' there is that the stuff is executing for my permalinks as a subdirectory (i.e., http://some.wp.site/gallery/), so the ../ forces it back up to the root. That was with 1.5 -- don't know if 2.0 permalink processing changes things.

    I haven't looked at this in like 6 months now... there's probably a much better way to integrate this, and in fact I'd now write the XML-generator as PHP code to generate >full< URLs to the pix. Though the root imagePath and thumbPath are still a problem, would probably have to generate full local paths to them, embedded.

    And, I've just moved my main site code over to 2.0.1, and I'm learning about building rewrite plugins, so might be able to eventually make a one-stop-shop for SV. Just not yet. ;)

    -d

  3. slambert
    Member
    Posted 8 years ago #

    David,

    Did you just get it working in Pages, or Posts too? It's important for my sites that this work in Posts. Let me know.

    Maybe I'll give it a shot without the Kimili plugin in posts and see what happens...

    Steve

  4. davidchait
    Member
    Posted 8 years ago #

    I did it in a page. In a post, it >might< depend upon your permalink structure. But as I said, I did everything with relative-paths. Possible that using the proper absolute-path structures throughout would eliminate all the issues I ran into (but, at a 'cost' of having to figure out the right things to enter in which places...).

    -d

  5. slambert
    Member
    Posted 8 years ago #

    Ok, David! With your clues I figured it out. Here's how it's done in wordpress 2.0.1...

    You do need the Kimili plugin.

    I created a simpleviewer gallery and put it in a folder at the root of my domain. Something like this would work: domain.com/simpleviewer/gallery1/

    In your post, you add this, using the kimili plugin to embed the flash code. You can change some of the variables, but notice that the links are all relative.

    [kml_flashembed movie="/simpleviewer/gallery1/viewer.swf" height="500" width="500" quality="best" bgcolor="#FFFFFF" fvars="xmlDataPath = /simpleviewer/gallery1/imageData.xml" /]

    Then edit the ImageData.xml file in your gallery, like so:


    <SIMPLEVIEWER_DATA maxImageDimension="358" textColor="0x000000" frameColor="0x000000" bgColor="0xFFFFFF" frameWidth="2" stagePadding="20" thumbnailColumns="2" thumbnailRows="5" navPosition="right" navDirection="LTR" title="Gallery 1" imagePath="/simpleviewer/gallery1/images/" thumbPath="/simpleviewer/gallery1/mcbeanshow/thumbs/">

    And notice again the relative paths to the images and thumbs folders.

    That should do it. If someone could do an independent test and let me know how it works, that would be great. Once we have a good description I'll add it into the codex.

  6. slambert
    Member
    Posted 8 years ago #

    Sorry, scratch that last part.

    Then edit the ImageData.xml file in your gallery, like so:

    <SIMPLEVIEWER_DATA maxImageDimension="358" textColor="0x000000" frameColor="0x000000" bgColor="0xFFFFFF" frameWidth="2" stagePadding="20" thumbnailColumns="2" thumbnailRows="5" navPosition="right" navDirection="LTR" title="Gallery 1" imagePath="http://domain.com/simpleviewer/gallery1/images/" thumbPath="http://domain.com/simpleviewer/gallery1/mcbeanshow/thumbs/">

    And notice the full paths to the images and thumbs folders.

  7. seville
    Member
    Posted 8 years ago #

    Hi slambert, I was really glad when I found your post, unfortunately mine is not working. It doesn't show anything in the post, except the title. I saved my gallery under mydomain.com/mygallery/mix/

    Kimili Flash is active and in my plugin folder, do I have to do anything else with this plugin?

    I changed the ImageData.xml file like you said:

    <?xml version="1.0" encoding="UTF-8"?>

    <SIMPLEVIEWER_DATA maxImageDimension="358" textColor="0x000000" frameColor="0x000000" bgColor="0xCCCCCC" frameWidth="2" stagePadding="20" thumbnailColumns="2" thumbnailRows="5" navPosition="left" navDirection="LTR" title="mix" imagePath="http://mydomain.com/mygallery/mix/images/" thumbPath="http://mydomain.com/mygallery/mix/thumbnails/">

    the only think what I didn't understand why do you have "mcbeanshow" in your Thumbpath?

    I put in the post:

    [kml_flashembed movie="/mygallery/mix/viewer.swf" height="500" width="500" quality="best" bgcolor="#FFFFFF" fvars="xmlDataPath = "/mygallery/mix/imageData.xml" /]

    In this part it doesn't have to be the full path, right?

    that should be right so far, I guess. Since I'm a newbie, where do I have to put this in the post, in the wysiwyg view or in the source code, I tried both but none is working.

    Just FYI, I'm using the default Theme you get at the beginning.

    It would be great if you can help find the error

    thanks a lot

    Seville

  8. slambert
    Member
    Posted 8 years ago #

    Kimili Flash is active and in my plugin folder, do I have to do anything else with this plugin?

    Not really, the plugin just enables you to insert the flash code into the post.

    the only think what I didn't understand why do you have "mcbeanshow" in your Thumbpath?

    Whoops, that was leftover code from my own experiment.

    I put in the post:

    [kml_flashembed movie="/mygallery/mix/viewer.swf" height="500" width="500" quality="best" bgcolor="#FFFFFF" fvars="xmlDataPath = "/mygallery/mix/imageData.xml" /]

    In this part it doesn't have to be the full path, right?

    right.

    that should be right so far, I guess. Since I'm a newbie, where do I have to put this in the post, in the wysiwyg view or in the source code, I tried both but none is working.

    it works in the wysiwyg mode for me.

    I'm not sure why it's not working. When you go straight to: mydomain.com/mygallery/mix/ does the simpleviewer work? Can you send your real URL so I can take a look? And when you say the images aren't loading, does the flash preloader thing work?

  9. seville
    Member
    Posted 8 years ago #

    Hey slambert thanks a lot for your quick reply. the link to the gallery is http://afrison.com/mygallery/mix/

    It might have been to do, that I don't have the wordpress files not directly under my domain. All wordpress files are under the folder wordpress. Is this maybe the problem? Do I have to put all files directly under wordpress?

    But I also copied the gallery "mix" under the folder wordpress and tried it out, still not working

    http://afrison.com/wordpress/mygallery/mix/

    I add /wordpress/ in ImageData.xml and in the post.

    <?xml version="1.0" encoding="UTF-8"?>

    <SIMPLEVIEWER_DATA maxImageDimension="358" textColor="0x000000" frameColor="0x000000" bgColor="0xCCCCCC" frameWidth="2" stagePadding="20" thumbnailColumns="2" thumbnailRows="5" navPosition="left" navDirection="LTR" title="mix" imagePath="http://afrison.com/wordpress/mygallery/mix/images/" thumbPath="http://afrison.com/wordpress/mygallery/mix/thumbnails/">

    [kml_flashembed movie="/wordpress/mygallery/mix/viewer.swf" height="500" width="500" quality="best" bgcolor="#FFFFFF" fvars="xmlDataPath = "/wordpress/mygallery/mix/imageData.xml" /]

    the link to the comment where it should show the gallery is

    http://www.afrison.com/wordpress/

    It should shown right under Imageviewer Flash

    Thank you so much for helping me

    Seville

  10. slambert
    Member
    Posted 8 years ago #

    Ok, we're getting closer. Your galleries are working in both places. I don't think you need to put the gallery in the wordpress folder, so let's try to get it working in the mygallery folder off the domain. I think your imageData.xml file is fine.

    One thing that's interesting is that the flash viewer isn't showing up in the post. I think something is up with the code in the post.

    Basic stuff:

    1. Do you have the most recent version of the Kimili plugin?

    2. Experiment with this part:

    [kml_flashembed movie="/mygallery/mix/viewer.swf" height="500" width="500" quality="best" bgcolor="#FFFFFF" fvars="xmlDataPath = "/mygallery/mix/imageData.xml" /]

    - try putting in the full path and see what that does.
    - find another flash file (.swf) and put it in the /mix/ folder and see if you can get that to show up in the post.

    Let me know what happens...

  11. seville
    Member
    Posted 8 years ago #

    still not working :(

    I have the most recent Kimili plugin

    I tried it with the full path

    I created a small flash file and uploaded it into the mix folder and into the mygallery folder text.swf

    http://afrison.com/mygallery/mix/test.swf or http://afrison.com/mygallery/test.swf

    and put in the post following code

    [kml_flashembed movie="/mygallery/mix/test.swf" height="300" width="300" quality="best" bgcolor="#FFFFFF" /]

    [kml_flashembed movie="/mygallery/test.swf" height="300" width="300" quality="best" bgcolor="#FFFFFF" /]

    it's still not showing the flash file, does it have to do something with the plugin, I don't really know.

    I'm pretty frustrated cause I really would like to have this gallery work.

    I really appreciate your help

    Seville

  12. slambert
    Member
    Posted 8 years ago #

    With the other more basic flash file not working, I think it has to do with the kimili plugin or the flash code in the post. Your galleries seem fine. Look at the Kimili site for support and other flash topics on this support forum. There has to be something simple we're overlooking.

    I know how frustrating it is. Let me know when you get it working. I am really curious what the problem is.

  13. seville
    Member
    Posted 8 years ago #

    Thanks a lot, I will try to find it out and let you know.

    Seville

  14. jwurster
    Member
    Posted 8 years ago #

    I think you are missing something. Here is what I have in my page which works:

    <kml_flashembed movie="http://www.yoursite.com/galleries/test/viewer.swf" height="650" width="650" fvars="xmlDataPath = http://www.yoursite.com/galleries/test/imageData.xml" bgcolor="#ffffff"></kml_flashembed>

  15. davidchait
    Member
    Posted 8 years ago #

    fyi, you really don't need the plugin. it's just adding overhead processing to every post on your site. flash can be embedded in html script blocks, standard.

  16. seville
    Member
    Posted 8 years ago #

    Thank you so much for your help. I tried it out without the plugin right now. With the plugin it just doesn't work.

    @jwurster

    the only difference what I had was that you us <<kml_flashembed and at the end ></kml_flashembed>

    instead of [kml_flashembed... and .../]

    in your case I have to put the code in the source code view, right?

    @davidchait

    thanks for the tip, it looks more successfull, at least it is loading the page, or it looks like and then nothing is coming up. It is not loading the xml data, what do I have to insert, that it's loading the pictures?

    http://www.afrison.com/wordpress/

    this is the source code for the post

    <object id="viewer" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="100%" width="100%" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
    <param value="16722" name="_cx" />
    <param value="2910" name="_cy" />
    <param name="FlashVars" />
    <param value="http://afrison.com/mygallery/mix/viewer.swf" name="Movie" />
    <param value="http://afrison.com/mygallery/mix/viewer.swf" name="Src" />
    <param value="Window" name="WMode" />
    <param value="-1" name="Play" />
    <param value="-1" name="Loop" />
    <param value="High" name="Quality" />
    <param name="SAlign" />
    <param value="-1" name="Menu" />
    <param name="Base" />
    <param value="sameDomain" name="AllowScriptAccess" />
    <param value="ShowAll" name="Scale" />
    <param value="0" name="DeviceFont" />
    <param value="0" name="EmbedMovie" />
    <param value="CCCCCC" name="BGColor" />
    <param name="SWRemote" />
    <param name="MovieData" />
    <param value="1" name="SeamlessTabbing" />
    <param value="0" name="Profile" />
    <param name="ProfileAddress" />
    <param value="0" name="ProfilePort" /></object>

    @slambert,

    I will still try to make it work with the plugin and hopefully I can tell you what was wrong.

    Thanks in advance

    Seville

  17. slambert
    Member
    Posted 8 years ago #

    Just to note the reason the kml_flashembed code is different is because the latest version uses the [square brackets] and no closing the tag. The old version used <regular brackets and a closing tag.

  18. seville
    Member
    Posted 8 years ago #

    @slambert, thanks for the information.

    I installed wordpress (english version) on another domain and only installed the plugin and write a post with the same instructions you gave before. But what a surprise, it's just not working. :( even a normal flash file isn't showing up.

    http://www.derfrison.com/

    is it possible it has something to do with the host provider?

    Thanks for any help

    Seville

  19. seville
    Member
    Posted 8 years ago #

    <script type="text/javascript">
    // <![CDATA[

    var flashObject = new FlashObject("http://afrison.com/simpleviewer/Sevilla/viewer.swf","fm_viewer","500","500","6","#FFFFFF","","best","","");
    flashObject.write("fo_targ_viewer");

    // ]]>
    </script>

    This is the code that the browser is trying to run, but nothing is displaying on the page. The current url path works fine. I pasted the path into a browser and there were no issues.

    http://afrison.com/simpleviewer/Sevilla/viewer.swf

  20. Shelby DeNike
    Member
    Posted 8 years ago #

    Has anyone tried to modify the Simple Viewer Admin index.php file? I am going to look into this tonight and see what I can come up with. But maybe there is a way to wrap wordpress around that file ....

  21. seville
    Member
    Posted 8 years ago #

    if that helps that would be great!

    Thanks

    Seville

  22. davidchait
    Member
    Posted 8 years ago #

    My embedded code looks something like this:

    <script language="javascript" type="text/javascript" src="flash_detect.js"><!-- function getFlashVersion() { return null; }; --></script><script language="javascript" type="text/javascript"><!-- var flashVersion = getFlashVersion(); if (flashVersion < 6) { location.replace("upgrade.html"); } --></script>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="720" height="550" align="middle" valign="top">
    <param name="movie" value="../viewer.swf" />
    <param name="quality" value="high" />
    <param name="scale" value="noscale" />
    <param name="wmode" value="transparent" />
    <param name="BGCOLOR" value="#AC90CB" />
    <param name="FlashVars" value="xmlDataPath=../imageData.xml" />
    <embed src="../viewer.swf" width="720" height="550" align="middle" valign="top" quality="high" scale="noscale" bgcolor="#AC90CB" type="application/x-shockwave-flash" wmode="transparent" FlashVars="xmlDataPath=../imageData.xml" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>

    Note the TWO occurrances of "FlashVars" -- I believe both cases are needed to ensure the xml data is located properly. In my case, a relative path worked. I think for the general case you'd need to embed the entire local path to the file -- but not sure.

    Again, all without using any sort of plugin. ;)

    -d

  23. Shelby DeNike
    Member
    Posted 8 years ago #

    I came across this ... http://ibt-media.com/?page_id=25 .. Doesn't seem to be the best method though. But its a start. I have been messing with trying to get it all to work on my site by editing the SimpleViewerAdmin .... but alas no luck yet.

  24. seville
    Member
    Posted 8 years ago #

    thanks for your help.

    I tried your code and it suddenly worked in wordpress after I tried it several times. Then I changed just the width and it didn't work again. I tried it hundred times again and it is frustrating, it's not working for any reason.

    I put your code in a html file and uploaded online. It works fine

    http://www.afrison.com/simpleviewer/Sevilla/index2.htm

    then I copied the code from my html file into a post of wordpress:

    <script language="javascript" type="text/javascript" src="flash_detect.js"><!-- function getFlashVersion() { return null; }; --></script><script language="javascript" type="text/javascript"><!-- var flashVersion = getFlashVersion(); if (flashVersion < 6) { location.replace("upgrade.html"); } --></script>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="720" height="550" align="middle" valign="top">
    <param name="movie" value="http://www.afrison.com/simpleviewer/Sevilla/viewer.swf" />
    <param name="quality" value="high" />
    <param name="scale" value="noscale" />
    <param name="wmode" value="transparent" />
    <param name="BGCOLOR" value="#AC90CB" />
    <param name="FlashVars" value="xmlDataPath=http://www.afrison.com/simpleviewer/Sevilla/imageData.xml" />
    <embed src="http://www.afrison.com/simpleviewer/Sevilla/viewer.swf" width="720" height="550" align="middle" valign="top" quality="high" scale="noscale" bgcolor="#AC90CB" type="application/x-shockwave-flash" wmode="transparent" FlashVars="xmlDataPath=http://www.afrison.com/simpleviewer/Sevilla/imageData.xml" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>

    and suddenly it worked, but just once, after I made a tiny change on the width, it didn't work anymore :(

    http://www.afrison.com/wordpress/

    After I saved the post and check the html code again in the post it shows me this:

    <script language="javascript" src="http://www.afrison.com/wordpress/wp-admin/flash_detect.js" type="text/javascript"><!-- function getFlashVersion() { return null; }; --></script><script language="javascript" type="text/javascript"><!-- var flashVersion = getFlashVersion(); if (flashVersion < 6) { location.replace("upgrade.html"); } --></script><object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="550" width="720" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
    <param value="19050" name="_cx" />
    <param value="14552" name="_cy" />
    <param name="FlashVars" />
    <param value="http://www.afrison.com/simpleviewer/Sevilla/viewer.swf" name="Movie" />
    <param value="http://www.afrison.com/simpleviewer/Sevilla/viewer.swf" name="Src" />
    <param value="Transparent" name="WMode" />
    <param value="-1" name="Play" />
    <param value="-1" name="Loop" />
    <param value="High" name="Quality" />
    <param name="SAlign" />
    <param value="-1" name="Menu" />
    <param name="Base" />
    <param name="AllowScriptAccess" />
    <param value="NoScale" name="Scale" />
    <param value="0" name="DeviceFont" />
    <param value="0" name="EmbedMovie" />
    <param value="AC90CB" name="BGColor" />
    <param name="SWRemote" />
    <param name="MovieData" />
    <param value="1" name="SeamlessTabbing" />
    <param value="0" name="Profile" />
    <param name="ProfileAddress" />
    <param value="0" name="ProfilePort" /></object>

    its weird that it shows

    ><script language="javascript" src="http://www.afrison.com/wordpress/wp-admin/flash_detect.js" type="text/javascript"><!--

    but I don't have a flash_detect.js in the wp-admin folder. Why isn't it http://www.afrison.com/simpleviewer/Sevilla/flash_detect.js

    Any suggestions? It is really frustrating, it worked once and not anymore and I tried everything :(

    Thanks for helping me

    Seville

  25. amos
    Member
    Posted 8 years ago #

    Guys,
    I managed to do it. I've posted on my blog a step-by-step.
    http://www.amoswong.com/how-to-integrate-simpleviewer-with-wordpress.html

    I used:
    1. WordPress2
    2. Kimili Flash Embed
    3. SimpleViewer 1.7

    I did it on a page, though. I'll try to get it done in a post. :)

  26. amos
    Member
    Posted 8 years ago #

    Woohoo! SimpleViewer is working on both my WordPress pages and blog posts.

    WordPress pages example:
    http://www.amoswong.com/how-to-integrate-simpleviewer-with-wordpress.html

    WordPress blog post example:
    http://www.amoswong.com/paris-in-a-post.html

  27. Shelby DeNike
    Member
    Posted 8 years ago #

    now are you able to do multiple albums with it as the simple viewer admin allows? Also it would be nice if we could figure a way to wrap the wordpress theme around the simple viewer kind of like wpg2 does

  28. seville
    Member
    Posted 8 years ago #

    FINALLY! I got the error. it was just a little error which I found after I was comparing the source code of my website with source code of other website, which are using simpleviewer already.

    [kml_flashembed movie="/mygallery/mix/viewer.swf" height="500" width="500" quality="best" bgcolor="#FFFFFF" fvars="xmlDataPath = <strong>"<strong>/mygallery/mix/imageData.xml" /]

    instead it should be

    ...fvars="xmlDataPath = /mygallery/mix/imageData.xml" /]

    Can you see it? I just had a quotation mark in front of /mygallery... where it shouldn't be.

    Sorry that I messed up the thread, but you all helped me alot.

    Seville :-)

  29. seville
    Member
    Posted 8 years ago #

    Here I go again. Ok, the simpleviewer is working, but when I add a second gallery to the same category it only shows the picture of the first gallery in the new post and the old post, where the first gallery should be is empty. Is it not possible to post two galleries?

    Hope you can help me again.

    Thanks

    Seville

  30. amos
    Member
    Posted 8 years ago #

    Didn't quite catch your problem.
    As far as I could understand from your question, I suppose it is possible to have 2 galleries in a single post. Or are we talking about 2 different galleries in 2 different posts? :p

Topic Closed

This topic has been closed to new replies.

About this Topic