Previous Thread
Next Thread
Print Thread
Rate Thread
#236374 02/15/2003 9:59 AM
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
NAME: Advanced Banning
VERSION: 1.0.1
DESCRIPTION: Allows to set different ban levels for users.
WORKING UNDER: UBB.threads 6.2.2
PREREQUISITES: none
AUTHORS: Astaran
CREDITS: DAVE-L, this hack is based on his user privilieges hack
DEMO: none
FILES ALTERED: addpost.php, doratethread.php, dorateuser.php, editpost.php,
mess_handler.php, newpost.php, newreply.php, sendprivate.php,
ubbt.inc.php, admin/menu.php, admin/banuser.php, admin/dobanuser.php
DATABASE ALTERED: yes
NEW FILES: admin/editbanusers.php, admin/doeditbanusers.php
OBSOLETE FILES: admin/unbanuser.php, admin/dounbanuser.php

HISTORY:
2003-02-07 Dave_L - 1.0.0 Original release of User privileges
2003-02-15 Astaran - 1.0.0 Original release of Advanced banning
2003-03-02 Astaran - 1.0.1 Updated "Upgrading Instructions" - added missing field in altertable command

NOTES: This hack advances/replaces the normal ban masks. I tested it on my board and it worked well. Make sure to backup all files so that you can undo everything.

UPGRADING: If already installed Dave_L's user restrictions hack, only follow the upgrading instructions at the end of the file.
Attachments
69013-advanced_baning_1_0_1.zip (0 Bytes, 43 downloads)

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
I uploaded the file to my server, cause i wasn't able to attach it.

EDIT: Now it works, get it from the first post.

Last edited by Astaran; 03/02/2003 5:18 AM.
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
I like the idea behind this so I installed and put the database changes in place.

I get this error when I run the edit/delete bans

SQL ERROR: Unable to do_query: SELECT t1.B_Uid,t1.B_Hostname,t1.B_Reason,t1.B_X_NoEditPost,t1.B_X_NoEditProfile,t1.B_X_NoMessage,t1.B_X_NoPost,t1.B_X_NoRate,t1.B_X_NoLogin,t1.B_Comment,t2.U_Username FROM w3t_Banned as t1 LEFT OUTER JOIN w3t_Users as t2 ON t1.B_Uid = t2.U_Number
Unknown column 't1.B_X_NoLogin' in 'field list' Edit or delete bans


Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Also when I ban a user/ip Iget this message

SQL ERROR: Unable to do_query: INSERT INTO w3t_Banned (B_Uid,B_Hostname,B_Reason,B_X_NoEditPost,B_X_NoEditProfile,B_X_NoMessage,B_X_NoPost,B_X_NoRate,B_X_NoLogin,B_Comment) VALUES ('1807','NULL','test','0','1','1','0','1','0','test')
Unknown column 'B_X_NoLogin' in 'field list'

The Uid 'testing' has been banned. You will now be returned to the main administration page


Is this what I want using that link?



Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
The B_X_NoLogin column was not included in my original User Privileges hack (since I couldn't figure out how to make that work). The addition of that column is missing from the instructions. To add that column:

ALTER TABLE w3t_Banned
ADD B_X_NoLogin CHAR(1) NOT NULL DEFAULT '1';



Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Dave thanks that fixed it. Nice mod

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Thx, Dave_L.
This field was missing from the altertable command in the upgrading instructions.

I updated the instructions and attached the mod to the first post.

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
Are you sure that you updated the instructions cause I can't see it.
Also does the login ban works?

Thanks

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
I got it working on 6.2.3 with the above code addition.

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
Me too . Fantastic !!!

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)