PDA

View Full Version : Moderators Functions - PHPKD - Usergroup Attachment Moderation


Omranic
03-20-2010, 10:00 PM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!.................. Brought to you by PHP KingDom (www.phpkd.net) ..................!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Please remember to click Mark as Installed if you use this product.
Support requests from members who have not marked this as installed will be considered low priority.


Name: PHPKD - Usergroup Attachment Moderation
Version: 4.0.100

Description: This product adds new permission per usergroup "Follow Forum Moderation Rules", which if set to 'no' it will force all attachments posted by this usergroup to be placed into moderation queue by default.


Compatible with: All 3.8.x/4.0.x vBulletin versions.


Requirements:

vBulletin version 3.8.x/4.0.x



Related Products:

PHPKD - Moderated Attachments Staff Notify (http://go.phpkd.net/en/product/vbasn/)



Helpful links:

Bug Reports (http://forum.phpkd.net/project.php?do=issuelist&projectid=2&issuetypeid=bug)
Feature Requests (http://forum.phpkd.net/project.php?do=issuelist&projectid=2&issuetypeid=feature)



Features:

General Features:-

MD5 checked.
Fully Phrased.
Fully Supported.
Accurate Processing.
Professionally Coded.
Detailed Documentation.
Zero Additional Queries.
Requires only one manual edit.
Doing all default vBulletin checks & vBulletin Fully Compatible.

Specific Features:-

Per usergroup permission "Follow Forum Moderation Rules" (If no, attachments are always placed into moderation queue by default).




Installation Procedure:

Upload required files to their appropriate places:

includes

xml

bitfield_phpkd_vbuam.xml

md5_sums_phpkd_vbuam.php


Do the following small manual edit, open the file "includes/class_upload.php" (follow instructions relative to your vB version):
3.8.x:
Search for:
if (isset($this->foruminfo['moderateattach']))
{
$visible = ((!$this->foruminfo['moderateattach'] OR can_moderate($this->foruminfo['forumid'], 'canmoderateattachments')) ? 1 : 0);
}

Replace with:
// PHPKD - Usergroup Attachment Moderation
if (isset($this->foruminfo['moderateattach']) OR isset($this->registry->bf_ugp_attachpermissions['followforummoderation']))
{
$visible = (((!$this->foruminfo['moderateattach'] OR can_moderate($this->foruminfo['forumid'], 'canmoderateattachments')) AND ($this->registry->userinfo['permissions']['attachpermissions'] & $this->registry->bf_ugp_attachpermissions['followforummoderation'])) ? 1 : 0);
}

4.0.x:
Search for:
$this->data->setr_info('thumbnail', $this->upload['thumbnail']['filedata']);

Add under it directly the following code:
// PHPKD - Usergroup Attachment Moderation
if (isset($this->registry->bf_ugp_attachpermissions['followforummoderation']) AND !($this->registry->userinfo['permissions']['attachpermissions'] & $this->registry->bf_ugp_attachpermissions['followforummoderation']))
{
$this->data->set('state', 'moderation');
}
Save the modified file "includes/class_upload.php" and upload it to it's place again (ALLOW OVERWRITE).
Import the product's XML file "product-phpkd_vbuam.xml" from AdminCP.
Configure usergroup settings -if required-.
You're Done :).



Upgrade Procedure:

Same as "Installation Procedure", but "Allow Overwrite" for both file uploads & product import.



Controls:

Usergroup Permissions:
vBulletin AdminCP ? Usergroups ? Usergroup Manager ? Select usergroup to edit ? Attachment Permissions ? Follow Forum Moderation Rules



License:
Read Here: http://info.phpkd.net/en/license/free/ (http://info.phpkd.net/en/license/free/)
--------------- --------------- --------------- ---------------
Creative Commons - Attribution-Noncommercial-Share Alike 3.0
http://creativecommons.org/licenses/by-nc-sa/3.0/
--------------- --------------- --------------- ---------------

You are free:

To Share ? to copy, distribute and transmit the work
To Remix ? to adapt the work



Under the following conditions:

[Attribution]: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
[Noncommercial]: You may not use this work for commercial purposes.
[Share Alike]: If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.



For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page (http://creativecommons.org/licenses/by-nc-sa/3.0/).
Any of the above conditions can be waived if you get explicit permission from the copyright holder.
Nothing in this license impairs or restricts the author's moral rights.

--------------- --------------- --------------- ---------------
Your fair dealing and other rights are in no way affected by the above.
This is a human-readable summary of the Legal Code (the full license).
http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode
--------------- --------------- --------------- ---------------


Help with:

Translations to benefit more users.
Suggestions & feature requests to develop this product.
Contributing any updates, upgrades and/or any new features.
Spreading this product. Yes, you're free to re-distribute this product as it is (See 'Free License' details).



Known Issues:

Nothing till now!



Future TO-DO-LIST:

Post your suggestions!



History:

v3.8.100 31/12/2008 08:00 AM UTC: First 3.8.x release (public)
v4.0.100 19/03/2010 08:00 AM UTC: First 4.0.x release (public)



Screen Shots:

Available down there.



Technical Notes:

New Plugins: 0
New Phrases: 1
New Templates: 0
Manual Template changes: 0
Auto Template changes: 0
New Files: 2
Manual File Changes: 1
New vBulletin Settings: 0
New Usergroup Permissions: 1
New Moderator Permissions: 0
New Administrator Permissions: 0
New Forum Options: 0
New DB Tables: 0
DB Alterations: 1
New Cronjobs: 0
--------------------------------
Installation Level: V.Easy
Installation Time: ~15 seconds



Recent Products:

PHPKD - vB Link Verifier Bot (http://go.phpkd.net/en/product/vblvb/) New !
PHPKD - vB Advanced Quick Reply 'Ultimate' (http://go.phpkd.net/en/product/vbaqr/) New !
PHPKD - vB Advanced Quick Edit [ All Built-In BBCodes ] (http://go.phpkd.net/en/product/vbaqe/)

Omranic
04-07-2010, 03:01 AM
nice job mann :up:
Thanks mate ;)

NashChristian
04-07-2010, 06:20 AM
Please forgive my ignorance, but I'm confused. Doesn't stock vB already have this functionality? I know I can require image moderation. Does stock vB not provide moderation for other types of attachments? Or exactly what DOES this mod do that stock vB doesn't?

Attachment moderation (and notification) is extremely important to me, I'm just trying to understand what needs modifying, and what functionality is built-in.

Thanks!
:D Jeff

NashChristian
04-14-2010, 08:46 AM
bump... ?

NashChristian
04-20-2010, 07:22 AM
I'm just asking percisely WHAT this does, in comparrison to stock vB. The courtesy of a response would sure be nice.

What I'm guessing that this does, is just the "per user group" function. From what I can figure out, with stock vB, the moderate attachments are set per FORUM, not per user group, and are either ALL or NOTHING. This changes that by making it per User Group instead, correct? So does this also work with attachments for the CMS?

If I'm correct (and some confirmation would sure be nice), then this mod is EXACTLY what I've been looking for!

Thanks.

NashChristian
04-21-2010, 10:17 AM
Gosh, what a BUMMER! Besides absolutely ZERO SUPPORT, this mod fails to live up to its claims as well!

In contrast to your "staff notify" mod, the template modification code is correct and I was able to fully implement the mod, HOWEVER it does NOT have the ABILITY to require moderation on ALL attachment types.

For example, it does NOTHING for Video attachments, using the "Insert Video" icon. It also does NOTHING for images inserted from a URL (not referenced locally).

SO, even with this wonderful mod, a rouge user can still upload porn via still images hosted on the net, or videos on supported video host sites. Meaning that this completely FAILS to protect the admin/site from crap being uploaded.

From what I can gather, this mod does absolutely NOTHING to improve vB's oversight in these content types, it simply takes what little attachment moderation vB has provided, and assigns that on a per USER GROUP basis. So in the case of these two content types, NO MODERATION per USER GROUP still equalls NO MODERATION.

Very disappointing on MANY levels!

kylek
09-07-2012, 10:07 PM
Works great, just installed on 4.2.0, but only thing that needs changing is the dependency in the product file, thinks it set for 4.0.9