Advanced search  

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

Pages: [1]   Go Down

Author Topic: Admin Notifications Error  (Read 22340 times)

0 Members and 1 Guest are viewing this topic.

a$h

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Admin Notifications Error
« on: April 22, 2006, 01:30:23 am »

Hi there.

I think there is an error in report_file.php

Everything seemse to work ok, but when you receive e-mail instead to receive name of sender you receive
Code: [Select]
<input type="text" class="textinput" value="Rekomandim" name="sender_name" style="width: 100%;" /> <ariani_sh@yahoo.co.uk>
Also instead to recive Subject, you recive
Code: [Select]
A report from <input type="text" class="textinput" value="Guest" name="sender_name" style="width: 100%;" /> on a gallery file
Can somebody please help me with this?

Many thanks.
« Last Edit: May 08, 2006, 04:05:19 pm by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Admin Notifications Error
« Reply #1 on: April 22, 2006, 09:50:44 am »

link and non-admin test user account please
Logged

a$h

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Admin Notifications Error
« Reply #2 on: April 24, 2006, 01:39:29 am »

GauGau,

thanks for your quick response.

user: test
pass: test

I dont will this help, but the problem that I mentioned before (in my first post) I only get it when an anonymous reports to admin. I dont have problem when a regisetred user report to admin.

Thanks.
« Last Edit: May 15, 2006, 03:49:16 am by a$h »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Admin Notifications Error
« Reply #3 on: April 24, 2006, 02:41:11 pm »

what language are you testing with?
Logged

a$h

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Admin Notifications Error
« Reply #4 on: April 24, 2006, 11:50:23 pm »

Im testing it with English language, but as I said in previous post I only get error when an anynomus/guest user submit the notification to admin.

Thanks GauGau
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Admin Notifications Error
« Reply #5 on: May 02, 2006, 05:04:43 pm »

I was able to confirm this on my gallery (after someone tried to spam for ambien :P) using English. I submitted a report as an anonymous user to replicate the spammer's "report".

I think it has to do with this:
Code: [Select]
if ($USER_DATA['user_email']){
        $sender_email = $USER_DATA['user_email'];
        $sender_box = $sender_email;
} else {
        $sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
        $sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"width: 100%;\" />";
        $sender_name = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";
}

The input fields are for displaying in the report form when it's an anonymous user. But the problem is the $sender_name variable goes unchanged into the email message.

Logged

a$h

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Admin Notifications Error
« Reply #6 on: May 02, 2006, 08:21:06 pm »

Thanks TranzNDance.

Hopefully someone will have a solution for this?

Till then...

Regards,
a$h
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Admin Notifications Error
« Reply #7 on: May 03, 2006, 06:04:52 am »

Got it. Please confirm fix.

Edit report_file.php
FIND:
Code: [Select]
        $sender_name = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";

REPLACE with:
Code: [Select]
        $sender_name = get_post_var('sender_name',$USER['name'] ? $USER['name'] : '');
        $sender_name_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";


FIND:
Code: [Select]
{$sender_name}
REPLACE with:
Code: [Select]
{$sender_name_box}
Logged

a$h

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Admin Notifications Error
« Reply #8 on: May 03, 2006, 01:07:00 pm »

Thanks TranzNDance,

I can confirm that the fix that you provided is working. But you only need to modify the frist part and you DON'T need to replace {$sender_name} with {$sender_name_box}.

Once again thanks very much.

Kind regards,
Arian Sh.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Admin Notifications Error
« Reply #9 on: May 03, 2006, 05:15:26 pm »

Thanks for confirming. However, I tried what you suggested and used $sender_name only and it resulted in no input box showing.
Logged

a$h

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Admin Notifications Error
« Reply #10 on: May 04, 2006, 01:29:16 am »

TranzNDance,

My mistake. You are right. If you dont make both modification provided by you in previous post, then there is no input filed for the name. I only realised this after I've deleted my cookies.

Once again thanks very much  ;)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Admin Notifications Error
« Reply #11 on: May 08, 2006, 08:25:47 am »

@Thu: could you commit to stable and devel branch of svn please?
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Admin Notifications Error
« Reply #12 on: May 08, 2006, 04:05:03 pm »

done and done. :)
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
I need clarification with a "bug" in report_file.php
« Reply #13 on: October 06, 2008, 03:23:49 am »

I think there is something that need to be clarificated (at least to me). I though I had discovered a bug on report_file.php but after searching the forum I realised this is a know issue.

I was going to report a nedeed modification in the file:

In "report_file.php"

Search: (line 200)

<td valign="top" class="tableb" width="60%">
                        {$sender_name_box}
                </td>


I think must be:

<td valign="top" class="tableb" width="60%">
                        {$sender_name}
                </td>

Later, searching the forum I see this: http://forum.coppermine-gallery.net/index.php/topic,30694.msg143762.html#msg143762

But doing that, resulted in no input box showing. TranzNDance already noticed that, but never was fixed.

So, what to do in order to get both features working properly?
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: I need clarification with a "bug" in report_file.php
« Reply #14 on: October 25, 2008, 04:09:22 am »

So? I think this is a thing that must be fixed. Am I missing something?  :-\
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Admin Notifications Error
« Reply #15 on: October 25, 2008, 12:14:20 pm »

Merged fabri's new thread with the existing one. Thu, could you please look into this once again?
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Admin Notifications Error
« Reply #16 on: December 23, 2008, 04:53:52 pm »

Sorry for the delay. I think I fixed it for real this time. I added:

Code: [Select]
$sender_name = $USER_DATA['user_name'];
        $sender_name_box = $sender_name;

after:
Code: [Select]
if ($USER_DATA['user_email']){
        $sender_email = $USER_DATA['user_email'];
        $sender_box = $sender_email;

I have committed the change for versions 1.4 and 1.5.

Thanks for reporting the bug, Fabricio.
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Admin Notifications Error
« Reply #17 on: December 23, 2008, 06:23:53 pm »

Working both features at least to me  :)

Thanks Thu!
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.