write to file on adding photo
pbyjp
Joined: 2002-11-12
Posts: 260 |
Posted: Mon, 2003-10-20 15:16 |
Hi, list($w, $h) = $item->getThumbDimensions($i); if ($w <= 150 && $h <= 125) { $random_file = fopen("/home/www/extreme-z.com/htdocs/appearance/my_photos.txt","a"); $newline = $gallery->app->photoAlbumURL . "/" . $gallery->session->albumName . "/$name" . "|0|1|" . $gallery->app->albumDirURL . "/" . $gallery->session->albumName . "/$name.thumb.$tag" . "|$caption\r\n"; fwrite($random_file,"$newline"); fclose($random_file); } I am trying to have this line added too when i add a photo with gallery_remote2.php, however, i couldn t find where the code should be added... |
|
Posts: 93
I changed a couple things to make it work for the gallery_remote2.php and variables it has. heres the version to add:
add that as indicated here(taken starting at line 501):
this should work...
joel
Posts: 260
all right... thanks to you it works!
BUT! my remote_gallery2.php is in a different folder than my gallery installation.
my installation is in /ad
remote_gallery is in another (non-embedded / back up installtion) in /ad/gallery.
Therefore, $gallery->app->photoAlbumURL has /gallery at the end of its URL but it shouldn t...
what is my problem? is it due to gallery_basedir? should i change smth in the gallery_remote file or what?
also, $name is not the correct name of the file as it includes $tag... so, in gallery_remote2.php, in the little bit of code we add, we have to replace $name by $originalFilename. Also i noticed that gallery_remote has no code to clean $name in case it is a duplicate... at least, it is missing some code we find in /classes/albums.php... is it smth to change in future releases?
thanks for your help and time.
Paul
Posts: 93
have you gotten this working?