The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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 && $bbuserinfo['usergroupid']!=7) && ($thread[postuserid]==X or $thread[postuserid]==XX or $thread[postuserid]==XXX)) { continue; } Code:
if (($bbuserinfo['usergroupid']!=16 && $bbuserinfo['usergroupid']!=6 && $bbuserinfo['usergroupid']!=5 && $bbuserinfo['usergroupid']!=7) && ($thread[postuserid]==X or $thread[postuserid]==XX or $thread[postuserid]==XXX)) { $idname="thread"; eval("standarderror(\"".gettemplate("error_invalidid")."\");"); } I hope someone can help with some tips. :classic: |
#2
|
||||
|
||||
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:
|
#3
|
||||
|
||||
Couldn't you just make it so that his threads get automatically moved to another forum?
Satan |
#4
|
||||
|
||||
then he'd see that something isn't normal for him
|
#5
|
||||
|
||||
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." |
#6
|
||||
|
||||
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" |
#7
|
||||
|
||||
ahh, yes i see
find this code: PHP Code:
PHP Code:
|
#8
|
||||
|
||||
Yeah, I figured it out earlier today with the help of a friend. Thanks a lot.
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. EDIT: Nevermind, problem solved. |
#9
|
||||
|
||||
The same here. When I use :
PHP Code:
Any help please? |
#10
|
||||
|
||||
Make sure you apply Xenon's latest code change.
|
#11
|
||||
|
||||
Tanx for the help. I have done that but still the database error
|
#12
|
||||
|
||||
hamed, in forumdisplay...
FIND this: Code:
$sortfield="lastpost"; Code:
$sortfield="thread.lastpost"; Code:
$sortfield='lastpost'; Code:
$sortfield='thread.lastpost'; |
#13
|
||||
|
||||
Tanx a lot. That did it.
I had missed the second one. |
#14
|
||||
|
||||
Is there anyway to stop pms from a user group?
|
#15
|
||||
|
||||
you can disable the whole pm-function for a usergroup in your ACP
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|