forum.coppermine-gallery.net
Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: François Keller on October 14, 2007, 10: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.
langage
Plugin 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
-
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 ?
-
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.
-
$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)
-
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 ?
-
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
-
Ola Frantz,
It's OK, it's again a very usefull Plugin ;D K+1 ;)
It's not good idea to post this same K+1 inside our French Board :D
Good work, good plugin... Bravo.
PYAP
-
Good work Frantz
Persian lang attached ;)
-
thank's Sami
your lang file will be added ASP ti the pack
-
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?
-
nice plugin indeed :o
Thanks a lot, was looking for something like that :P
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'
-
@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.
-
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?
-
@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
-
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...
-
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 ;)
-
thank's Lontano for reporting. I will add this modif in the pack with explanations for the modpack users ASP
-
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 ?
-
@Hein,
your right, i'll see how to make the change (i must have a look to the modpack before)
-
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
-
Thank's Stramm,
will ask Lontano for testing
new 1.1 version including Stramm's code for compatibility with the Modpack code attached in the very first post
-
Just realised I did a couple of errors in translating... correct lang file has been replaced on my previous post. Sorry!
-
Lontano,
i'll replace italian lang file in the pack
-
New version attached on the very first post of this thread:
Folder list is now sorted alphabeticly
-
Am I missing something? I installed the plugin and it seems to be working, but when I click the folder I can't do anything after that... none of the buttons (all, some, back) do anything??
-
can you attach screenshots after clicking the folder ?
-
http://www.stuff.hqubed.com/uploads/copperminemoveallbuttonclick.JPG
-
and what happend when you click on the move some files button ?
-
Nothing... that's what perplexes me... no usual sound, no loading... nothing (for any of them.)
-
try to reupload all the plugin files
-
Hahaha wow.
Well, as it turns out... this plugin (for me, at least?) only works in FIREFOX.
I tried all three versions of this plugin in IE 7 but it simply didn't work... so I loaded up Firefox portable and it worked fine, how silly.
Thank you for such a GREAT plugin, I like to keep my folders clean and this will certainly do the trick!!
-
Well, as it turns out... this plugin (for me, at least?) only works in FIREFOX.
humm, i'll test this (not tested before)
thank's for this report
-
This only works in Firefox for me too.
I love this plugin though! I started using "Batch Add" after uploading 8000+ images with the simple "Upload File" feature on coppermine ::) So this plugin helps me organize those 8000+ images from /userpics/ in different folders under /albums/ better. And I can organize those folders under /albums/ better ;D Thank you!!
-
Tested on IE and actually work not :-\
I 'll have a look to find out what goes wrong
-
Hi Fancois,
I am translating the Plug-In into German. I am not sure about the meaning of these parts:
Select the folder you will move
Choice of the operation
in to
I understand the words - but not really what they mean, the context. I need that understanding however in order to choose the right words - otherwise it could end up more confusing than helping.
I am not running the plugin myself, therefore I am asking you here now. I hope that is ok.
-
Hi,
Select the folder you will move
will mean, in case you will move an entire directory (with all his content), to select this directory folder
Choice of the operation
English sentence surely not good (but it's not my mother language): it will mean what will you do
in to
exemple: the yourselectedfile.jpg will be moved into the selectedfolder
hope it's clear anougth ;)
-
Thanks, that was what I needed.
I add the translation to this post.
-
thank's, your contribution will be added in the pack ASP
-
Tested on IE and actually work not :-\
I 'll have a look to find out what goes wrong
Hi, inexperienced user here, I have uploaded this and get to the same stage as above, i.e it does not work in ie(8)?
Has this moved on since the last post?
Brian.
-
no, actual, the plugin doesn't work as expected with IE
-
no, actual, the plugin doesn't work as expected with IE
Many thanks Francois for the prompt response. I take it if I download Firefox it will work with that. I need a facility on Coppermine that let's me manage image locations for a Camera Club in order that they can be downloaded easily over FTP.
Many thanks in advance.
-
it's on my todo list to see why it doesn't work with IE but for the cpg1.5 plugin
-
it's on my todo list to see why it doesn't work with IE but for the cpg1.5 plugin
OK Francois, I appreciate you are busy! For your info, as you could gather I dont use Firefox however I do use Google Chrome and it does appear to work on that. However I am not sure its doing what I envisaged it to. Via FTP I created a new folder in the Userpics Folder called "Open 1". I then went into the plugin and selected "move some files", selected my files and then I was given the option of the "Open 1" Folder to put them in via a little Directory Tree with Userpics at the top of it. I click to confirm and everything seems to go through ok.
However when I go into "Open 1" via ftp there is nothing there? In the Userpics directory, all traces of my image have dissapeared, image, normal_image and thumb_image have all dissapeared so they have moved somewhere?
Thanks again
Brian.
Any ideas?
-
and with no space in the folder name ?
-
and with no space in the folder name ?
Francois I did have a space in the Folder Name Open 1 however I have changed it to Open1 and I have moved 2 files to it and whilst they have dissapeared out of the Userpics Folder they have not appeared in the Open1 Folder? I hope I am not being stupid here!
Thanks again.
-
Francois I did have a space in the Folder Name Open 1 however I have changed it to Open1 and I have moved 2 files to it and whilst they have dissapeared out of the Userpics Folder they have not appeared in the Open1 Folder? I hope I am not being stupid here!
Thanks again.
Francois can I just add that now when I upload an image (I ran out of images to move) everything goes fine, select image, upload, place in album etc. When I view the Album and click the image to get large size, I get;
"Critical Error"
"There was an error while processing a database query"
Does this suggest the root problem is with the database?
I apologise for the psots and I know you are busy, I just hope my feedback is giving some direction.
Brian.
Brian.
-
normally the plugin doesn't interfer with the upload process. The only thing is perhaps you have a permission problem with the folders.
But at least the upload problem should not have to deal with the plugin
-
normally the plugin doesn't interfer with the upload process. The only thing is perhaps you have a permission problem with the folders.
But at least the upload problem should not have to deal with the plugin
Thanks Francois, just seems a bit coincidental? Any thoughts on my previous post on where the images are being moved to? I have searched for them and no joy.
Brian.
-
I think they have been erased from the server :-\
-
I think you are correct I'll set up another folder with a different name from one of the Albums and see how that goes?
-
Francois,
I tried this again with another album created within the userpics folder (no spaces) and used the plugin to move files. It moves the files but to where only God knows! Not sure if its a problem with my set up which I assume is the same as most people or its the Plugin.
If you have not lost the will to live then I'll take any advice.
Brian.
-
i'll test on mys test install this evening to see if i have the same problem (it's the first time i hear such an issue, this plugin was made for a user, and it seems to works as expected for him)
-
I've been massively using this plugin to re-arrange all files in my gallery (being online since 2004 it was a real mess!) and never had such issues noticed by mearnscc.
I've also successfully moved files uploaded via XP_Publish, getting rid of all those WPWnnnnnnnn directories spread within the album folder.
I tried this again with another album created within the userpics folder
userpics folder shouldn't be used for FTP uploads, but only for users direct upload (via the Coppermine upload feature) for registered users, I would think the conflict with the plugin lies within this point.
-
if i want to transfer directory that inside her there is directories with files, it's say that the there is no photos in the directory.
for example -
in albums folder
somedirectory
photos
try1(9 photos)
try2(33 photos)
and i want to move the photos directory with all the directories and files inside her to the directory album/somedirectory
how can i do that?
because when i choose the photos album and try to transfer her to the somedirectory folder, it say that there are no photos in the photos album, and it not transfer it.
-
Does this plug-in still work with latest version?
I've installed it and then click: Information>FileMove, I get this error:
Fatal error: Cannot redeclare cpgGetMicroTime() (previously declared in /home/chainsaw/public_html/gallery/include/init.inc.php:25) in /home/chainsaw/public_html/gallery/include/init.inc.php on line 27
If not, is there any other way of moving the folders that some photos are in, on my server? I've had a careful look through my PHPMyAdmin, but really have no idea what I'm doing.
-
Doesn't matter found the 1.5 version. Not sure why my first search failed. Thanks.