Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Disable Usergroups From Deleting Posts Details »»
Disable Usergroups From Deleting Posts
Version: 1.00, by g-force2k2 g-force2k2 is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-07-2002 Last Update: Never Installs: 3
 
No support by the author.

As requested [ Here ] by The Ghost

+++++++++++++++++++++++++++++++++++++++++++++++++
// +++++++ What to do? +++++++
// +++++++ Queries to Run (1) +++++++
// +++++++ File Modifications (7) +++++++
// +++++++ Templates To Add (1) +++++++
+++++++++++++++++++++++++++++++++++++++++++++++++

What does this do?
It restricts usergroups from deleting posts, pertaining mainly to Super Moderators and Moderators.
If you don't trust you moderators when it comes to deleting certain posts or trust their judgement then editing should be suffice enough.
Here you can disable those usergroups from deleting any posts.

Enjoy.

Edit: big thanks to Boofo for helping me sort some issues out and getting things back on track

g-force2k2

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-08-2002, 04:02 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This line is in the usergroup.php not the user.php. You need to edit your instructions.

makeyesnocode("Can delete own threads by deleting the first post","candeletethread",0);
Reply With Quote
  #13  
Old 07-08-2002, 04:04 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i made an error i will fix the changes and update tomarrow ;\ don't have a forum to test with at the moment so i'll re add later... sorry about that...

g-force2k2
Reply With Quote
  #14  
Old 07-08-2002, 04:07 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
Tmakeyesnocode("Can delete own threads by deleting the first post","candeletethread",0);
yeah i know i make some techincal errors ;\ i ain't that great so sorry if a make a few mistakes... i ain't perfect i'll admit that just used to knowing where things are i forget a small thing like usergroup

g-force2k2
Reply With Quote
  #15  
Old 07-08-2002, 04:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After adding it after the first occurrance, I can still edit posts so that looks good. You haven't tested this yet? Shouldn't it be in the beta section until it is fully tested at least once?
Reply With Quote
  #16  
Old 07-08-2002, 04:16 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did test it boofo just didn't notice that there were two differen't if ($action=="deletepost") {

my friend allows me to test on his forum but hes not on right now ;\

i tested it but after you stated the issue about two different actions that got me... so i'll do another final test tomarrow... and i'll have to take into consideration the editing perms...

but i did test and it didn't allow for deletion but better sure to make sure there isn't anything added before reattaching something that is...

g-force2k2
Reply With Quote
  #17  
Old 07-08-2002, 04:18 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, ok. I guess I must have misunderstood you. I will test it now and let you know if all is well.
Reply With Quote
  #18  
Old 07-08-2002, 04:24 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the editpost.php

for security purposes... find both:

PHP Code:
if ($action=="deletepost") { 
after that place:

PHP Code:
// +++++++ Start Checking Delete Post Permission [ Start ] +++++++

  
$perms=getpermissions();
    if(!
$perms[candeleteposts]) {
      eval(
"standarderror(\"".gettemplate("error_cantdeleteposts")."\");");
      exit;
    }
// +++++++ Start Checking Delete Post Permissions [ End ] +++++++ 
I don't see what harm that could do and i've overlooked the coding and the first seems to be checking permissions and the second seems to carry out the actions... so adding to both is probably the best way to go until i can further look into it

g-force2k2
Reply With Quote
  #19  
Old 07-08-2002, 04:28 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked fine with just doing it after the first one. If they can't get the permisssion, they can't carry anything out. Go ahead and test it with both if you want and let me know how it goes. I am going to leave it as is for now. If it ain't broke, I don't want to break it.
Reply With Quote
  #20  
Old 07-08-2002, 04:32 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah i know what you mean... but i guess better safe then sorry thanks for the help alot Boofo and thanks for testing the edit option for me... just so you know i reattached and added the template addon to the

PHP Code:
$templatesused 
if you wanted to just add that in... but thanks for the help

g-force2k2
Reply With Quote
  #21  
Old 07-08-2002, 04:35 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem. Glad to help. Now I expect to see my name up in lights as the Ultimate Beta Tester (is there such a thing and if there is, isn't being proud of that a little strange?)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05055 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete