PDA

View Full Version : edit post / seperate usergroups


karlm
09-23-2008, 11:48 AM
Does anyone know of a way in which I can apply different uses of the edit function to different usergroups?

I need to offer two different edit periods depending on group membership.

For example, I'd like to offer standard members (usergroup a), say about one-hour to edit their posts, and then the option would vanish from their screens...
However, I'd like for 'supporters' (usergroup b) to be able to have an extended period of time, whether it be considerably longer period of time or unlimited.

I cannot fathom a way of doing this, but I'm sure it is achievable.

Lynne
09-23-2008, 02:38 PM
Just write a plugin. I wrote this one to extend the editing time in one forum. I used the fetch_foruminfo hook, you would probably use a different one to change the permissions based on a usergroupid. Here is mine - just modify for your own needs:

if ($forumid == 'xx')
{
$vbulletin->options['edittimelimit'] = '60';
}

karlm
09-30-2008, 12:31 AM
That is a super start, thank you - I had no idea it would be so easy. However, as ever, I have an addition question... Where might I need to look to change this? postbit,showthread,etc.?

Lynne
09-30-2008, 02:17 AM
To change it? I wrote that code to be used in a plugin. I suppose you could go into the files and edit/change it, but I'm not sure which file that would be in.

karlm
09-30-2008, 02:07 PM
If I knew how to write a plugin, I might be able to move forward LOL. Sadly, I'm not that educated on it to know even where to start :(

Lynne
09-30-2008, 03:10 PM
The best place to start reading up on them is the manual - Plugin System (http://www.vbulletin.com/docs/html/plugin_system) - and the Articles Forum. Or, what I've always done is found a similar modification and then seen how they did it. For instance, this one is very similar to what you want - Allow Usergroups to Post HTML (https://vborg.vbsupport.ru/showthread.php?t=96926&highlight=usergroup%2A) - just modify it to suit your needs.

karlm
09-30-2008, 08:09 PM
You're a star, thanks :D

karlm
10-01-2008, 10:07 PM
This is just over my head. The VB manual doesn't seem to tell me where I should I create code, doesn't tell me what hooks I can/can't use. I've spent the best part of 4 hours trawling through it.

ATVTorture
11-11-2008, 12:05 PM
This is something we really need as well. But I'm with you, creating a plugin myself is outta my league.