![]() |
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. :)
|
All times are GMT. The time now is 05:03 AM. |
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:
|