Standalone multi mode slideshow - Page 2 Standalone multi mode slideshow - Page 2
 

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]

Main Menu

Standalone multi mode slideshow

Started by phill104, October 14, 2007, 11:10:09 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

tinorebel

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:

<?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)
Live long and prosper!
www.tripodart.net

tinorebel

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

<?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:

$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! 
Live long and prosper!
www.tripodart.net

classicridge

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

phill104

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

classicridge

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

tinorebel

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
<?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.
Live long and prosper!
www.tripodart.net

Nibbler


tinorebel

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:
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.
Live long and prosper!
www.tripodart.net

Nibbler

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


<?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:


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

tinorebel

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

Just had to correct the url
$slideshow[ 'link' ][ $i ] = array ( array ( 'url'=> 'gal/displayimage.php?pos=-' . $pidlist[$i] , 'target'=>"_top" ));
and delete gal/
$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!
Live long and prosper!
www.tripodart.net

tinorebel

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! ;)
Live long and prosper!
www.tripodart.net

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

tinorebel

 :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
for ( $i=0; $i<14; $i++ ){
to
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
Live long and prosper!
www.tripodart.net