Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 registered (blaaskaak, Ruben Rocha, 1 invisible), 34 Guests and 21 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 11/25/08
Posts: 1
Top Posters (30 Days)
Ruben Rocha 180
Gizmo 112
Rick 109
Thelockman 80
driv 43
AllenAyres 35
ntdoc 28
Ian 24
Sirdude 23
ScriptKeeper 20
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 Online   content

****

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: 7898
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 Online   content

****

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 Online   content

****

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 Online   content

****

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: 2077
Loc: SoCal, USA
el fixo for 7.3 \:\)

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


Top


Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Shrinking graemlins
by Djuma
12/01/08 05:48 PM
2 problems I'm seeing now.
by DougMM
12/01/08 04:39 PM
Which CSS Style Controls the bottom lines
by David DelMonte
12/01/08 01:51 PM
UBBThreads vs. vBulletin -- Defections & Why So Tough to Compare?
by WebMagic
12/01/08 12:28 PM
Font and column shifts occuring
by Bill B
11/30/08 06:21 PM
Forum Stats
4261 Members
33 Forums
30532 Topics
154963 Posts

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