Back to vBulletin 3.7 Add-ons

SSGTI - Visitor Message Throttle
Mod Version: 3.7.100, by Omranic

This modification is in the archives.
vB Version: 3.7.x Rating: (4 votes - 5.00 average) Installs: 9
Released: 25 Jul 2009 Last Update: Never Downloads: 25
Not Supported DB Changes Uses Plugins Code Changes Additional Files Re-usable Code Translations  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!.............. Sponsored by: PHP KingDom (http://www.phpkd.net) ..............!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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


Note: This product has been requested as a paid product, It has been completed & delivered few months ago. It's licensed under http://creativecommons.org/licenses/by-nc-sa/3.0/, I hope this product will be useful for all of you.

Name: Visitor Message Throttle - Version: 3.7.100

Description: This product allows administrators to cotrol visitor messages for each usergroup with a throttle permissions (required posts/maximum X posts in X time span).

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

Features:
  • Fully Phrased.
  • Fully Automated.
  • Fully Supported.
  • Accurate Processing.
  • Professionally Coded.
  • Doing all default vBulletin checks.
  • Compatible with AJAX & Normal modes.
  • Can configure Visitor Message throttle Permissions per usergroup:
    • Minimum posts required before posting visitor message.
    • Maximum visitor messages allowed to be posted, per X period of time.
    • X period of time in which the maximum Visitor messages will be limited.
    • Apply throttle limitations per user profile or over all profiles.
    • Include own profile or exclude it from throttle limitations.


Installation Procedure:
  1. Upload the "bitfield_ssgti_vm_throttle.xml" file to "/includes/xml/".
  2. Import product's XML file from AdminCP.
  3. Do the following small file edits:
    • Open the file "includes/class_dm_visitormessage.php" & search in it for the following code:
      Code:
       OR $this->is_duplicate()
      And put the following code after it directly (in the same line):
      Code:
       OR $this->is_throttled() OR $this->posts_check()


    • In the same file "includes/class_dm_visitormessage.php" search for the following code:
      Code:
      function is_duplicate()
      And put the following code under this function or above it (the function as a whole):
      Code:
      	/**
      	 * Throttle Stuff
      	 *
      	 * @return      boolean whether this is a throttled post or not
      	 *
      	 */
      	function is_throttled()
      	{
      		if ($this->registry->userinfo['permissions']['ssgti_vm_throttle_hm'] AND $this->registry->userinfo['permissions']['ssgti_vm_throttle_ev'] AND ($this->fetch_field('userid') != $this->fetch_field('postuserid') OR ($this->fetch_field('userid') == $this->fetch_field('postuserid') AND ($this->registry->userinfo['permissions']['ssgti_vm_throttle'] & $this->registry->bf_ugp_ssgti_vm_throttle['ssgti_vm_throttle_own']))))
      		{
      			$ssgti_vm_throttle_ev = TIMENOW - ($this->registry->userinfo['permissions']['ssgti_vm_throttle_ev'] * 60);
      			$query_hook = "";
      			if ($this->registry->userinfo['permissions']['ssgti_vm_throttle'] & $this->registry->bf_ugp_ssgti_vm_throttle['ssgti_vm_throttle_each'])
      			{
      				$query_hook = "AND vm.userid = " . $this->fetch_field('userid');
      			}
      			if ($this->fetch_field('dateline') > $ssgti_vm_throttle_ev)
      			{
      				// ### THROTTLE CHECK ###
      				if ($ssgti_vm_throttles = $this->registry->db->query_read_slave("
      					SELECT vm.userid, user.username
      					FROM " . TABLE_PREFIX . "visitormessage AS vm
      					LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid)
      					WHERE vm.postuserid = " . $this->fetch_field('postuserid') . "
      						AND vm.dateline > " . $ssgti_vm_throttle_ev . "
      						$query_hook
      					"))
      				{
      					// print_r($this->registry->db->fetch_array($ssgti_vm_throttles));
      					if ($this->registry->db->num_rows($ssgti_vm_throttles) >= $this->registry->userinfo['permissions']['ssgti_vm_throttle_hm'])
      					{
      						$this->error('ssgti_vm_throttle', $this->registry->userinfo['permissions']['ssgti_vm_throttle_hm'], $this->registry->userinfo['permissions']['ssgti_vm_throttle_ev']);
      						return true;
      					}
      				}
      			}
      			return false;
      		}
      	}
      	/**
      	 * Posts Check Stuff
      	 *
      	 * @return      boolean whether this user has required posts or not
      	 *
      	 */
      	function posts_check()
      	{
      		if ($this->registry->userinfo['permissions']['ssgti_vm_throttle_ps'])
      		{
      			if ($this->fetch_field('postuserid'))
      			{
      				$user = fetch_userinfo($this->fetch_field('postuserid'));
      				if ($user['posts'] < $this->registry->userinfo['permissions']['ssgti_vm_throttle_ps'])
      				{
      					$this->error('ssgti_vm_throttle_posts', $this->registry->userinfo['permissions']['ssgti_vm_throttle_ps'], $user['posts']);
      					return true;
      				}
      			}
      			return false;
      		}
      	}
      Save the modified file "includes/class_dm_visitormessage.php" & upload it (Allow Overwrite).
  4. Done .


Control:
  • vBulletin AdminCP -> Usergroups -> Usergroup Manager -> Visitor Message Permissions -> Throttle ... Perms


License:
  • http://creativecommons.org/licenses/by-nc-sa/3.0/


Help with:
  • Suggestions to develop this product.
  • Contributing any updates, upgrades and/or any new features.
  • Translations to benefit more users (translation credits goes to their owners).
  • Spreading this product. Yes, you're free to re-distribute this product as it is.


Known Isues:
  • Nothing till now.


History:
  • v3.7.100 24/07/2009 10:00 PM UTC: First initial public release.


Screen Shots:
  • Available down there.


Notes:
  • English version only supported & supplied here, for any other localized release please contact me.


Technical Notes:
  • New Plugins: 0
  • New Phrases: 7
  • New Templates: 0
  • Template changes: 0
  • New Files: 1
  • File Changes: 2
  • New vBulletin Settings: 0
  • New Usergroup Permissions: 5
  • New Moderator Permissions: 0
  • New Administrator Permissions: 0
  • New Forum Options: 0
  • New DB Tables: 0
  • DB Alterations: 4
  • New Cron Jops: 0
    --------------------------------
  • Installation Level: Easy
  • Installation Time: 30~40 seconds


Donation?:
  • No, sorry. I appreciate your kindness. But if you need to help/support, then you can ask me for custom work. I'm ready for any custom work .


Recent Products:
  • http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=ssgti_banunderage
  • http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=ssgti_prevent_duplposts
  • http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=paidsubcertainapi
  • http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=api_paypal2
  • http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=hidevbnewswad

Download

This modification is archived, downloads are still allowed.

File Type: %1$s product-ssgti_vm_throttle-3.7.100.zip (167.1 KB, 24 downloads)

Supporters / CoAuthors

  • PHPKD

Screenshots

Click image for larger version
Name:	product-ssgti_vm_throttle_1.jpg
Views:	46
Size:	21.9 KB
ID:	102439   Click image for larger version
Name:	product-ssgti_vm_throttle_2.jpg
Views:	45
Size:	32.2 KB
ID:	102440   Click image for larger version
Name:	product-ssgti_vm_throttle_3.jpg
Views:	55
Size:	39.3 KB
ID:	102441   Click image for larger version
Name:	product-ssgti_vm_throttle_4.jpg
Views:	50
Size:	32.2 KB
ID:	102442  

Click image for larger version
Name:	product-ssgti_vm_throttle_5.jpg
Views:	39
Size:	39.5 KB
ID:	102443  

Similar Mods

Mini Mods GS - Visitor Message Private Message Notification 1.0 vBulletin 3.7 Add-ons

vblts.ru supports vBulletin®, 2022-2025