![]() |
Hide threads by usergroup
I've been working on making the secretely banned users hack even more secret :laugh: but I'm stuck at the moment so I thought I'd ask for help. :)
What I'm wanting to do is to prevent all threads started by users from my secretely banned users group to show up in forumdisplay (visible to the banned users, admins and mods though). I figured out a way of doing this based on userids, but not usergroups. Here's what I did in forumdisplay.php: Code:
if (($bbuserinfo['usergroupid']!=16 && $bbuserinfo['usergroupid']!=6 && $bbuserinfo['usergroupid']!=5 && Code:
if (($bbuserinfo['usergroupid']!=16 && $bbuserinfo['usergroupid']!=6 && $bbuserinfo['usergroupid']!=5 && I hope someone can help with some tips. :classic: |
well, the usergroupid isn't saved within the threadtable, so you have to include the usertable to the query:
in forumdisplay find this: PHP Code:
PHP Code:
|
Couldn't you just make it so that his threads get automatically moved to another forum?
Satan |
then he'd see that something isn't normal for him :)
|
Yeah, I figured it would need something like that. It gives me an error though:
"There seems to have been a slight problem with the EmuTalk.net database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience." |
Here's the error report the board sent me:
"Database error in vBulletin 2.2.8: Invalid SQL: SELECT thread.threadid FROM thread LEFT JOIN user ON (thread.postuserid = user.userid) WHERE thread.forumid = 19 AND thread.sticky=0 AND user.usergroupid != 16 AND thread.visible=1 AND lastpost >= 1038763258 AND sticky=0 ORDER BY sticky DESC, lastpost DESC LIMIT 0,20 mysql error: Column: 'lastpost' in where clause is ambiguous mysql error number: 1052" |
ahh, yes i see
find this code: PHP Code:
PHP Code:
|
Yeah, I figured it out earlier today with the help of a friend. Thanks a lot. :D
Now, how would I go about doing the same for showthread.php (cause the error based on usegroup rather than userid)? Any help would be appreciated. :D EDIT: Nevermind, problem solved. :) |
The same here. When I use :
PHP Code:
Any help please? |
Make sure you apply Xenon's latest code change. :)
|
Tanx for the help. I have done that but still the database error :(
|
hamed, in forumdisplay...
FIND this: Code:
$sortfield="lastpost"; Code:
$sortfield="thread.lastpost"; Code:
$sortfield='lastpost'; Code:
$sortfield='thread.lastpost'; |
Tanx a lot. :) That did it.
I had missed the second one. |
Is there anyway to stop pms from a user group?
|
you can disable the whole pm-function for a usergroup in your ACP
|
Thank you Xenon. But if I do that then the banned user notices something is wrong.
Is there any way to hide the secret banned user group's pms for everyone? |
yes, just don't save em to the db ;)
open private.php find this: PHP Code:
PHP Code:
|
Thank you. But still I can send pms with my test ban user :(
|
i've edited it, a bit, it was a little typing error ;)
also your banned group id is 16 wasn't it`? |
Tanx ever so much. It is working now.
Just the popup and email notification are still working for the person that the pm is sent to. :( |
no problem also
find this in private.php: PHP Code:
PHP Code:
|
Thanks many thanks. It is perfect now!
Thank you :) |
:)
no problem, you're welcome |
I plan on releasing a full hack (either that or as an add-on to the secretly banned users hack). If I have Xenon's permission, I will include the additions in this thread as well. :)
So far the additions to the secretly banned users hack are: - Option for moderators to either set a regular ban or a secret ban in the Mod CP. - Hide threads started by secretely banned users to everyone but the user himself, admins and mods. - Ignore private messages by secretely banned users. - Give an "invalid thread error" when trying to view a thread started by a secretly banned user, unless the viewer is secretely banned, admin or mod. This is to prevent users from searching for posts by secretly banned users and being able to view them. |
feel free to use the additions from this thread here :)
|
Great, and thanks for all your help. :)
|
no problem
you're welcome :) |
Despite applying the 'thread.lastpost' fix mentioned here, I kept getting the following error every so often (a few times a day, and only when 'power forum users' tried to play with the thread display options at the bottom of the page), when using mySQL 4.0.13 and PHP 4.3.2:
Code:
Database error in vBulletin 2.3.0: PHP Code:
PHP Code:
|
Hello
It is nice idea May you make it hack please for v.2.3.0 ? Tahnck you |
All times are GMT. The time now is 01:20 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|