vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Allow deleting threads only when there is one post (https://vborg.vbsupport.ru/showthread.php?t=222693)

sparklywater 09-07-2009 11:05 PM

Allow deleting threads only when there is one post
 
Is it possible to allow users to delete their own thread only when the first post is the only one in the thread, but not allow this if there are other posts in the thread? This would prevent users from deleting long discussions in threads while allowing them to delete threads created by mistake. How can I make my forum work like that?

Lynne 09-08-2009 03:31 AM

There is no default option to do that. I think you'd have to write a modification to do that.

sparklywater 09-08-2009 11:57 AM

I know, that's what I'm asking about...

Lynne 09-08-2009 02:11 PM

You asked if it was possible and I said not with default vbulletin.

Anyway, you'd probably want to write a plugin that does a quick check to count posts in a thread. If there is more than 1 post, give them a No Permission for deleting the thread. I think you'd do this for the editpost.php file but I'm not positive (look at the form action for the Edit Post).

Programming Discussions is for help writing the code (you write it, tell us what is wrong, we make suggestions on how to fix it). If you need someone else to write it for you, you should post in Modifications Requestions (unpaid) or Paid Requests.

sparklywater 09-08-2009 03:44 PM

okay thank you.


All times are GMT. The time now is 06:57 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.01076 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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