The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Moderate only OP (newthread) by Usergroup - Possible?
Hello Folks,
I am attempting to introduce a hook in functions_newpost.php on a vB 4.2.1 forum to allow us to moderate a particular usergroup's threads, not posts, for a subset of forums. I found an old post for some vB 3.8 code by another user here that seems a good fit, however I think the parameters to point vB to check the usergroup ($vbulletin->userinfo) may be incorrect for vB 4.x: Code:
else { $dataman->set('visible', 1); $post['visible'] = 1; } and add below that: if ($type == 'thread') { if ($foruminfo['forumid'] == X AND is_member_of($vbulletin->userinfo, Y)) { $dataman->set('visible', 1); $post['visible'] = 1; } } The 'visible' and 'thread' params check out, is anyone able to help me with finding the vB 4.x equivalent of $vbulletin->userinfo please? I would much rather try and have a crack at getting this going than introduce a sitewide thread moderation policy on our sale forums. Thanks in advance! Justin |
#3
|
|||
|
|||
Quote:
To answer your question: Code:
is_member_of($vbulletin->userinfo, Y) Then you just need to alter the permission in 'newpost.php' listed below. Code:
// see if post has to be moderated or if poster in a mod if ( (( ( ($foruminfo['moderatenewthread'] AND $type == 'thread') OR ($foruminfo['moderatenewpost'] AND $type == 'reply') ) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['followforummoderation']) ) AND !can_moderate($foruminfo['forumid'])) OR ($type == 'reply' AND (($postinfo['postid'] AND !$postinfo['visible'] AND !empty($postinfo['specifiedpost'])) OR !$threadinfo['visible'])) ) I could have been more helpfull, but you did not explain how you were going to manipulate the usergroup data into the function 'build_new_post'. Hopefully, I helped with something... |
Благодарность от: | ||
juzz86 |
#4
|
|||
|
|||
Thankyou both very much for your time, and my apologies for the lack of detail. This end of vB and php in general is all quite new to me, I've been Moderating for years but the step up to Admin requires more of this kind of stuff, and I must admit I'm just feeling my way through for the most part. I appreciate you guys taking time out to help me thus far - thankyou.
Justin from Australia Quote:
I co-Admin a small cell phone sale/trade forum. We have some reasonably hefty restrictions on our new memberships currently - thread creation is completely disabled, until a positive transaction is recorded against their name and we manually promote to Members after this. As we are a small forum and a close-knit staff, we don't oppose the level of manual work to keep our forum as evil-free as feasibly possible. This has worked well for us so far, however we are in the midst of partnering with a news site to provide us a nice portal (and more users), and would like to relax the thread creation restrictions in aid of encouraging new members a bit more. Thus, I am hoping to be able to use the little bit of code I found last night to put a 'catch' in the newpost rules, that any thread posted into forumID 41, by usergroup 2, is automagically placed in the moderation queue. The aim is to avoid moderating their negotiation back-and-forth posts, and just moderate all OPs by that usergroup. Quote:
Code:
if usergroup == Junior AND == newthread AND forumid == 41 THEN visible == 0 1) Moderating all new threads for forumid 41 (easily achieveable but detrimental to our established userbase) 2) Moderating every single post for usergroup 2 in forumid 41. I hope this clarifies a little. Again, sorry for my lack of understanding Justin |
#5
|
|||
|
|||
I would like to re-submit this in hopes someone out there may be able to provide a bit more detail on whether this is even possible.
I have added the relevant code above into forum_newpost.php, in the correct syntax and location. I am unsure what else needs to be done to get this to work, and would love any other advice or opinions. To refresh, we are hoping to send new threads (OPs) made by Junior Members in forum 41 to the moderation queue automatically, while letting their posts in other threads in the same forum filter through. I know I need to be looking at the 'newpost' side of things, I just can't work out what else is needed other than the code above to get this working for us. Moderating every post isn't practical unfortunately. Thankyou. Justin |
#6
|
|||
|
|||
Hi @juzz86, I will try to take a quick look at this after work. Just saw your message, but my brain is already mush. Unfortunately, the permission sequence in 'newpost' has to be analyzed, and states charted before any additional conditionals are added. Since your just talking about moderation in a particular forum, this should be doable without any real headaches.
What is an 'OPs' ? |
#7
|
|||
|
|||
Quote:
I don't want this to be a massive hassle, so if it turns out to be a mammoth job we will just work around it as best we can. Plural of Original Post |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|