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)
-   -   Advanced Editing Options For Mods & Admins (https://vborg.vbsupport.ru/showthread.php?t=61412)

ashraf_gawdat 08-29-2005 10:37 PM

Realy it is a great hack, I was searching for such one from ages, and good I found it before I request one.

But I have very simple questions :

Can I limit the permission of using this hack to only "SUPER ADMINISTRATORS" which are specified in config.php ?

And can I also give this permission to certain users by their user id ?

akanevsky 08-30-2005 12:22 PM

Yes.

IN editpost.php, REPLACE

PHP Code:

// calculate user's editlevel
if (in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s'$superadministrators, -1PREG_SPLIT_NO_EMPTY)) 
    OR 
$bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)
{
    
$bbuserinfo['editlevel'] = $editlevel['admin'];
}
else if (
$bbuserinfo['permissions']['adminpermissions'] & ISMODERATOR)
{
    
$bbuserinfo['editlevel'] = $editlevel['smod'];
}
else if (
can_moderate($threadinfo['forumid'], 'caneditposts'))
{
    
$bbuserinfo['editlevel'] = $editlevel['mod'];
}
else if (
$bbuserinfo['userid'] == $postinfo['userid'])
{
    
$bbuserinfo['editlevel'] = $editlevel['author'];
}
else
{
    
// someone else is trying to edit this post, permission check will be set up later by originalvb
    // maybe it's a mod just having delete permissions..
    
$bbuserinfo['editlevel'] = $editlevel['author'];


WITH

PHP Code:

// calculate user's editlevel
if (in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s'$superadministrators, -1PREG_SPLIT_NO_EMPTY)) OR $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL)
{
    
$bbuserinfo['editlevel'] = $editlevel['admin'];
}
else
{
    
$bbuserinfo['editlevel'] = $editlevel['author'];



ashraf_gawdat 08-30-2005 08:49 PM

Done, but with no effect ! Adminstrators still have the permission to use these advanced options when they edit a post. But I don't want them to have this permission or even see these options. Only Super Adminstrator should have the permission.

Xenon 08-30-2005 10:49 PM

remove the

Code:

OR $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL
as well :)

Space Goat 09-07-2005 08:31 PM

nevermind, I figured out what was wrong

JsnakeJ 09-10-2005 09:45 PM

Great hack, thank you.

ben_erhan 09-11-2005 07:45 AM

Heyy Friends,

I have instaled this hack but I can not see it while the editing post.
There is not any table " Advanced Editing Options".
I am using vb 3.0.8.is it a problem?
I have made every thing correctly 2 times but everythin is same.
I have run sql,edited editpost.php,created new template,edited editpost template,but there is not any conlution.

Xenon 09-12-2005 04:09 PM

it shouldn't be a problem, there were not much changes in vb308
it should work.

ben_erhan 09-13-2005 08:13 PM

but it does not work.
I did every detail very cafeful,but there is not ant conclution

MThornback 09-15-2005 07:37 PM

Xenon, just so your aware....I edited your hack a BIT for my board to remove the IP editing ability...it was no good for the boards I run....hope there is no issue :)


All times are GMT. The time now is 04:39 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.01264 seconds
  • Memory Usage 1,745KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete