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: Send notifications to only specific admins  (Read 19924 times)

0 Members and 1 Guest are viewing this topic.

maddogprod

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Send notifications to only specific admins
« on: September 24, 2012, 08:36:12 pm »

My set-up has three admins. When there's a new registration or photo submission, everyone gets the email. I'd only like it to go to one person. I don't see a way to do this. Is there a way to regulate which admin(s) get the emails?

Thanks!
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Send notifications to only specific admins
« Reply #1 on: September 24, 2012, 11:53:04 pm »

Please post links.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616

It would probably be possible if you create a separate group and grant that group admin access in your mysql table.

Or try
In register.php
find:
Code: [Select]
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_group = 1");
replace with:
Code: [Select]
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_name = 'username_of_the_admin'");
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Send notifications to only specific admins
« Reply #2 on: September 25, 2012, 12:03:15 am »

Thanks. Version two, while hard coded, feels better. Though I guess both are "hard coded" of a sort anyway.

In the second, where would I find the similar code to approve photos that are uploaded? And could I add a second user name to that code?

Since you asked....the gallery is at: http://belvederecommunityfoundation.com/photocontest/
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Send notifications to only specific admins
« Reply #3 on: September 25, 2012, 12:06:05 am »

Please start a new thread for additional questions.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618

<!--Coppermine Photo Gallery 1.5.14 (stable)-->
Please upgrade.
http://forum.coppermine-gallery.net/index.php/topic,74682.0.html

Please resolve this thread.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270631.html#msg270631

Thank you for posting your link. Please remember to read the board rules.
http://forum.coppermine-gallery.net/index.php/topic,55415.0.html
« Last Edit: September 25, 2012, 02:59:49 am by Jeff Bailey »
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Send notifications to only specific admins
« Reply #4 on: September 25, 2012, 02:55:20 am »

It's updated to the latest, stable version. Now do I get a jellybean and the answer to my very related follow-up questions?

THANKS!
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Send notifications to only specific admins
« Reply #5 on: September 25, 2012, 02:59:23 am »

Please start a new thread for your additional questions.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618
10. One question per thread
We have a strict "One question/issue per thread rule", which helps both supporters/moderators to keep track of open/closed issues as well as users who search the board or browse it, looking for answers to their question. Don't try to "hijack" other's threads by posting unrelated questions to an existing thread.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Send notifications to only specific admins
« Reply #6 on: September 25, 2012, 03:25:14 am »

Got it. Though this is the same issue. It's asking for clarification and additional information about your recommendation so I and maybe others can see it all in one thread.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Send notifications to only specific admins
« Reply #7 on: September 25, 2012, 03:42:19 am »

The answer to your question
In the second, where would I find the similar code to approve photos that are uploaded?
Involes a different process and several options to change the way it works. Please create another thread. If you want you can come back to this thread and post a link to it as a reference.

As for
And could I add a second user name to that code?
try this
Code: [Select]
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_name = 'username_of_the_admin' OR user_name = 'second_admin'");
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Send notifications to only specific admins
« Reply #8 on: September 25, 2012, 03:56:31 am »

Thanks
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Send notifications to only specific admins
« Reply #9 on: September 27, 2012, 12:54:42 pm »

Second thread: http://forum.coppermine-gallery.net/index.php/topic,75465.0.html

Instead of selecting the admins by user_name, I'd perform this by user_id. To select several admins you could change the query to something like this:
Code: [Select]
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_id IN ('1', '3', '7')");

I just marked this thread as solved. Next time, please do that yourself. Thanks.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.