File Replacer for cpg1.5.x - Page 2 File Replacer for cpg1.5.x - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

File Replacer for cpg1.5.x

Started by Αndré, July 07, 2009, 03:34:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GameX32

Where I can find function $superCage->files->getRaw?

GameX32

I'm currently test some hack:

            $hack = $fileupload['tmp_name'];
            $hack = str_replace(":WindowsTempphp", ":\\Windows\\Temp\\php\\", $hack);

            if (!move_uploaded_file($hack, $image)) {
                cpg_die(ERROR, sprintf($lang_plugin_file_replacer['error_move_file'], $hack, $image), __FILE__, __LINE__);
            }

But it don't work. How 'C:WindowsTempphpF0D1.tmp' it actualy correct version?

GameX32

Works for me:

            $hack = $fileupload['tmp_name'];
            $hack = str_replace(":WindowsTempphp", ":\\Windows\\Temp\\php", $hack);

            if (!move_uploaded_file($hack, $image)) {
                cpg_die(ERROR, sprintf($lang_plugin_file_replacer['error_move_file'], $hack, $image), __FILE__, __LINE__);
            }

Possible it can work on apache server too.

Αndré

#23
So you're using IIS? Nice to hear that the hack works for you, but I try to find the 'real' solution before adding some hard-coded hacks. The file upload works for Coppermine for me (using Apache), so I may have a look at the appropriate code.

GameX32

Yes, ISS 7.5. I understand it, but my help possible useless in this question - i don't know php and can' locate function $superCage->files->getRaw. If you need some script to test on ISS i can help - just put file here and i upload it for test.

Αndré

Does the simple upload form (HTTP upload) works for you on IIS?

GameX32

Yes it works fine. But when i just install gallery it doesn't work. I use old style install and it determine gallery url as https. I fixed this and it's work. No any other modification.

Αndré

GameX32, please try the latest svn version and confirm if it works for you on IIS.

Αndré

Version 1.6 (attached to initial post) has a check if the file was successfully moved on the server. It's now also compatible with the sef_url plugin and should work with IIS.

kodif

How to make this plugin work only for gallery owner?

Αndré

Quote from: kodif on September 06, 2011, 11:54:12 AM
How to make this plugin work only for gallery owner?
In codebase.php, find
$thisplugin->add_action('page_start','file_replacer_page_start');
$thisplugin->add_filter('file_data','file_replacer_id_data');

and replace with
if (GALLERY_ADMIN_MODE) {
    $thisplugin->add_action('page_start','file_replacer_page_start');
    $thisplugin->add_filter('file_data','file_replacer_id_data');
}

ganesh

Italian lang file.

Αndré

Quote from: ganesh on October 03, 2011, 01:12:00 PM
Italian lang file.
Added in svn revision 8260. Thanks for your contribution.

tassu

Finnish lang file (UTF-8)

Αndré

Added Finnish language file in SVN revision 8503. Thanks for your contribution.

tassu

It would be nice if you can update exif and iptc data at the same time with this plugin. And also could it update photo page title and description for that data too.

Αndré

Quote from: tassu on October 04, 2012, 08:16:08 PM
update photo page title and description for that data too.
Do you mean some extra fields on the "choose file" page or automatically reading and replacing existing IPTC data?

tassu

Quote from: Αndré on October 04, 2012, 09:14:54 PM
Do you mean some extra fields on the "choose file" page or automatically reading and replacing existing IPTC data?
Yes, checkboxes like Update exif, update iptc, update title to page, update description to page would be really cool.

Αndré

The EXIF data will be automatically removed since the latest SVN commit. What do you mean with "update IPTC"? The only thing Coppermine does is to use that data for title, description and maybe some other things as far as I know. Please correct me if I'm wrong. So the only checkbox would be "overwrite existing meta data (title, description, ...) with IPTC data", correct?

tassu

Quote from: Αndré on October 12, 2012, 05:03:05 PM
The EXIF data will be automatically removed since the latest SVN commit. What do you mean with "update IPTC"? The only thing Coppermine does is to use that data for title, description and maybe some other things as far as I know. Please correct me if I'm wrong. So the only checkbox would be "overwrite existing meta data (title, description, ...) with IPTC data", correct?
That would be enough.