PDA

View Full Version : Merging 2 scripts



jr_yeo
06-05-2006, 10:11 AM
can i merge

http://www.dynamicdrive.com/dynamicindex4/cmotiongallery2.htm

with

http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

so that i dont have to enter the image urls manually? :) tnx :cool:

Twey
06-05-2006, 10:23 AM
I helped do something like this recently. Search.

nelsontimken
06-05-2006, 11:40 AM
It's here:

http://www.dynamicdrive.com/forums/showthread.php?t=10016&page=2

but I still couldnt get it to work.


Nelson

Twey
06-05-2006, 04:33 PM
<?php
// getpics.php
$directory = "."; // Directory in which the images are stored, relative to the location of this script. Must have the slash.

header("Content-Type: text/javascript");
$dir = opendir($directory);
for($i=0;$file = readdir($dir);$i++)
if(strpos($file, ".") === 0) {
$i--;
continue;
} else echo("fadeimages[$i]=['$directory/$file', '', ''];\n");
?>

nelsontimken
06-05-2006, 07:33 PM
If you go to :

http://www.protestantlawyersny.org/test.htm

you will see Twey's solution in action, except that:

1- I no longer can show two pictures side by side
(the second array doesnt seem to load)

2- there is an error generated on the page

3- the link effect on each pic is no longer enabled (not that I really see a need for such an effect).


Nelson

Twey
06-05-2006, 08:32 PM
nelsontimken, please only post in one thread.

Here (http://www.dynamicdrive.com/forums/showpost.php?p=38858&postcount=1337) is my response to that.

jr_yeo
06-06-2006, 05:03 AM
how recently? an hour ago? how many weeks ago? :cool:
an estimate number of "recently" would be fine...
coz im searching all threads where u have posted and i might need a time frame to start looking and not go thru all the 500+ threads :D tnx :cool:

Twey
06-06-2006, 06:41 AM
nelsontimken found it fine, and linked to it above. :)

jr_yeo
06-06-2006, 06:54 AM
but what nelson linked is Ultimate Fade In Slideshow

but what im asking is combining CMotion and PHP Album script? :)

is Ultimate Fade same as CMotion? :)

i should have posted the scripts' title and not just its link.... :eek:

my mistake... :D

jr_yeo
06-10-2006, 02:04 PM
anbody there can help me? :)

Twey
06-11-2006, 10:27 AM
Sorry, I thought I replied to this one... evidently not. All you have to do is change the line to match the format of the script's array. The same principle applies.