vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Unalterable Admins Can Edit Themselves (https://vborg.vbsupport.ru/showthread.php?t=93482)

akanevsky 08-01-2005 10:00 PM

Unalterable Admins Can Edit Themselves
 
I no longer support my hacks. Please feel free to update them and release new versions elsewhere as long as I get the credit for the original modification.

/*===================================*\
|| Unalterable Admins Can Edit Themselves
||
|| Author : Anton Kanevsky
|| Co-Author(s) : Andreas
|| Works on : vBulletin 3.5.x - 3.8.x
|| Released : Jan 31, 2009
||
|| Time required to install: 30 seconds
|| Difficulty: easy
\*===================================*/

DESCRIPTION

Allows unalterable administrators to modify their own accounts (with the exception of the password, usergroup and membergroups) via admincp.

STATISTICS

Products to Install: 1


VERSION HISTORY

1.0.5
[+] Ported to vBulletin 3.7.x - 3.8.x.

1.0.4
[+] The modification is now compatible with vBulletin 3.6.4 - a plugin code change was required due to changed format of CVS_REVISION constant.
[+] It is no more possible for an uneditable admin to modify the usergroup(s) he or she belongs to.

1.0.3
[+] The modification is now officially compatible with vBulletin 3.6.0 and above.
[+] The modification is now a product rather than a plugin, and it supports version check.

1.0.2
[+] Added restriction to prevent code from executing anywhere but within user.php.
[+] Added restriction to prevent alteration of password for unalterable administrators.

1.0.1
This is now a plugin instead of a code hack. Cheers to Andreas.

1.0.0
First Public Release

The installation manual is contained within the attached file.

IF YOU LIKE MY HACK, PLEASE CLICK INSTALL

Troak 08-02-2005 08:46 PM

Thank you :)

tehste 08-02-2005 08:48 PM

Nice idea. I hate the fact undeletable users can't be edited. Though I prefer just to have one super admin so it doesn't really matter for me.

Troak 08-02-2005 09:05 PM

The code in the hack makes sense but for some reason doesn't work. I might have done something wrong though.

akanevsky 08-02-2005 09:27 PM

Did you find and replace both instances?

Troak 08-02-2005 09:28 PM

Yes, I still get this message
Sorry, this user is protected from being altered in the config.php file by the $config['SpecialUsers']['undeletableusers'] variable.

akanevsky 08-02-2005 09:36 PM

Hmm.. Hold on, I'll take a look at what the problem might be...

Troak 08-02-2005 09:50 PM

I can't figure out why it doesn't work =/

akanevsky 08-02-2005 09:51 PM

Give me a minute please...

Troak 08-02-2005 09:52 PM

Sure thing, I've just been going through the code to see if there was anything causing a problem, but I couldn't find anything, then again I don't know much about php.. lol

akanevsky 08-02-2005 11:45 PM

Sorry for the delay, didn't have time to look.
I am uploading the fixed version. It is just a matter of an extra $ sign lol.

EDIT: A fixed and tested version uploaded. :)

EasyTarget 08-02-2005 11:59 PM

great idea, thanks.

akanevsky 08-03-2005 12:04 AM

You are welcome, but don't forget to click install -.- :)

Snake 08-03-2005 08:06 AM

Cute hack, thanks. ^_^

Troak 08-03-2005 12:33 PM

Yay works fine now ^^
Thanks a ton!

Andreas 08-04-2005 10:07 AM

Nice Code Hack.
How about a Plugin? ;)

Hook: admin_global
PHP Code:

if ($_POST['do'] != 'kill')
{
    
$noalter array_flip(explode(','$vbulletin->config['SpecialUsers']['undeletableusers']));
    unset(
$noalter[$vbulletin->userinfo['userid']]);
    
$vbulletin->config['SpecialUsers']['undeletableusers'] = implode(','array_flip($noalter));



Snake 08-04-2005 11:33 AM

That's much better as a plugin so thankies!!

akanevsky 08-04-2005 11:43 AM

Quote:

Nice Code Hack.
How about a Plugin?
Thanks. I did not know about the array_flip function :)
I will set it up as a plugin.

akanevsky 08-04-2005 11:57 AM

Done, converted to a plugin.
Except in mine, it's $_POST['do'] == 'update'

Snake 08-04-2005 12:23 PM

Well what's the difference? :P

akanevsky 08-04-2005 12:57 PM

The difference is, in Kirby's version you could delete the admin (but not edit him). In mine, you can edit, but not delete.

akanevsky 08-04-2005 12:58 PM

Mod, move it to plugins please thanks.

IceBurn3000 08-04-2005 01:06 PM

Awesome plugin!

*Clicks install

It was a real pain having to edit the config file to modify my settings! Not any more!

Sovereign 08-04-2005 03:48 PM

Thank you! I couldn't edit myself (I set myself as unalterable for security reasons) and had to keep FTPing new config.phps every time I changed something...

Andreas 08-04-2005 07:48 PM

Quote:

Originally Posted by Dark Visor
The difference is, in Kirby's version you could delete the admin (but not edit him). In mine, you can edit, but not delete.

Erm ... I check for do != 'kill', you checked for do == 'update'
As those are the only actions in user.php that check undeletableusers it should be the same?

akanevsky 08-04-2005 08:15 PM

Quote:

Erm ... I check for do != 'kill', you checked for do == 'update'
As those are the only actions in user.php that check undeletableusers it should be the same?
Oh. Sorry. I read it as do=='kill'... lol. Yeah, it would do the same, but I prefer a specific action, rather than any exclusive actions if you know what I mean. :)

Andreas 08-04-2005 08:22 PM

Yeah, I didn't want to check for update as this is used by almost all Scripts.
Maybe
PHP Code:

if ($_POST['do'] == 'update' AND basename($vbulletin->scriptpath) == 'user.php')
{
stuff


Then it would really be disabled just for this action.

akanevsky 08-04-2005 08:46 PM

Quote:

Then it would really be disabled just for this action.
Actually, only user.php does any changes to user accounts. So it would be pointless to check for the script as well, wouldn't it?

Andreas 08-04-2005 08:49 PM

I was too lazy to check other Scripts ^.^
If it's only being used in this one, great.

BlackRabbit1971 08-05-2005 11:49 PM

Getting a "Invalid File Specified" on trying to import :(

akanevsky 08-06-2005 11:45 AM

Then specify a valid file :)

TCM 08-07-2005 08:05 AM

Thankyouthankyouthankyou! THANK YOU!

*Click install*

EDIT: -_-

It doesn't work on RC2. Drat.

Or I've done something stupid.

akanevsky 08-07-2005 12:50 PM

It's for RC1... Didn't test on RC2.

Snake 08-07-2005 03:47 PM

I'm running on RC2 and it works fine. ;)

BlackRabbit1971 08-07-2005 07:01 PM

Quote:

Originally Posted by Dark Visor
Then specify a valid file :)


And just exactly where would I find a valid file.... I downloaded it from here... ???

akanevsky 08-08-2005 02:07 AM

Quote:

I downloaded it from here... ???
That would be the valid file that you have to specify in your admincp :)

TCM 08-08-2005 03:32 AM

Quote:

Originally Posted by Snake
I'm running on RC2 and it works fine. ;)

Odd. It isn't working for me. =/

BlackRabbit1971 08-08-2005 11:00 AM

Quote:

Originally Posted by Dark Visor
That would be the valid file that you have to specify in your admincp :)


Ok... this is getting silly....

This what I do...

1. Download you zip and unzip it...
2. In the Plugin System/Manage Products I click [Add/Import Product]
3. I then click BROWSE and point the file selection box to your "plg_uacet.xml" file.
4. I click Import.

The screen changes to the "Importing Product, Please Wait..." page. I then get 2 sets of dots "[::]" and an error box... "Invalid File Specified" and a "Go Back" button...


So, you tell me what I'm doing wrong??

akanevsky 08-08-2005 11:25 AM

Try removing the text from the textbox that allows you to upload a file from the server.

BlackRabbit1971 08-08-2005 12:59 PM

Quote:

Originally Posted by Dark Visor
Try removing the text from the textbox that allows you to upload a file from the server.


Nope.. same thing... I've even tried uping directly to the server and using that damn box ya telling me empty.. :(

I would so like to use this plugin... :(

BR :(


All times are GMT. The time now is 04:46 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.01284 seconds
  • Memory Usage 1,800KB
  • 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
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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