vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Assign Physical Delete to a Specific User or Usergroup (https://vborg.vbsupport.ru/showthread.php?t=68103)

AnhTuanCool 08-07-2004 10:00 PM

Assign Physical Delete to a Specific User or Usergroup
 
What will it do, as I said on the title, it assigns the permission of showing Physical Delete Function to a Specific User or Usergroup. :devious:

Open up file editpost.php

Find:
PHP Code:

    $show['physicaldeleteoption'] = iif (can_moderate($threadinfo['forumid'], 'canremoveposts'), truefalse); 

Replace with:
PHP Code:

    if ($bbuserinfo['usergroupid'] == '6')
             {
    
$show['physicaldeleteoption'] = iif (can_moderate($threadinfo['forumid'], 'canremoveposts'), truefalse);
             }
             else
             {
    
$show['physicaldeleteoption'] = false;
             } 

Save it up.

This line
PHP Code:

    if ($bbuserinfo['usergroupid'] == '6'

is showing the usergroup that have the permission to view(use) physical delete. You can look up in your admincp > Usergroup Manager to get your proper id that you want to have permission of viewing(using) physical del or you could change it to
PHP Code:

if ($bbuserinfo['userid'] == '1'

and replace 1 with your userid.


If you install this plz click Install, this is my first hand hack so plz supporting me. :D Have a nice day.

Need screenshot, look at the attachment. ^__^

nexialys 08-08-2004 09:55 AM

i know it's your first hack here, but i will suggest you to add a setting in the Usergroups manager instead of hardcoding the group number, so you can set the feature for each usergroup... that would benefit everyone!

AnhTuanCool 08-08-2004 12:24 PM

I am studing that, thanks :)


All times are GMT. The time now is 01:12 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.01052 seconds
  • Memory Usage 1,716KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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