vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Selected Users Only Can Edit Admin Options (https://vborg.vbsupport.ru/showthread.php?t=40787)

TECK 07-07-2002 05:56 PM

Quote:

Originally posted by FireFly
Call me crazy but according to this you will not be able to edit ANY user (regular included), if you are not listed in config.php.
helpppppppppppp!!!! firefly is kicking my ass!!!!! :)
i will mod it rightaway chen. you are sooooooooo right. sorry.
testing it right now...

Marshalus 07-07-2002 05:56 PM

Call me crazy but I just tested it and he's right.

Marshalus 07-07-2002 06:27 PM

That template hack didn't work.

Admin 07-08-2002 06:06 AM

Working version attached...

g-force2k2 07-08-2002 06:14 AM

Quote:

Originally posted by g-force2k2


how would that cause a parse error ;) ?

Edit: Nakkid if that doesn't work try place the:

PHP Code:

unset($editadmin); 

above:

PHP Code:

require("./global.php"); 

g-force2k2

I guess it was correct after all ;) just shows it helps to learn from reading different vb files :)

g-force2k2

TECK 07-08-2002 04:02 PM

ok i updated the file. i looked at firefly's mod. i never thought of it this way. :)
thanks chen.

chen, can you also look at my way of doing it, with same results? let me know what you think.
also i added other code options related to templates for example, on how to disable the access. is all included in the first post.

TECK 07-08-2002 04:11 PM

Quote:

Originally posted by Marshalus
That template hack didn't work.
it works. check your code.

TECK 07-08-2002 04:16 PM

Quote:

Originally posted by g-force2k2
I guess it was correct after all ;) just shows it helps to learn from reading different vb files :)
actually, it must be unset in global.php and NOT in user.php, so we were wrong both. thanks to chen, who told me why is done this way, i understood finally the way it works to unset a variable.

Admin 07-08-2002 05:11 PM

Quote:

Originally posted by Nakkid
actually, it must be unset in global.php and NOT in user.php, so we were wrong both. thanks to chen, who told me why is done this way, i understood finally the way it works to unset a variable.
Actually, you can unset the variable in user.php, before requiring global.php.

Admin 07-08-2002 05:15 PM

Nakkid, your hack is still not correct.

Code:

+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
if ($HTTP_POST_VARS['action']=="doupdate") {
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
if ($HTTP_POST_VARS['action']=="doupdate") {

  if (!in_array($bbuserinfo['userid'],array($caneditadmin)) and in_array($userid,array($caneditadmin))) {
    echo "<p>You are not allowed to edit this user</p>";
    exit;
  }
+--------------------------------------------------------------------------+

That means you (a) won't be able to edit ANY user, and (b) will not work if you have more than one user listed in $caneditadmin.


All times are GMT. The time now is 03:53 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.01032 seconds
  • Memory Usage 1,740KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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