Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: report file modification  (Read 8144 times)

0 Members and 1 Guest are viewing this topic.

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
report file modification
« on: July 16, 2009, 10:30:25 pm »

I would like to create a mod for the "report file to administrator page".  What I would like is an "inquire about image usage" page.

On this page the user would input their name and email address when they filled out the form (no registration would be required), the reasons for report would be removed as they are not relevant to the type of inquiry I am interested in, and the filename of the image would be transmitted instead of the actual image link.    The message box would remain as the vehicle for the inquiry.

Would this be hard?   I have very little coding skill but might be able to follow some simple instuctions on how to modify the report_file.php

If anyone could show me some simple code for this mod it would be appreciated.

Thanks,
Joe.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: report file modification
« Reply #1 on: July 17, 2009, 08:24:58 am »

Posting the instructions would actually mean that someone would be coding that mod for you, which is a bit beyond what you could expect from free support imo, but of course everybody is welcome to proof me wrong.
Your request is valid and I can see your point, but it's a bit hard to accomplish for someone with zero experience in coding. To change the wording, search the strings you want to see changed in your language file (e.g. lang/english.php) and edit that file with a plain text editor (notepad.exe should be fine). To accomplish the change of functionality (e.g. commenting out the reasons for report) should be done in report_file.php and themes/yourtheme/theme.php as far as I remember out of the back of my head.
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: report file modification
« Reply #2 on: July 17, 2009, 12:06:04 pm »

What I was hoping was that someone had actually done something like this and could just post a snippet.   Also, I should have said that I have very little coding experience in html, php, etc.   I have been able to make a few small , but useful, modifications to coppermine on my own but this one stumps me. 

Specifically, one thing I have not been able to find is how to display the file name of the image that is being displayed when viewing the display_image.php page.  In a recent experiment I wanted to see if I could add a small contact form below the file info on display_image.php.  I could add the blank fields, or simple text , but cannot figure out how to fill one field with the filename of the image that is currently  being displayed in display_image.php.  I can see the filename in the file info on the page, and I have tried to trace back through the function calls and array references to identify how to display only the filename, but no success.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: report file modification
« Reply #3 on: July 20, 2009, 08:30:26 am »

What about the suggestions I posted:
To change the wording, search the strings you want to see changed in your language file (e.g. lang/english.php) and edit that file with a plain text editor (notepad.exe should be fine).
and
To accomplish the change of functionality (e.g. commenting out the reasons for report) should be done in report_file.php and themes/yourtheme/theme.php

Did you try those suggestions? What was the outcome? Post a link to your gallery and what changes you have applied.
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: report file modification
« Reply #4 on: July 21, 2009, 12:55:55 am »

I have uploaded a test image on the site here:

http://www.joeaustinphotography.com/cpg1420/index.php

The guest user is enabled to use the report function.

I have modified the english lang file to say "Inquire about image" rather than report.

I have also removed the code for the comments and reason for report buttons.  (For some reason commenting this code out did nothing)

The result is close to what I need.

The remaining necessary change is changing the reported file link to the filename of the image.   I see this code, which looks like the correct snip:
Code: [Select]
<a href="{$CONFIG['ecards_more_pic_target']}displayimage.php?pos=-{$pid}">
                                                                                {$CONFIG['ecards_more_pic_target']}displayimage.php?pos=-{$pid}</a> <br />

but I don't know how to change this to the filename of the image.

I also noticed that the email that is sent is trying to report the reason for the report and is saying "No reason given".  I would want to eliminate this line from the email but don't see how to do it yet.
 
Another desired change is to make the small icon for inquiring about the image more prominent, or perhaps changing it to text.

Thanks,
Joe
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: report file modification
« Reply #5 on: July 21, 2009, 12:59:27 am »

P.S.  Ignore the reference to /cpg1420 in the link.  I am using 1.4.25.
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: report file modification
« Reply #6 on: July 21, 2009, 09:48:28 pm »

Ok, figured out how to eliminate the reference to reasons in the email, also created a new .gif for the report button.   

Still would like to know how to indicate the filename of the image in the email.
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: report file modification
« Reply #7 on: July 24, 2009, 01:27:57 am »

Well, I did as requested...........

All I would like to know is how to put the filename in place of the file link.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.