Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Flash Slideshow  (Read 10720 times)

0 Members and 1 Guest are viewing this topic.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Flash Slideshow
« on: October 22, 2004, 08:01:24 pm »

I've seen a few posts requesting options for the slideshow feature in Coppermine (awseome by itself).  I happen to be pretty good at Flash and have created a Flash slideshow and since this is such an awesome script, this will be one of my contributions for my appreciation if there's enough interest.  It's php based and creates a xml that reads the user's images (default userpics/ directory).  It must be jpg's only (no other file extensions & no progressive jpg) or you can modify the excludes later (I'm going to exclude the thumb_ and normal_ prefixes for now).  It scales the images automatically (to a max of 800x600) and the user can control the slideshow via pause/manual control.  There's audio built in this sample, but any and all suggestions will be considered (ie, load your own music?).  Give me a few days to implement (if the interest is here) and I'll post a mod.  This is a sample -

*old link removed

Press F11 for full screen.  I'm initially thinking just a link option on the slideshow page, but again, all suggestions welcome. Let me know also if it works in other browsers - currently unknown.  It should also check for your latest Flash Player version and prompt accordingly.

Thanks again for a great program!

« Last Edit: March 02, 2005, 05:16:45 pm by rphMedia »
Logged

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: Flash Slideshow
« Reply #1 on: October 22, 2004, 09:58:54 pm »

Now, that's one VERY good looking slideshow.... very impressive and highly professional looking.... I wouldn't mind running that into my Coppermine's.... :-)

Kim Igel.
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Flash Slideshow
« Reply #2 on: October 22, 2004, 10:16:18 pm »

Very nice.  Works in firefox.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #3 on: October 23, 2004, 04:50:39 pm »

OK, here's the code that Flash looks for when parsed.  The red highlight is currently hardcoded and this is where it needs the "user's folder" relative to Coppermine root. This is the only thing I can't figure out (coming from say, displayimage.php). The "excludes" can be changed based on how you personally have user folders setup (if you allow zip files or docs, for instance).
Other than that, Flash reads this output and generates what you see above.  I can configure the swf to accept captions, load music - and any other suggestions anyone has to offer.


<?
$xml = '<?xml version="1.0" encoding="UTF-8" ?>';
$xml .= '<slideshow><settings><image_folder>images</image_folder><time>3</time><fade>1</fade><repeat>true</repeat><captions>true</captions></settings><images>';
$count = "1";
$style = opendir("images");
$exclude = array("desc","php","html");
   while($stylesheet = readdir($style)) {
if (stristr($stylesheet,$exclude[0]) || stristr($stylesheet,$exclude[1]) || stristr($stylesheet,$exclude[2]) || strlen($stylesheet)< 3 ) continue;
              $xml .= '<image>';
         $xml .= '<file>'.$stylesheet.'</file>';
         $xml .= '<caption></caption>';
         $xml .= '</image>';
      $count++;
      }
closedir($style);
$xml .= '</images></slideshow>';
echo $xml;
?>


Any contribution would be appreciated.
« Last Edit: October 27, 2004, 01:58:32 pm by rphMedia »
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #4 on: October 26, 2004, 05:18:37 pm »

Removed, lack of interest.
« Last Edit: October 27, 2004, 12:23:24 am by rphMedia »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Flash Slideshow
« Reply #5 on: October 27, 2004, 06:19:29 am »

what do you mean by "lack of interesst"? Does this mean you're not interessted or people are not interessted in your mod? You have to understand that people hardly browse the "general discussion" board, that's why there's little feedback from users asking you to actually post your hack, but I can assure you that there certainly are people interessted in this mod, especially once you actually come up with some code, so this thread can be moved over to the mods section.
It's a pity you removed your postings, I wish you hadn't.

Joachim
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #6 on: October 27, 2004, 01:07:58 pm »

Ah, 6, 1/2 dozen.  I didn't remove them out of any discontent, I assure you.  I asked for a bit of help and that may have been the reason for no additional responses.  I merely assumed that some read the subsequent posts (code included, btw) and they may have thought I was looking for a free ride.  Not the case.  I see collaboration everywhere on this forum (nice to get many points of view/expertise) and I thought that this would be perfect to launch a discussion.  I got the brawn, you go the brains type o' thing.  Like I said above, I did get this working great in another file transfer script, but ran across Coppermine and and was awed by its look & feel/power and "converted"  :)  Now, I'm simply trying to convert all of my extras, but this package is intense.  And what a better way to do it than dealing with the experts that play with it often (not just you devs).  I know that not everyone has time to fool around with this, but it's a balance of "would this be a nice inclusion?" vs. "I got a few minutes, whatta ya' need?".

I will repost; I didn't realize it would be taken that way.  Maybe move it to the mod section (as you said, more visibility) and [we] can get this thing going?  I have a lot to offer Joachim, and I will continue to post extras (ya' didn't have to downgrade my status, geeeezzz).  As an "interdeidate Flasher", I can spif this interface up a bit (NOT that it needs much more).  From Flash music/video players, to blogs/chat apps, to maybe just some minor animations of sort.

I'll repost that code and let's go from there.  I didn't want to PM this (respect your sig), but you may remove this stuff if you would. Detracts from the intent.  I look forward to helping out, I really do.  You won't be disappointed. Keep up the great work and sorry for the "confusion".

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Flash Slideshow
« Reply #7 on: October 27, 2004, 02:13:10 pm »

It is a nice slideshow - may be you can make it such that it does not have to preload all the pictures before it starts to display...
Logged
SANIsoft PHP applications for E Biz

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #8 on: October 27, 2004, 02:25:00 pm »

It is a nice slideshow - may be you can make it such that it does not have to preload all the pictures before it starts to display...

Are you on a dial-up?  Cause this is the kind of info I need.  I'm on a cable conection, so it's transparent to me.  How does it load/delay for you?  The music could be part of the prob; the sample images are small in nature.

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Flash Slideshow
« Reply #9 on: October 27, 2004, 03:06:14 pm »

I am on a cable as well but I did notice the delay and then saw that all the pictures were being preloaded... this can be a problem for anything more than a few dozen even if the person is on a dsl
Logged
SANIsoft PHP applications for E Biz

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #10 on: October 27, 2004, 03:23:06 pm »

Hmm, weird.  When I click the link (after a clear cache), it took about 2 seconds to start (w/music).  I removed the music.  See if it's any better when you have time.

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: Flash Slideshow
« Reply #11 on: October 27, 2004, 04:49:42 pm »

ok, I admit, - I'm a total ignorant when it comes to flash.. :-) so, - what am I supposed to do with your XML output ? ???
I can see from the 'source' of your demo, - that you include an OBJECT, - with a guid, - codebase and so on... it that how to do it ? is it universal, - like : will it work for all 'guest' if I do exactly what's in your html source (from what I get with view source)

and the xml output....is that going into a .swf file ?, - like a batch-update every now and then, - that generates the input file for the flash player.... or will the output from your php code be piped into the flash player.. ?

Sorry for my obvious newbie questions here, - but I'd really like to try it :-) and I have no idea where to start....

Kim Igel.
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #12 on: October 27, 2004, 05:20:44 pm »

Well, don't worry about the Flash content, that will work on any server.  The xml file could essentially be structured by hand (in this particular case, the php parses it - sorta like parsing html with the echos).  Flash is merely reading that xml file after it's parsed.  If you put that php file right next to an /images folder full of images on your server, you'll see the output structure.

Here's an example link - *old link removed Those are all the images in that folder (called "yourimages") and the code above is what spits it out.  Flash then "reads" the file and starts the show.

What I think would be efficient is to have a link that fires the user folder (ie, /CMG root/albums/userpics/00034/) to that php file.  And you know, there's probably an easy way to do it, but I just can't figure it out (from displayimage.php for instance).  Just another link icon for an option.  View Coppermine slideshow, or view a flash slideshow.
« Last Edit: March 02, 2005, 05:14:28 pm by rphMedia »
Logged

kiig

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 141
    • Igel's Journaler
Re: Flash Slideshow
« Reply #13 on: October 27, 2004, 06:50:45 pm »

ok, - don't understand it entirely.... but I assume I'm right in assumming one should call the php script you've provided, - to generate the xml output.

and the xml output should be saved as something.swf (if I change the html file to embed something.swf instead) ?

and the html file should include what you've got in the source of the demo you provided ?

Well, - that's what I think, - and it doesn't work... :-(

The xml output contains a relative path to the images ?, - in the top <image_folder>,  and the images are listed as supposed...

it fires up the flashplayer and then stalls....

any ideas ? :-)
Logged
Kim Igel
http://igel.it (Personal playground) or http://foto.igel.it (Paypal shop-site)

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #14 on: October 28, 2004, 03:25:05 pm »

Well, hopefully this will help.  You almost have the right idea, but no, the xml doesn't get changed to a swf, the swf file will be provided.

Unzip the attached and put these 3 files into a folder next to your images folder (rename the 2 images folder options in the php to YOUR folder (if your folder is called "00012", put "00012/" in between the <image_folder> tags AND the opendir ("00012"); function).

Then simply execute slideshow.html.  That's it, should work for you (or anyone else that would like to give it a go).

Now, the goal is to have the user's folder open if they're logged in.  I'm sure it's a matter of incuding a file or two in the Coppermine setup inside flashdata.php or a sql database lookup or whatever. If anyone can figure it out....this would be a nice mod I think.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #15 on: October 29, 2004, 12:24:40 pm »

Am I not asking the question right, or is this just not possible?  Thanks for any insight.

desert_dave

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Flash Slideshow
« Reply #16 on: October 31, 2004, 07:56:00 pm »

Almost there!
OK, I've got the file added and the show comes up with the controller and a big fat "Slideshow Demo" (Can we have a code without that? ) but then thats it. It's not picking up my jpg's. Here's what I've done on the lines that needed changing:
  '<slideshow><settings><image_folder>albums/userpics/10002</image_folder><time>3</time><fade>1</fade><repeat>true</repeat><captions>true</captions></settings><images>';
$count = "1";
$style = opendir("albums/userpics/10002");

The "flash" folder is sitting next to my "albums" folder where my user images are,  I'm stumped why it's not seeing them. Please advise if you can.
Thanks,
Dave




Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #17 on: October 31, 2004, 10:19:01 pm »

Hi Dave, I received your PM and am considering it.  Time is of the essense though  :)  Thanks for your interest!

All you're missing is the trailing slash ('/') in between the image folder tag.  Should be -

<image_folder>albums/userpics/10002/</image_folder>

Your opendir function is good to go.

And I will definitely remove the "demo" stuff for all to have for free if someone will help in configuring to use with CPG.  I've been working on this for a few days so far, to no avail.  I'm working on other projects as well.  We'll keep in touch.

desert_dave

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
Re: Flash Slideshow
« Reply #18 on: November 01, 2004, 02:54:14 am »

Well Ron.....
I added the trailing slash and still no go. I tried it without the account # just "/albums/userpics/"  and also no image loads. I got 4 jpg's in the file so now I'm really stumped.

I'm going to email someone thats real knowledgeable with cpg and hope to get a alt button for the show or replace the existing s/s button. I like it and really want to use it.

Desert_Dave  8)
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Flash Slideshow
« Reply #19 on: November 01, 2004, 12:20:57 pm »

Dave,

Just to clarify, you still don't have your slashes correct in your post (you may have tried other ways).  It should be albums/userpics/ (no leading slash)

And the 4 images in this case would have to be in your userpics/ folder.

Anyway, I will provide an example (with a xml file) and a few images for you to play with and get the feel of what's going on and how it works.  It's not really that difficult in comparison to say, PHP (One comma or quote out of place and you have failure).

Also, make sure that your images are not "progressive".  This is a setting in images editors to allow for streamed download.  Just have to be plain old jpgs.  I'll post another example soon.

Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.