Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
5 registered (David Dreezer, Island Piper, QSS Tim, Ruben Rocha, Thelockman), 37 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 09/18/08
Posts: 9
Top Posters (30 Days)
Ruben Rocha 184
Gizmo 110
Rick 101
Thelockman 83
driv 41
AllenAyres 35
ntdoc 28
Sirdude 27
Ian 24
ScriptKeeper 18
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#192428 - 07/22/07 01:35 PM [FIXED for 7.3] [7.2] Admin+Moderator=2 notifies
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1299
Loc: Breda, NL
When you are admin and set the option "Do you want to be notified when a user uses the Notify Post option? Normally these are just sent to Moderators." you get double notifies if you are also set as moderator for a certain forum.

Not unlikely to set yourself as moderator for visibibility reasons.

my fix?

change
 Code:
	        $notify_array[] = $admin;;


into:

 Code:
	        if (!in_array($admin,$notify_array)) { $notify_array[] = $admin; };


You can also save a bit of duplicate code in there for the e-mailing by checking for an empty array, and if so, add the main admin id to the array.
_________________________

Top
#192542 - 07/23/07 09:00 AM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Rick Administrator Offline

*****

Registered: 06/04/06
Posts: 7904
Loc: Aberdeen, WA
Thanks for the fix. Also made the change to remove the duplicate code.
_________________________
UBB.threads™ Developer
My Personal Website · StogieSmokers.com

Top
#192792 - 07/25/07 04:25 AM Re: [7.2] Admin+Moderator=2 notifies [Re: Rick]
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1299
Loc: Breda, NL
 Originally Posted By: Rick
Thanks for the fix. Also made the change to remove the duplicate code.


I saw in the code if the main admin was not set, it would just take number 2, without a check if it was an admin or not. I would suggest a query that takes the first admin user from the userlist.

At our board user number 2 is an ex-admin who left.
_________________________

Top
#192839 - 07/25/07 04:20 PM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 12007
Loc: Portland, OR; USA
I have a comment on that, why use user2? We have a superadmin field, why not use this?
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#192881 - 07/25/07 11:28 PM Re: [7.2] Admin+Moderator=2 notifies [Re: Gizmo]
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1299
Loc: Breda, NL
 Originally Posted By: Gizmo
I have a comment on that, why use user2? We have a superadmin field, why not use this?


If you look at the code, it takes the super admin field, but if that field is not set, it will take blindly user #2, without any check if it's an admin or not.
_________________________

Top
#192888 - 07/26/07 12:19 AM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 12007
Loc: Portland, OR; USA
Ahh, well, then I'd say that'd be the admin's fault for not populating that field...
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#198669 - 10/04/07 01:31 PM Re: [7.2] Admin+Moderator=2 notifies [Re: Gizmo]
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1299
Loc: Breda, NL
It's not copy/pasted right for 7.2.2 Rick.

while(list($admin) = $dbh->fetch_array($sth)) {
if (!in_array(admin,$notify_array)) {

It's missing a $ there.
_________________________

Top
#200916 - 11/08/07 05:21 PM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Sirdude Moderator Offline

*****

Registered: 04/19/07
Posts: 2081
Loc: SoCal, USA
el fixo for 7.3 \:\)

also there is a dupe email check. \:\)
_________________________


Top


Shout Box

Today's Birthdays
kimteague_5@msn.com, Trekkie, Trixie
Recent Topics
Inclusion of Locked/Closed thread capabilities
by QSS Tim
12/03/08 11:17 AM
Contact Page Problem
by David DelMonte
12/03/08 09:05 AM
FAQ bug,
by BreeOge
12/03/08 08:36 AM
I'm the Admin but.....
by David DelMonte
12/02/08 11:12 AM
Fatal error: Smarty::require_once
()

by ThreadsUser
12/02/08 08:17 AM
Forum Stats
4261 Members
33 Forums
30538 Topics
155004 Posts

Max Online: 978 @ 06/24/07 08:19 PM