PDA

View Full Version : Add-On Releases - DownloadsII PM moderation notification Add-On


CyberRanger
10-31-2006, 10:00 PM
DownloadsII PM moderation notification Add-On, is not a stand-alone mod. It requires DownloadsII 5.0.4 or higher.

You can find it here: DownloadsII (https://vborg.vbsupport.ru/showthread.php?t=120122) (free)

What does it do?
When a user uploads a file via DownloadsII and that file is placed in moderation, all users that have the primary usergroup permission "Can Manage Moderation Queue" set to "Yes" will receive a PM notifying them about the file.

Installation
1. From the admincp, import the product file product-download2_pm.xml
2. Done!

Upgrade

1. From the AdminCP, import the product file product-download2_pm.xml with "Allow overwrite" set to yes
2. Done!

CyberRanger
11-01-2006, 02:32 PM
{reserved}:confused:

ShadowOne
11-01-2006, 02:36 PM
*Clicks Install*

Hornstar
11-01-2006, 09:42 PM
Thanks, this will come in handy a little later on. Just confirming this will work for 3.6.2 as well, as I couldnt find a 3.6 thread.

Thanks.

EDIT: Read in the other thread that this will work for 3.5.5 up to 3.6.2

Thanks.

EvilHawk
11-02-2006, 05:23 AM
Thnaks CyberRanger !

bashy
11-07-2006, 04:29 PM
Hi

I have the latest downloadsII installed, I have also just added this and ii am admin at the admin usergroup to "Can Manage Moderation Queue" yet when a file is uploaded ii do not get a PM with regards to the said file, Any ideas please?

CyberRanger
11-07-2006, 04:33 PM
Hi

I have the latest downloadsII installed, I have also just added this and ii am admin at the admin usergroup to "Can Manage Moderation Queue" yet when a file is uploaded ii do not get a PM with regards to the said file, Any ideas please?
You will only get a PM if the user uploading the file has the usergroup permission "Can Avoid Moderation Queue" set to "No". Is the file in the moderation queue?

bashy
11-07-2006, 06:55 PM
Hi, Yeah the permission is set to no for "Can Avoid Moderation Queue"
I have checked this on 1 of my staff and also on a spare standard account that ii have for such as checking stuff like this...

Do ii need to re upload the product again?

CyberRanger
11-07-2006, 09:41 PM
Hi, Yeah the permission is set to no for "Can Avoid Moderation Queue"
I have checked this on 1 of my staff and also on a spare standard account that ii have for such as checking stuff like this...

Do ii need to re upload the product again?
Can you PM me your URL with a vb admin user account and password? I'll check it out for.

Also, for your account, make sure in your usercp -> options that "Receive Private Messages only from Buddies and Moderators" is not checked. The mod will not over-ride that.

bashy
11-10-2006, 02:57 PM
Hi....PM sent, I have PM's set for all members to PM me as well :)

bashy
11-12-2006, 01:50 PM
Did you find anything untoward m8?

CyberRanger
11-12-2006, 04:22 PM
Did you find anything untoward m8?
Sorry, but not yet. I looked extensively the other day but can't figure out why the PM is not sent. As I'm sure you've seen, no errors ... but no PMs! I fear that something with your other PM mod is interfering. I hope to look at it some more tomorrow.

bashy
11-12-2006, 04:45 PM
Ok m8 no probs, thanks again :)

Sorry, but not yet. I looked extensively the other day but can't figure out why the PM is not sent. As I'm sure you've seen, no errors ... but no PMs! I fear that something with your other PM mod is interfering. I hope to look at it some more tomorrow.

Black Tiger
11-14-2006, 04:51 PM
Nice hack. Coul'd there be a feature made so admin can decide who get's a pm? For example if you just want die admin to get a pm and not other people which can manage the moderation queu?

Black Tiger
12-09-2006, 03:32 PM
Is my idea not possible to make? Would really be a nice feature.

Citizen
12-24-2006, 05:17 AM
Does this work with 3.6.+?

RS_Jelle
12-24-2006, 07:42 PM
Does this work with 3.6.+?
Yes, it does ;)

joeldaviddc
03-08-2007, 09:28 AM
i have installed the donwloadII mod in my vb 3.6.5 without problems, but if i install this mod i receive a databse error when a user try to make an unpload, the file is upload but i do not receive pm notifications.. i receive a database error from vbulletin. this is the content of the message:

Database error in vBulletin 3.6.5:

Invalid SQL:
SELECT title, usergroup.usergroupid, username, userid
FROM vb_usergroup, vb_user
WHERE ecdownloadpermissions & 1024 AND usergroup.usergroupid = user.usergroupid;

MySQL Error : Unknown column 'usergroup.usergroupid' in 'field list'
Error Number : 1054
Date : Thursday, March 8th 2007 @ 12:15:36 PM
Script : http://www.mydomain.com/foro/downloads.php?do=add&id=
Referrer : http://www.mydomain.com/foro/downloads.php?do=add&cat=1

i have uninstalled the pm-notification mod and all is working fine...

Black Tiger
03-09-2007, 01:27 PM
@Jelle: Could you have a look at msg #14? I posted it long ago, but did not get an answer if it was possible or if you could maybe put it in a future release.

joeldaviddc
03-12-2007, 03:03 PM
anybody can help me ???

CyberRanger
03-12-2007, 04:25 PM
anybody can help me ???
Sorry for the slow replies. Lots of RL work keeping me tied up. I'll get an update out tomorrow to fix your problem and see if I can add more options for who gets the PM's.

In the meantime, if you'd like to fix the error yourself:

In the plugins "Alert Mods to Edited File in Moderation" and "Alert Mods to New File in Moderation",

FIND:
$result = $db->query_read("SELECT title, usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND usergroup.usergroupid = user.usergroupid
");

CHANGE TO:
$result = $db->query_read("SELECT title, " . TABLE_PREFIX . "usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND " . TABLE_PREFIX . "usergroup.usergroupid = " . TABLE_PREFIX . "user.usergroupid
");

joeldaviddc
03-12-2007, 05:02 PM
thanks for your reply cyberranger.

I have made the changes you tell me, but i still receive a database error, finally i have changed a little bit your code to this

$result = $db->query_read("SELECT title, vb_usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND " . TABLE_PREFIX . "usergroup.usergroupid = " . TABLE_PREFIX . "user.usergroupid
");


(my table prefix is vb_ , and i have added before the select for usergroup.usergroupid )

and now is working fine,

thanks a lot...

CyberRanger
03-12-2007, 05:10 PM
(my table prefix is vb_ , and i have added before the select for usergroup.usergroupid )

and now is working fine,

thanks a lot...Ah, right, thanks! Sorry I missed that spot.

Black Tiger
08-13-2007, 09:36 PM
Can my request from message #14 also be temporarily made by hacking a template or file? If yes, which code should i use?

CyberRanger
08-27-2007, 03:00 AM
Nice hack. Coul'd there be a feature made so admin can decide who get's a pm? For example if you just want die admin to get a pm and not other people which can manage the moderation queu?
There are two plugins that control sending the PM's: "Alert Mods to Edited File in Moderation" and "Alert Mods to New File in Moderation" In both, the sql that selects the users to send the PM to is:
$result = $db->query_read("SELECT title, usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND usergroup.usergroupid = user.usergroupid
");

You could easily change the WHERE clause to get a different set of users. For example, to have the PM sent to the admin group, change the query to:
$result = $db->query_read("SELECT title, usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE usergroup.usergroupid = 6
");

AScherff
08-27-2007, 07:23 AM
In the meantime, if you'd like to fix the error yourself:

In the plugins "Alert Mods to Edited File in Moderation" and "Alert Mods to New File in Moderation",


I have had the same problems and thought that was an error in DLII and contacted Jelle...

He gave me the hint to have a look here :-)

Black Tiger
08-27-2007, 11:44 AM
@Cyberranger: Thanks very much! I will change it to admin only.

Black Tiger
09-08-2007, 11:16 PM
Found another question.:)
WHERE usergroup.usergroupid = 6
Could there also be made a change to have just 1 user receive the pm's?
Maybe change this to WHERE userid = xx?
And if yes, do I need to change that somewhere else too?
Let's say I only want userid 2 to receive pm's, is that possible too?

RS_Jelle
11-02-2007, 09:10 AM
Then you need to replace:
$result = $db->query_read("SELECT title, usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND usergroup.usergroupid = user.usergroupid
");
With:
$result = $db->query_read("SELECT username, userid
FROM " . TABLE_PREFIX . "user
WHERE userid = 2
");
Note: you need to replace this two times. I removed the usergroup parts from the query as they aren't necessary for this, so it's a bit lighter.

It should work, but I didn't test it ...

Black Tiger
11-02-2007, 01:16 PM
Great, thank you very much!!!

bc3tech
11-08-2007, 03:49 PM
i also do not receive a PM.

RS_Jelle
11-10-2007, 09:33 AM
i also do not receive a PM.


Are you sure that there are files placed in the moderation queue? You won't receive a noficiation of a file which passes the moderation queue and is added immediately.
Are you in a primary usergroup which has got the "Can Manage Moderation Queue" permission set to "Yes"?

Also make sure you are running the latest version of DownloadsII (version 5.0.6 at this moment).

Black Tiger
11-24-2007, 04:56 PM
I just discovered I also don't receive pm's anymore after upgrading to the newest Download II version.
I can also answer both your questions with "yes" and it was working before.

CyberRanger
11-27-2007, 07:47 PM
I just discovered I also don't receive pm's anymore after upgrading to the newest Download II version.
I can also answer both your questions with "yes" and it was working before.
I'll try to check this out sometime this week.

CyberRanger
12-14-2007, 02:22 PM
Thx Jelle for once again doing almost all of the work!

################################################## ###############
# DownloadsII PM moderation notification Add-On 1.1 Changelog # Dec 14, 2007
################################################## ###############

CyberRanger
- Fixed the missing table prefixes causing a database error when you were using a table prefix for vBulletin

Jelle
- Changed some small things to the vBulletin coding standards
- Added a url, version check url and DownloadsII 5.0.4 dependency to the product XML (requires vBulletin 3.6)

################################################## ###############
# DownloadsII PM moderation notification Add-On 1.0 Changelog #
################################################## ###############

CyberRanger
- Initial Release

Black Tiger
12-15-2007, 02:44 PM
Nice work! Does this also fix the pm problem we had?

RS_Jelle
12-15-2007, 06:04 PM
Nice work! Does this also fix the pm problem we had?

I tested it on my site (DownloadsII 5.0.6, vBulletin 3.6.8 PL2), but I didn't experienced any problems :confused:
Try uninstalling the add-on (not DownloadsII itself of course :p) and reinstalling it.

Black Tiger
12-15-2007, 07:11 PM
Well it was working before the update to 3.6.8 PL1 and before the update to the next download II version.
It also could be it stopped working because of the change I made so only 1 usergroup will get the pm's. Maybe I made a mistake in there? It now says this:
if ($_POST['purgatory'] == 1)
{

$result = $db->query_read("SELECT title, usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND usergroup.usergroupid = 6");

Usergroup 6=Administrator, however, I would rather to have it send only a pm to me.

RS_Jelle
12-15-2007, 07:35 PM
Well it was working before the update to 3.6.8 PL1 and before the update to the next download II version.
It also could be it stopped working because of the change I made so only 1 usergroup will get the pm's. Maybe I made a mistake in there? It now says this:
$result = $db->query_read("SELECT title, usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND usergroup.usergroupid = 6");

Usergroup 6=Administrator,

There's a small mistake in the query. The user and usergroup results aren't linked. This should work:

$result = $db->query_read("SELECT title, " . TABLE_PREFIX . "usergroup.usergroupid, username, userid
FROM " . TABLE_PREFIX . "usergroup, " . TABLE_PREFIX . "user
WHERE ecdownloadpermissions & 1024 AND " . TABLE_PREFIX . "usergroup.usergroupid = " . TABLE_PREFIX . "user.usergroupid AND " . TABLE_PREFIX . "usergroup.usergroupid = 6");

however, I would rather to have it send only a pm to me.

Then you better use this query:

$result = $db->query_read("SELECT username, userid
FROM " . TABLE_PREFIX . "user
WHERE userid = 2
");

Black Tiger
12-15-2007, 07:47 PM
Great I will try the last one then, thanks!

molieman
01-19-2008, 04:33 PM
I've went through all the posts, tried all the changes, downloaded the latest greatest today, after several hours of trying, never got it to work.

vBulletin 3.6.8
Got the primaries set to "yes"

I don't know what to ask, to get it to work. Actually just want to have the administrators get PM's, notification of a new files uploaded.

Matt Olieman
www.mycockpit.org

CyberRanger
01-22-2008, 05:37 PM
I've went through all the posts, tried all the changes, downloaded the latest greatest today, after several hours of trying, never got it to work.

vBulletin 3.6.8
Got the primaries set to "yes"

I don't know what to ask, to get it to work. Actually just want to have the administrators get PM's, notification of a new files uploaded.

Matt Olieman
www.mycockpit.org
PM me your board info (vb admin login and password) and I'll take a look.

Black Tiger
01-22-2008, 05:44 PM
@Jelle: The code you gave me last month works great, thanks!

upnorth
03-10-2008, 07:06 PM
I have disabled the PM feature on my board. Any way to make this Add-on send an email instead of a PM?

RS_Jelle
04-10-2008, 05:49 AM
I have disabled the PM feature on my board. Any way to make this Add-on send an email instead of a PM?

Not at this moment, but it's pretty easy with some modding. Open the product file and find (twice) the part starting with "// create the DM to do error checking and insert the new PM" until $pmdm->save();.

Replace it (twice) with this:
vbmail('yourmail@provider.com', $pmtitle, $pmmessage, 1, $vbulletin->options['bbtitle']);

And make sure you replace yourmail@provider.com with the correct one to send the mail to. This is for sending it to one person. If you want to send it to multiple persons, just use the line multiple times.

Goomzee
04-10-2008, 10:25 AM
wow nice Mods

hubix
06-16-2008, 05:48 AM
Hello,

very nice Hack, but I get every email notification twice. Does any other have the same problem?
Im using VB 3.6.10 and got all 3 DownloadsII addons installed: "DownloadsII", "get PM" and "create Thread".

Daky
08-14-2008, 01:55 AM
i am running it on 3.72 , custom user group is set to allow to menage uploads, but no notification is sent,... any ideas?

thank you

CyberRanger
08-14-2008, 11:56 AM
i am running it on 3.72 , custom user group is set to allow to menage uploads, but no notification is sent,... any ideas?

thank you
I'm not positive this works with 3.72. Is the custom usergroup the primary usergroup for the user in question? This mod only looks at the primary usergroup.

Daky
08-14-2008, 09:26 PM
huh :( nope its additional,... thing is that i want only me to receive this pm,... i am in admin usergroup as well, other ones are compaining about pms :)
)

RedGTiVR6
11-23-2008, 01:54 PM
I'm running 3.7.3 PL1 and suddenly I'm not getting any PMs either.

I have it set to send to Admins only and all admins are set as primary.

Any ideas what might have changed this?

Charles_1
12-31-2008, 04:54 AM
I'm running 3.7.3 PL1 and suddenly I'm not getting any PMs either.

I have it set to send to Admins only and all admins are set as primary.

Any ideas what might have changed this?
I am running vB 3.7.2 PL2 and I have to confirm that users from primary usergroup with setting "Can Manage Moderation Queue" are not getting PM too :-(. Mod DownloadsII is in newest version 5.1.0, but the same issue was also with v 5.0.8.

It worked fine in vB 3.6.7. Has someone else this problem?

AScherff
03-01-2010, 08:27 PM
running 3.8.4 PL2 - since a while admins are not getting a PM for new downloads - any idea ?

thanks

AScherff
03-01-2010, 09:46 PM
ok, answering myself ;-) ...

playing with the script i find out that if the script returns more then 5 Admins/Mods to PN - the PN will not happen ....

Is 5 is the PN limit for vb ??

Now i remember, that PN is not coming from the time i added a User to the Admingroup (count=6).