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:
Originally Posted by Lynne
What hook location are you using? That is what will determine the variable you use.
|
Hi Lynne, I may have used the incorrect term there sorry! Some further details on the Forum for you to give some background. This should've come last night - my apologies:
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:
Originally Posted by tbworld
I know the section of code you are talking about in 'newpost.php', but I am wondering if this is necessary. Your allowed to select moderators to a forum, you are also allowed to set if a usergroup will follow moderation. You might be able to do this without the hack -- depending how strict your permission system is.
To answer your question:
Code:
is_member_of($vbulletin->userinfo, Y)
Where Y is equl to a valid usergroup id -- is valid vb code as long as '/includes/functions.php' is loaded and in most cases it already is.
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']))
)
You might be able to use the hook: 'newpost_process' with some clever programming or just add your own custom hook, if you do not want to alter the code directly.
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...
|
This has been very helpful tbworld, thankyou. As I mentioned above this is very new to me, and I'm still learning how everything ties in together in the backend. Ideally all posts, except those from usergroup 2, would avoid moderation. This is done easily enough, however as there is no real way to moderate threads only per-usergroup, I was hoping to make something similar to this (very crude, sorry):
Code:
if usergroup == Junior AND == newthread AND forumid == 41 THEN visible == 0
We're just hoping to avoid two things:
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