Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2]   Go Down

Author Topic: Standalone multi mode slideshow  (Read 39345 times)

0 Members and 1 Guest are viewing this topic.

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #20 on: May 12, 2008, 02:23:25 pm »

HAllo, I have just purchased a licence to the developer of the flash part, to be able to show the slide on my site without redirecting clics to the site of the developer.
One question: how can I arrange so that cliccing on a picture bings me to the coppermine page with the corresponding pic?
Would this be very complicated?
I have managed to link a clic to the image source.
doing so:
I modifyed source.php code as follows:

Code: [Select]
<?php

//include slideshow.php to access the Send_Slideshow_Data function
include "slideshow.php";
include 
"flashthumb.php";

for ( 
$i=0$i<14$i++ ){
$slideshow'slide' ][ $i ] = array ( 'url' => $url[$i+1]  , 'background' => "ffffff" 'duration' => 4);
 $slideshow'transition' ][ $i ] = array ( 'type' => "fade_to_white"'duration' => ); /* Where "z" can be "drop","fade_to_black" or "push_up" and y is the duration of the transition in seconds.+*/

$slideshow'transition' ][ ] = array ( 'type' => "drop"'duration' => );
$slideshow'transition' ][ ] = array ( 'type' => "fade_to_white"'duration' => );
$slideshow'transition' ][ ] = array ( 'type' => "push_up"'duration' => );

$slideshow'link' ][ $i ] = array ( array ( 'url'=> $url[$i+1] , 'target'=>"_blank" ));
                                   
                                    
                               
      
}

Send_Slideshow_Data $slideshow );



?>


Really just added:

$slideshow[ 'link' ][ $i ] = array ( array ( 'url'=> $url[$i+1] , 'target'=>"_blank" ));

That opens in a blank page the source image.

This works fine, but I guess could be done better :-\
If anyone can point me in the roght direction I would apreciate it ! 8)
Logged
Live long and prosper!
www.tripodart.net

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #21 on: May 21, 2008, 10:41:57 am »

Ok , finally I have decided to buy a licence and I am able to set links for each slide.

I have managed to link each picture to the jpg file, wich means cliccing on the slide will opena a new window with the corresponding picture.
Done this by modifing the code of file: source.php

Code: [Select]
<?php

//include slideshow.php to access the Send_Slideshow_Data function
include "slideshow.php";
include 
"flashthumb.php";

for ( 
$i=0$i<14$i++ ){
$slideshow'slide' ][ $i ] = array ( 'url' => $url[$i+1]  , 'background' => "ffffff" 'duration' => 4);
 $slideshow'transition' ][ $i ] = array ( 'type' => "fade_to_white"'duration' => ); /* Where "z" can be "drop","fade_to_black" or "push_up" and y is the duration of the transition in seconds.+*/

$slideshow'transition' ][ ] = array ( 'type' => "drop"'duration' => );
$slideshow'transition' ][ ] = array ( 'type' => "fade_to_white"'duration' => );
$slideshow'transition' ][ ] = array ( 'type' => "push_up"'duration' => );

 
$slideshow'link' ][ $i ] = array ( array ( 'url'=> $url[$i+1] , 'target'=>"_blank" ));
                                   
                                    
                               
      
}

Send_Slideshow_Data $slideshow );

?>



really just added the last line:

 
Code: [Select]
$slideshow[ 'link' ][ $i ] = array ( array ( 'url'=> $url[$i+1] , 'target'=>"_blank" ));
I would like to link the photos, not to the jpeg image but to the coppermine page that contains the photo... ???
can someone please help me?  I belive this feature would be really usefull to fully integrate this great slideshow! 
Logged
Live long and prosper!
www.tripodart.net

classicridge

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Standalone multi mode slideshow
« Reply #22 on: June 05, 2008, 04:05:59 pm »

I'm having a problem making the slideshow play more that 10 slides at a time. I'd like it to play around 50 or so. How can that be accomplished?

Ideally, I'd like it to flip through all images in the gallery every time, mo matter what the number is. Is that possible?

Thanks
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4817
    • Windsurf.me
Re: Standalone multi mode slideshow
« Reply #23 on: June 06, 2008, 11:57:30 pm »

Not really as it would take ages to load. 10-15 is about the limit.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

classicridge

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Standalone multi mode slideshow
« Reply #24 on: June 09, 2008, 06:37:52 am »

Thanks for the response. This slideshow works great - I had no trouble installing or changing the background color, etc.
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #25 on: June 20, 2008, 06:53:44 pm »

Hy I'm still trying to set each photo a link to the page wich contains the picture in coppermine.

I was thinking obout modifying flashthumb.php

If I understand correctly this file gets the picture url, so I was thinking maby it could get alsaw the picture 'pid' column in the database.

I was thinking of something like this:
flashthumb.php
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$xml '<image_folder></image_folder>';
if (
$FORBIDDEN_SET != ""$FORBIDDEN_SET "AND $FORBIDDEN_SET";
$result mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 15");
while (
$row mysql_fetch_array($result)) 
{
$type '';
$xml .= " ".get_pic_url($row$type) ."";
$xml1 .= " ".get_pic_pid($row$type) ."";
}
$url explode(" "$xml);
$pid explode(" "$xml1);


?>

But I'm shure i'ts not correctly written.

Since this line I guess is the one wich get's the picture url:
$xml .= " ".get_pic_url($row, $type) ."";

I'm trying to make the script get the picture pid with this line:

$xml1 .= " ".get_pic_pid($row, $type) ."";

Would it be possible to put this line some other way?

Any help will be apreciated.
 ;) Tell me if I'm compleatly wrong.
Logged
Live long and prosper!
www.tripodart.net

Nibbler

  • Guest
Re: Standalone multi mode slideshow
« Reply #26 on: June 20, 2008, 06:58:32 pm »

The pid is just $row['pid']
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #27 on: June 20, 2008, 07:13:29 pm »

Thanks Nibbler for your answer

I'm really a newby in Php so, I'm not shure how I could integrate this info into the script. ???

If pid is $row['pid']
Then would it be posible to retrive the pid in flashthumb.php in some easy way?

I would like to have the pid so I could get the correct link for a picture setting a link url for each random picture like:
Code: [Select]
gal/displayimage.php?pos=-"pid"
in the source.php file

I'm not shure I'm looking in the right direction :o Tell me if I'm wrong.
Logged
Live long and prosper!
www.tripodart.net

Nibbler

  • Guest
Re: Standalone multi mode slideshow
« Reply #28 on: June 20, 2008, 07:34:42 pm »

OK, in flashthumb.php add in the references to $pidlist like below:

Code: [Select]
<?php

define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
$xml '<image_folder></image_folder>';
$pidlist = array(); // added
if ($FORBIDDEN_SET != ""$FORBIDDEN_SET "AND $FORBIDDEN_SET";
$result mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 15");
while (
$row mysql_fetch_array($result)) 
{
$type 'normal';
$xml .= " ".get_pic_url($row$type) ."";
$pidlist[] = $row['pid']; // added
}

$url explode(" "$xml);

?>



and in source.php add in the link param like this:

Code: [Select]
$slideshow[ 'link' ][ $i ] = array ( array ( 'url'=> 'gal/displayimage.php?pos=-' . $pidlist[$i] , 'target'=>"_blank" ));
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #29 on: June 20, 2008, 08:00:01 pm »

 :D :D :D ;) ;)
YESSS! It works!! Thank you very much Nibbler!!!

Just had to correct the url
Code: [Select]
$slideshow[ 'link' ][ $i ] = array ( array ( 'url'=> 'gal/displayimage.php?pos=-' . $pidlist[$i] , 'target'=>"_top" ));and delete gal/
Code: [Select]
$slideshow[ 'link' ][ $i ] = array ( array ( 'url'=> 'displayimage.php?pos=-' . $pidlist[$i] , 'target'=>"_top" ));
all the rest works perfectly.
 8) 8) :D :DI think this is the best way to have a random show on homepage!

Big thanks again Nibbler!
Logged
Live long and prosper!
www.tripodart.net

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #30 on: June 20, 2008, 08:10:11 pm »

Just wanted to post a link to the result of the code Nibbler suggested;
 if someone wants to see how it works:

http://www.tripodart.net/

This is the homepage. Clik on any picture of the slideshow and you will be linked to the picture.
Clean and smooth! ;)
Logged
Live long and prosper!
www.tripodart.net

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4817
    • Windsurf.me
Re: Standalone multi mode slideshow
« Reply #31 on: June 20, 2008, 08:52:56 pm »

Fantastic work from Nibbler and tinorebel ;D

This is something I have been meaning to do for a long time but never quite got around to it.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Standalone multi mode slideshow
« Reply #32 on: June 20, 2008, 11:56:00 pm »

 :D :D The fantastik work if from Nibbler,
I have just asked a question..... ::)

Finally I decided to leave in the slideshow on my homepage ( www.tripodart.net ) the first tree pictures fixed.

I did this changing in slideshow.php
Code: [Select]
for ( $i=0; $i<14; $i++ ){to
Code: [Select]
for ( $i=2; $i<14; $i++ ){And added after the fixed links and urls for the first 3 pictures.


The random ones start from picture number 4.  Have fun! ;D
Logged
Live long and prosper!
www.tripodart.net
Pages: 1 [2]   Go Up
 

Page created in 0.02 seconds with 20 queries.