vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Disallow Editing on a Closed Thread (https://vborg.vbsupport.ru/showthread.php?t=267293)

SpawnedX 07-23-2011 06:37 PM

Disallow Editing on a Closed Thread
 
I am having a hard time searching for any possible mod that does this (maybe my search terms are too broad). Does anyone know a mod that allows you to stipulate a particular post is not allowed to be edited if that thread has been closed.

Basically, say you have a competition, and you want people to not be able to edit their application after the deadline and don't want your judges to have to spend time checking everyone's edit history. Just a little option to select upon closing the thread that says do not allow posting edits for this thread.

BirdOPrey5 07-26-2011 10:55 AM

That would be a tough one to add an option to every thread, it would require modifying the database and templates and custom plugins.

If however it's something you will seldom use you could make a new plugin-

Admin CP -> Plugin Manager -> Add New Plugin

Product: vbulletin
hook: postbit_display_complete
title: disable edit in thread
execution order: 5

PHP Code:

Code:

if ($thread['threadid'] == 1000)
  $post['editlink'] = "";

Set Active to YES and SAVE.

Change 1000 to be the threadid of whatever thread you want to disable edits on.

That will disable edits for everyone.

If you want to allow mods and admins to edit:

Code:

if ($thread['threadid'] == 1000 AND !is_member_of($vbulletin->userinfo, 5, 6, 7))
  $post['editlink'] = "";

Where 5, 6, and 7 are mod and admin usergroups.


All times are GMT. The time now is 05:10 PM.

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.00940 seconds
  • Memory Usage 1,708KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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