vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   edit post / seperate usergroups (https://vborg.vbsupport.ru/showthread.php?t=191661)

karlm 09-23-2008 11:48 AM

edit post / seperate usergroups
 
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:

PHP Code:

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 - 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 - 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.


All times are GMT. The time now is 11:42 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
  • Page Generation 0.01081 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete