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
Selected Users Only Can Edit Admin Options Details »»
Selected Users Only Can Edit Admin Options
Version: 1.00, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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

This hack will let you NOT allow certain users to edit your administrator usernames properties and also other options you want to restrict access to, for example editing the templates.
I recommend you to enable only the ones you really trust, that means only yourself.

ESTIMATED INSTALL TIME: 2 minutes
REQUESTED BY: (nobody)
TESTED IN VERSION: 2.2.6

[high]UPDATE[/high]
The hack was updated. It was fixed the problem I had with editing yourself of all users.
NOTE: FireFly posted also another way of doing this, few posts below.

In my hack, I also explained how to stop other admins to edit other options, for example the templates.


You like this hack? Please click on the [high]Install[/high] button.
To download the latest version of this hack, click below:

Show Your Support

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

Comments
  #22  
Old 07-08-2002, 05:51 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

chen, i did this:
i created 2 admins, userid 1 and 2.
i created 1 registered user, userid 3.
now, userid 1 can edit all users and userid 2 can edit all users except the ones listed in $caneditadmin.
i tested all and it works perfectly, in my test board, with the code above. you try it and let me know please. thanks.

update:
i also tried
$caneditadmin = '1,2';

now all admins can perform changes.
Reply With Quote
  #23  
Old 07-08-2002, 05:59 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Nakkid
now, userid 1 can edit all users and userid 2 can edit all users except the ones listed in $caneditadmin
And that's not the point of this hack, is it?
Reply With Quote
  #24  
Old 07-08-2002, 06:02 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i dont understand?
i used this code:
Code:
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;
  }
let suppose you have 4admins in your board. if you use only userid 1 and 2 the others will not be able to edit ONLY the admins.
Reply With Quote
  #25  
Old 07-08-2002, 06:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*sigh*

Let's say you have 4 admins, users A, B, C and D.
You add users A and B to $caneditadmin (Which will not work, but let's assume it does).
Users A and B will be able to edit any users.
Users C and D will be able to edit all users except users A and B.
But user C will still be able to edit user D, and vice versa.
Reply With Quote
  #26  
Old 07-08-2002, 06:09 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

correct. that's what it does the code listed above. try it in your test board and let me know. it works for me.
Reply With Quote
  #27  
Old 07-08-2002, 06:43 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't get it, do you...

That's how it works, right. But that's not how it's supposed to work, because users C and D can still edit other admins (i.e D and C, respectively).

Quote:
Originally posted by Nakkid
This hack will let you allow ONLY certain users to edit your administrator usernames properties
This quote says the hack stops others from editing other admins... and that's not how it works.

If you have 10 admins and add one of them to $caneditadmin, the rest of the 9 won't be able to edit the first user, but will be able to edit one another.
Reply With Quote
  #28  
Old 07-08-2002, 06:49 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i understand now chen. sorry, my 'romanian' english.
i dont care if thay can edit other admins. what i dont want is to be able to edit my options (userid 1 or others listed in $caneditadmin)...
Reply With Quote
  #29  
Old 07-16-2002, 08:10 PM
DemiNeo0101's Avatar
DemiNeo0101 DemiNeo0101 is offline
 
Join Date: Feb 2002
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

iv tried both firefly and your version and im still geting this error:

Warning: Unable to access ./admin/db_.php in /home/virtual/site4/fst/var/www/html/forums/global.php on line 128
Reply With Quote
  #30  
Old 07-16-2002, 10:34 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you are missing the mysql part on the line..
it should read it:
admin/db_mysql.php and NOT admin/db_.php
when you hacked your forum with another hack, you made a mistake somewhere.
Reply With Quote
  #31  
Old 11-02-2002, 11:27 AM
TheSaint-AeD's Avatar
TheSaint-AeD TheSaint-AeD is offline
 
Join Date: Sep 2002
Location: Munich
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx, TECK, I love you for this Hack :love: Exactly what I was looking for.
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 02:50 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.06046 seconds
  • Memory Usage 2,307KB
  • 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
  • (1)bbcode_code
  • (2)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