vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Ban Ignored/Specified Users from Replying v2.0 (https://vborg.vbsupport.ru/showthread.php?t=60844)

Allan 01-29-2004 01:07 PM

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) ?

bluecat 01-29-2004 03:52 PM

Is it possible that only certain usergroups (who I specify) can use the hack?

magnus 01-29-2004 07:52 PM

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).

magnus 01-29-2004 07:54 PM

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.

Allan 01-30-2004 06:10 AM

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:

Allan 01-30-2004 08:36 AM

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 ;)

magnus 01-30-2004 11:17 AM

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.

magnus 01-30-2004 09:47 PM

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.

Allan 01-31-2004 02:45 PM

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); 


magnus 01-31-2004 04:47 PM

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.


All times are GMT. The time now is 04:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01263 seconds
  • Memory Usage 1,771KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (11)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete