Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
SSGTI - Visitor Message Throttle Details »»
SSGTI - Visitor Message Throttle
Version: 3.8.100, by Omranic Omranic is offline
Developer Last Online: Sep 2021 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.8.x Rating:
Released: 07-23-2009 Last Update: Never Installs: 17
DB Changes Uses Plugins
Re-useable Code Code Changes Additional Files Translations  
No support by the author.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!.............. Sponsored by: PHP KingDom (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 Creative Commons - Attribution-Noncommercial-Share Alike 3.0, I hope this product will be useful for all of you.


Name: Visitor Message Throttle - Version: 3.8.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:

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.8.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:

Download Now

File Type: zip product-ssgti_vm_throttle-3.8.100.zip (167.1 KB, 93 views)

Screenshots

File Type: jpg product-ssgti_vm_throttle_1.jpg (21.9 KB, 0 views)
File Type: jpg product-ssgti_vm_throttle_2.jpg (32.2 KB, 0 views)
File Type: jpg product-ssgti_vm_throttle_3.jpg (39.3 KB, 0 views)
File Type: jpg product-ssgti_vm_throttle_4.jpg (32.2 KB, 0 views)
File Type: jpg product-ssgti_vm_throttle_5.jpg (39.5 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-24-2009, 11:36 PM
erel34's Avatar
erel34 erel34 is offline
 
Join Date: Dec 2007
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Teşekkürler
Reply With Quote
  #3  
Old 07-25-2009, 09:44 PM
The4um's Avatar
The4um The4um is offline
 
Join Date: Nov 2008
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you, looks great
Reply With Quote
  #4  
Old 07-25-2009, 09:56 PM
Almotmaiz.Net Almotmaiz.Net is offline
 
Join Date: Jan 2005
Location: U.A.E, Sharjah
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed !

nice one !
Reply With Quote
  #5  
Old 08-14-2009, 10:20 AM
Omranic's Avatar
Omranic Omranic is offline
 
Join Date: Jan 2005
Location: Egypt
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by erel34 View Post
Teşekk?rler
Birşey değil.


Quote:
Originally Posted by The4um View Post
thank you, looks great
You are welcome.


Quote:
Originally Posted by Almotmaiz.Net View Post
installed !

nice one !
Sounds Great.

Reply With Quote
  #6  
Old 11-22-2009, 07:37 AM
Konstantinos Konstantinos is offline
 
Join Date: Apr 2006
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice idea but doesnt work for me

arse error: syntax error, unexpected T_LOGICAL_OR in /home/.../includes/class_dm_visitormessage.php on line 150
Reply With Quote
  #7  
Old 01-19-2010, 11:28 AM
alhatmy alhatmy is offline
 
Join Date: Feb 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using 3.8.4

and I think there are some errors in some file edits.

can you check them again please ?
because any user can post any amount even I'm using your code
Reply With Quote
  #8  
Old 01-27-2010, 10:41 AM
alhatmy alhatmy is offline
 
Join Date: Feb 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still waiting .. !
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06993 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (6)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete