report file modification report file modification
 

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]

Main Menu

report file modification

Started by jaus, July 16, 2009, 10:30:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jaus

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.

Joachim Müller

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.

jaus

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.

Joachim Müller

What about the suggestions I posted:
Quote from: Joachim Müller on July 17, 2009, 08:24:58 AM
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
Quote from: Joachim Müller on July 17, 2009, 08:24:58 AMTo 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.

jaus

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:
<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

jaus

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

jaus

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.

jaus

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

All I would like to know is how to put the filename in place of the file link.