Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: File Replacer for cpg1.5.x  (Read 46533 times)

0 Members and 1 Guest are viewing this topic.

GameX32

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: File Replacer for cpg1.5.x
« Reply #20 on: November 26, 2010, 11:44:26 am »

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

GameX32

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: File Replacer for cpg1.5.x
« Reply #21 on: November 26, 2010, 11:55:28 am »

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?
Logged

GameX32

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: File Replacer for cpg1.5.x
« Reply #22 on: November 26, 2010, 11:57:35 am »

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.
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #23 on: November 26, 2010, 12:27:56 pm »

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.
« Last Edit: November 26, 2010, 12:35:22 pm by Αndr »
Logged

GameX32

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: File Replacer for cpg1.5.x
« Reply #24 on: November 26, 2010, 12:34:31 pm »

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.
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #25 on: November 26, 2010, 12:35:35 pm »

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

GameX32

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: File Replacer for cpg1.5.x
« Reply #26 on: November 26, 2010, 12:47:38 pm »

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.
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #27 on: December 14, 2010, 05:26:01 pm »

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

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #28 on: December 22, 2010, 03:52:20 pm »

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.
Logged

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: File Replacer for cpg1.5.x
« Reply #29 on: September 06, 2011, 11:54:12 am »

How to make this plugin work only for gallery owner?
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #30 on: September 06, 2011, 12:02:56 pm »

How to make this plugin work only for gallery owner?
In codebase.php, find
Code: [Select]
$thisplugin->add_action('page_start','file_replacer_page_start');
$thisplugin->add_filter('file_data','file_replacer_id_data');
and replace with
Code: [Select]
if (GALLERY_ADMIN_MODE) {
    $thisplugin->add_action('page_start','file_replacer_page_start');
    $thisplugin->add_filter('file_data','file_replacer_id_data');
}
Logged

ganesh

  • Translator
  • Coppermine novice
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • Gospel Gallery
Re: File Replacer for cpg1.5.x
« Reply #31 on: October 03, 2011, 01:12:00 pm »

Italian lang file.
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #32 on: October 05, 2011, 02:34:58 pm »

Italian lang file.
Added in svn revision 8260. Thanks for your contribution.
Logged

tassu

  • Coppermine novice
  • *
  • Country: fi
  • Offline Offline
  • Posts: 27
    • When the light paints
Re: File Replacer for cpg1.5.x
« Reply #33 on: September 29, 2012, 01:41:50 pm »

Finnish lang file (UTF-8)
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #34 on: September 29, 2012, 05:08:25 pm »

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

tassu

  • Coppermine novice
  • *
  • Country: fi
  • Offline Offline
  • Posts: 27
    • When the light paints
Re: File Replacer for cpg1.5.x
« Reply #35 on: October 04, 2012, 08:16:08 pm »

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.
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #36 on: October 04, 2012, 09:14:54 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?
Logged

tassu

  • Coppermine novice
  • *
  • Country: fi
  • Offline Offline
  • Posts: 27
    • When the light paints
Re: Re: File Replacer for cpg1.5.x
« Reply #37 on: October 12, 2012, 04:34:57 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.
Logged

Αndr

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: File Replacer for cpg1.5.x
« Reply #38 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?
Logged

tassu

  • Coppermine novice
  • *
  • Country: fi
  • Offline Offline
  • Posts: 27
    • When the light paints
Re: Re: File Replacer for cpg1.5.x
« Reply #39 on: October 13, 2012, 12:25:24 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.
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.033 seconds with 21 queries.