Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ban Ignored/Specified Users from Replying v2.0 Details »»
Ban Ignored/Specified Users from Replying v2.0
Version: 1.00, by magnus magnus is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-27-2004 Last Update: Never Installs: 15
 
No support by the author.

Ban Ignored/Specified Users from Replying v2.0

Description
This hack will prevent ignored users from replying to your threads, as well as give you the option to ban additional users without adding them to your ignore list.

Information
This hack was previously titled "User-Defined Posting Bans (Ban specified users from replying)"

Tested on RC4, should work on RC1+

Version History
v1.0 - Initial Release
v2.0 - Added auto-ban of ignored users, created installer script for convenience

Click here for upgrade instructions from 1.0!

Planned Features
v3.0
- Who knows? You tell me.

If you use this, please click

Show Your Support

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

Comments
  #12  
Old 01-29-2004, 01:07 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After this :

PHP Code:
##############################################################
ALTER TABLE " . TABLE_PREFIX . "thread ADD bannedposters VARCHAR250 NOT NULL ;
############################################################## 
this sql error

PHP Code:
requ?te SQL :  

ALTER TABLE " . TABLE_PREFIX . "thread ADD bannedposters VARCHAR250 NOT NULL 

MySQL a r
?pondu:


#1064 - Erreur de syntaxe pr?s de '" . TABLE_PREFIX . "thread ADD bannedposters VARCHAR( 250  )  NO' ? la ligne 1
[Documentation] ? [Retour
an idea (on RC3) ?
Reply With Quote
  #13  
Old 01-29-2004, 03:52 PM
bluecat's Avatar
bluecat bluecat is offline
 
Join Date: Apr 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible that only certain usergroups (who I specify) can use the hack?
Reply With Quote
  #14  
Old 01-29-2004, 07:52 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Socrate
After this :

PHP Code:
##############################################################
ALTER TABLE " . TABLE_PREFIX . "thread ADD bannedposters VARCHAR250 NOT NULL ;
############################################################## 
this sql error

PHP Code:
requ?te SQL :  

ALTER TABLE " . TABLE_PREFIX . "thread ADD bannedposters VARCHAR250 NOT NULL 

MySQL a r
?pondu:


#1064 - Erreur de syntaxe pr?s de '" . TABLE_PREFIX . "thread ADD bannedposters VARCHAR( 250  )  NO' ? la ligne 1
[Documentation] ? [Retour
an idea (on RC3) ?
Hrm, are you including the ";" at the end? There's no reason for that query not to work, you can try removing the " . TABLE_PREFIX ." portion (provided you don't actually use a table prefix).
Reply With Quote
  #15  
Old 01-29-2004, 07:54 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bluecat
Is it possible that only certain usergroups (who I specify) can use the hack?
Sure, encompass the template edits with:
HTML Code:
<if condition="$bbuserinfo[usergroupid]==XX">

<!-- TEMPLATE, BLAH CRAP... -->

</if>
Of course, replace "XX" with the usergroup you wish to allow.
Reply With Quote
  #16  
Old 01-30-2004, 06:10 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus
Hrm, are you including the ";" at the end? There's no reason for that query not to work, you can try removing the " . TABLE_PREFIX ." portion (provided you don't actually use a table prefix).
idem

PHP Code:
You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '" . TABLE_PREFIX . "thread ADD bannedposters VARCHAR( 250  )   NO' la ligne 1 
on a RC3 coldly to install :surprised:
Reply With Quote
  #17  
Old 01-30-2004, 08:36 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Socrate
idem

PHP Code:
You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '" . TABLE_PREFIX . "thread ADD bannedposters VARCHAR( 250  )   NO' la ligne 1 
on a RC3 coldly to install :surprised:

veiled the solution
PHP Code:
ALTER TABLE thread ADD bannedposters VARCHAR250 NOT NULL 
thank at Pithchoume
Reply With Quote
  #18  
Old 01-30-2004, 11:17 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus
Hrm, are you including the ";" at the end? There's no reason for that query not to work, you can try removing the " . TABLE_PREFIX ." portion (provided you don't actually use a table prefix).
Quote:
Originally Posted by Socrate
veiled the solution
PHP Code:
ALTER TABLE thread ADD bannedposters VARCHAR250 NOT NULL 
thank at Pithchoume
That's what I said to do, heh. Seems RC3 doesn't like " . TABLE_PREFIX . " .. odd.
Reply With Quote
  #19  
Old 01-30-2004, 09:47 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BUGFIX!
With the existing preg_split() statement, users with spaces in their name could cause problems for other users which share a common world. For example, if the user "BIG BAD GUY" is banned from a thread, inherently the user "BIG BOY" would be banned because of the shared word, "BIG". With the following fix, that will be fixed:

In newreply.php:

Find: ** NOTE, THERE ARE TWO INSTANCES OF THIS, REPLACE BOTH! **
HTML Code:
$usernames = preg_split('/( )+/', trim(strtolower($threadinfo['bannedposters'])), -1, PREG_SPLIT_NO_EMPTY);
Replace with:
HTML Code:
$usernames = preg_split('/,+/', trim(strtolower($threadinfo['bannedposters'])), -1, PREG_SPLIT_NO_EMPTY);
The only drawback to this fix, is now users are comma delimited instead of space. So, you'll need to update the phrase (bannd_users_desc) to reflect this, personally, I use List of users, separated by commas, who cannot reply to this thread. (ie. user1,user2).

This has been updated in the attachment in the first post, only existing users need to concern themselves with this.
Reply With Quote
  #20  
Old 01-31-2004, 02:45 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to install 2 times the hack, I have a sql error when I click on the button "newthread", I specify that I am in rc3, year idea on the problem?

Error Sql:
PHP Code:
There seems to have been a slight problem with the Local Rc3 database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staffwho you can also contact if the problem persists.

We apologise for any inconvenience 

another thing about the bugfix, this line does not exist in the RC3 In "newthread.php":

PHP Code:
$usernames preg_split('/( )+/'trim(strtolower($threadinfo['bannedposters'])), -1PREG_SPLIT_NO_EMPTY); 
Reply With Quote
  #21  
Old 01-31-2004, 04:47 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Socrate
another thing about the bugfix, this line does not exist in the RC3 In "newthread.php":

PHP Code:
$usernames preg_split('/( )+/'trim(strtolower($threadinfo['bannedposters'])), -1PREG_SPLIT_NO_EMPTY); 
Yikes! I meant newreply.php, sorry for the confusion. I fixed that in the post above.

As for the other problem, you'll need to show me the error. View the source of the HTML page when that error is generated, and post it here.
Reply With Quote
Reply


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 09:56 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.08499 seconds
  • Memory Usage 2,342KB
  • 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
  • (3)bbcode_html
  • (11)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete