François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« on: October 14, 2007, 09:08:35 pm » |
|
FileMove V 1.2 Hi all, here is a new plugin inspired by Sanlogik who had a problem with the organisation from his albums folder What will this plugin do ?This plugin allow you to reorder the folder where are all your pictures (generally the album folder) You have two options: *tranfer the whole content from a folder to another *transfer only some files from a folder to another The files are transfered (normal, thumbnails, intermediars) and the database is updated Caution this plugin doesn't create new folders. If you will have new folders into your album foldern you must create them by FTP. It will have no changes in your albums, This is only managed the storage folder. Install* Unpack the archive and upload the "FileMove" directory structure to your Coppermine gallery's plugins folder. * Login as an admin, go to config, then "Manage Plugins" * Find the "FileMove" entry in the available plugins and click install. * A new menu button is now added in the admin menu. langagePlugin also avaible in English and French. *dutch.php lang file added (thank's Hein) *persion.php lang file added (thank's Sami) *italian.php lang file added (thank's Lontano) *spanish.php lang file addes (thank's Rubenix) Feel free to translate the lang/english.php language file to your own language. Version 1.1*Adding compatibility with Stramms Modpack (Thank's Stramm for your code) Version 1.2*Natural alphabetic sorting from the folder list Known issues* the plugin seems not workin with Internet Explorer
|
|
|
« Last Edit: July 21, 2008, 06:21:29 am by François Keller »
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Hein Traag
Dev Team member
   
Gender:
 Netherlands
Posts: 2153
A, B, Cpg
|
 |
« Reply #1 on: October 15, 2007, 12:25:59 pm » |
|
Translated into Dutch. Added as dutch.php.txt (no means of zipping). Going to give this one a go on my test. Thanks Frantz! ** Configuration has the description in French  $description='Choisir les fichiers à déplacer et modifier la base de donnée en fonction'; What might be the best English translation ?
|
|
|
« Last Edit: October 15, 2007, 12:39:25 pm by Hein »
|
Logged
|
|
|
|
Hein Traag
Dev Team member
   
Gender:
 Netherlands
Posts: 2153
A, B, Cpg
|
 |
« Reply #2 on: October 15, 2007, 12:40:23 pm » |
|
Just tried it and it worked perfectly. Moved a folder and moved 1 file. It does the trick without errors. Update dutch.php.txt a bit.
|
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #3 on: October 15, 2007, 12:47:16 pm » |
|
$description='Choisir les fichiers à déplacer et modifier la base de donnée en fonction'; ooopss! forgotten it was in french sorry. translation could be: $description='Choose files to move and modify the database according'; thank's Hein for report and for dutch translation both will be added soon in the pack(done)
|
|
|
|
« Last Edit: October 15, 2007, 01:08:23 pm by Frantz »
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Hein Traag
Dev Team member
   
Gender:
 Netherlands
Posts: 2153
A, B, Cpg
|
 |
« Reply #4 on: October 15, 2007, 12:51:49 pm » |
|
Isn't $description='Choose files or a folder to move and modify the database according'; a better description as this plugin also allows folders to be moved around ?
|
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #5 on: October 15, 2007, 12:54:27 pm » |
|
Isn't $description='Choose files or a folder to move and modify the database according'; a better description as this plugin also allows folders to be moved around ? yes your right
|
|
|
|
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Pascal YAP
Dev Team member
   
Gender:
 Armenia
Posts: 3791
He's me, and She's Moon
|
 |
« Reply #6 on: October 15, 2007, 01:24:21 pm » |
|
Ola Frantz, It's OK, it's again a very usefull Plugin K+1 It's not good idea to post this same K+1 inside our French Board  Good work, good plugin... Bravo. PYAP
|
|
|
|
|
Logged
|
! Pas de PM please ! No PM s'il vous plait !
|
|
|
Sami
Dev Team member
   
Gender:
 Iran, Islamic Republic of
Posts: 3689
BMossavari
|
 |
« Reply #7 on: October 15, 2007, 02:03:56 pm » |
|
Good work Frantz Persian lang attached 
|
|
|
|
Logged
|
I don't answer to PM with support question Please post your issue to related board
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #8 on: October 15, 2007, 02:17:28 pm » |
|
thank's Sami your lang file will be added ASP ti the pack
|
|
|
|
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Davide Renda
Dev Team member
   
Gender:
 France
Posts: 1319
aka "Lontano"
|
 |
« Reply #9 on: October 15, 2007, 07:47:42 pm » |
|
Italian translation attached, just unzip inside the /lang directory. Great job Frantz, I wander if would this plugin be worth in being added to the core of next Coppermine release?
|
|
|
« Last Edit: October 20, 2007, 09:08:48 pm by Lontano »
|
Logged
|
|
|
|
rubenix
Coppermine novice

Gender: 
Posts: 40
|
 |
« Reply #10 on: October 15, 2007, 08:18:05 pm » |
|
nice plugin indeed Thanks a lot, was looking for something like that  attached my little contribution!! EDIT--> by the way I don't know if I can post the spanish translation as I'm not a 'frequent contributor'
|
|
|
« Last Edit: October 15, 2007, 08:25:55 pm by rubenix »
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #11 on: October 15, 2007, 08:33:18 pm » |
|
@Lontano Thank's for your translation I wander if would this plugin be worth in being added to the core of next Coppermine release? Not on the moment, the plugin is to new for this  @rubenix Thank's too for your translation EDIT--> by the way I don't know if I can post the spanish translation as I'm not a 'frequent contributor' not a problem, we are looking for all contributions. @both, your contribution will be added in the pack.
|
|
|
|
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Davide Renda
Dev Team member
   
Gender:
 France
Posts: 1319
aka "Lontano"
|
 |
« Reply #12 on: October 19, 2007, 08:56:04 am » |
|
Users of Stramm's Modpack please be aware this plugin moves all files according to standard Coppermine prefix: normal_, thumb_ and original file; Modpack also create mini_ and orig_ and these ones won't be moved instead.
Frantz, is there a way to include also these files for Modpack's users? A kind of quick hack to make it work?
|
|
|
|
« Last Edit: October 19, 2007, 09:37:01 am by Lontano »
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #13 on: October 19, 2007, 09:21:18 am » |
|
@lontano, you have to modify file_move() function (plugins/FileMove/include/function.inc.php) function file_move($file_name,$DRep,$ARep) { global $CONFIG; //Fichiers de départ $Dpath="./".$CONFIG['fullpath'].$DRep; $DFile=$Dpath.$file_name; $DFile_Thumb=$Dpath.$CONFIG['thumb_pfx'].$file_name; $DFile_Normal=$Dpath.$CONFIG['normal_pfx'].$file_name; //Fichiers d'arrivée $Apath="./".$CONFIG['fullpath'].$ARep; $AFile=$Apath.$file_name; $AFile_Thumb=$Apath.$CONFIG['thumb_pfx'].$file_name; $AFile_Normal=$Apath.$CONFIG['normal_pfx'].$file_name; //copie des fichiers, copy($DFile,$AFile); copy($DFile_Thumb,$AFile_Thumb); copy($DFile_Normal,$AFile_Normal); //effacement des fichiers d'origine unlink($DFile); unlink($DFile_Thumb); unlink($DFile_Normal); } by adding the mini_ and orig_ prefix (i don't know if te préfix are stored in the database and can be other that mni_ and orig_) code can be: function file_move($file_name,$DRep,$ARep) { global $CONFIG; //Fichiers de départ $Dpath="./".$CONFIG['fullpath'].$DRep; $DFile=$Dpath.$file_name; $DFile_Thumb=$Dpath.$CONFIG['thumb_pfx'].$file_name; $DFile_Normal=$Dpath.$CONFIG['normal_pfx'].$file_name; $DFile_mini=$Dpath."mini_".$filename;//for Stramm modpack $DFile_orig=$Dpath."orig_'.$filename;//for Stramm modpack //Fichiers d'arrivée $Apath="./".$CONFIG['fullpath'].$ARep; $AFile=$Apath.$file_name; $AFile_Thumb=$Apath.$CONFIG['thumb_pfx'].$file_name; $AFile_Normal=$Apath.$CONFIG['normal_pfx'].$file_name; $AFile_mini=$Apath."mini_".$filename;//for Stramm modpack $AFile_orig=$Apath."orig_".$filename;//for Stramm modpack //copie des fichiers, copy($DFile,$AFile); copy($DFile_Thumb,$AFile_Thumb); copy($DFile_Normal,$AFile_Normal); copy($DFile_mini,$AFile_mini);//for Stramm modpack copy($DFile_orig,$AFile_orig);//for Stramm modpack //effacement des fichiers d'origine unlink($DFile); unlink($DFile_Thumb); unlink($DFile_Normal); unlink($DFile_mini);//for Stramm modpack unlink($DFile_orig);//for Stramm modpack } for the "normal users"; comment the lines for the stramm modpack
|
|
|
|
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Davide Renda
Dev Team member
   
Gender:
 France
Posts: 1319
aka "Lontano"
|
 |
« Reply #14 on: October 19, 2007, 09:45:19 am » |
|
Merci Frantz, but I now get a Parse error: syntax error, unexpected '/' in /xxxx/include/function.inc.php on line 339 which correspond to this line $Apath="./".$CONFIG['fullpath'].$ARep; I've double-checked the code, but couldn't find anything...
|
|
|
|
« Last Edit: October 19, 2007, 10:07:08 am by Lontano »
|
Logged
|
|
|
|
Davide Renda
Dev Team member
   
Gender:
 France
Posts: 1319
aka "Lontano"
|
 |
« Reply #15 on: October 19, 2007, 10:18:11 am » |
|
Got rid of the error changing code in functions.ici.php as it follows function file_move($file_name,$DRep,$ARep) { global $CONFIG; //Fichiers de d�part $Dpath="./".$CONFIG['fullpath'].$DRep; $DFile=$Dpath.$file_name; $DFile_Thumb=$Dpath.$CONFIG['thumb_pfx'].$file_name; $DFile_Normal=$Dpath.$CONFIG['normal_pfx'].$file_name; $DFile_Mini=$Dpath.$CONFIG['mini_pfx'].$file_name;//for Stramm modpack //Fichiers d'arriv�e $Apath="./".$CONFIG['fullpath'].$ARep; $AFile=$Apath.$file_name; $AFile_Thumb=$Apath.$CONFIG['thumb_pfx'].$file_name; $AFile_Normal=$Apath.$CONFIG['normal_pfx'].$file_name; $AFile_Mini=$Apath.$CONFIG['mini_pfx'].$file_name;//for Stramm modpack //copie des fichiers, copy($DFile,$AFile); copy($DFile_Thumb,$AFile_Thumb); copy($DFile_Normal,$AFile_Normal); copy($DFile_Mini,$AFile_Mini);//for Stramm modpack //effacement des fichiers d'origine unlink($DFile); unlink($DFile_Thumb); unlink($DFile_Normal); unlink($DFile_Mini);//for Stramm modpack }
And it works! Thanks for having pointed me toward the good direction 
|
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #16 on: October 19, 2007, 10:22:55 am » |
|
thank's Lontano for reporting. I will add this modif in the pack with explanations for the modpack users ASP
|
|
|
|
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
Hein Traag
Dev Team member
   
Gender:
 Netherlands
Posts: 2153
A, B, Cpg
|
 |
« Reply #17 on: October 19, 2007, 10:31:07 am » |
|
Frantz, instead of telling Modpack users what to change in order to include the mini_ and orig_ prefixes is it maybe possible to add a kind of filter to your original code so it wil include mini_ and orig_ files if they are there ?
|
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #18 on: October 19, 2007, 10:57:48 am » |
|
@Hein,
your right, i'll see how to make the change (i must have a look to the modpack before)
|
|
|
|
|
Logged
|
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ? Did you read the DOC ? the FAQ ? and search the board before posting ? Mon Blog
|
|
|
|
Stramm
|
 |
« Reply #19 on: October 19, 2007, 11:39:42 am » |
|
haven't tested this... //modpack compatibility if(isset($CONFIG['mini_pfx'])) { $DFile_Mini=$Dpath.$CONFIG['mini_pfx'].$file_name; $DFile_Orig=$Dpath.$CONFIG['orig_pfx'].$file_name; $AFile_Mini=$Apath.$CONFIG['mini_pfx'].$file_name; $AFile_Orig=$Apath.$CONFIG['orig_pfx'].$file_name; if(file_exists($DFile_Mini)){ if(copy($DFile_Mini,$AFile_Mini)) { unlink($DFile_Mini); } } if(file_exists($DFile_Orig)){ if(copy($DFile_Orig,$AFile_Orig)) { unlink($DFile_Orig); } } }
edit: I should have said where to add this  in the plugins function.inc.php right after copy($DFile_Normal,$AFile_Normal);
add
|
|
|
|
« Last Edit: October 19, 2007, 01:16:51 pm by Stramm »
|
Logged
|
|
|
|
|