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)
-   -   [final]Lesser Admin Cp... (https://vborg.vbsupport.ru/showthread.php?t=41556)

adalberto 09-06-2002 06:59 PM

Hallo.

I'am New admin for vbulletin and my english is not very good ;)

I have a question, where I copy this line ??

Quote:

-------DO NOT COPY THIS LINE-------

Copy this last step out as many times for as many admins as you need to protect from being deleted. To prevent them deleting other users in their usergroup, enter :

-------DO NOT COPY THIS LINE-------

if (($usergroupid==X) and ($bbuserinfo[usergroupid]!=6)) {
echo "<p>You cannot delete this Admin.</p>";
cpfooter();
exit;
}
---------------
Please to explain better this modify:
Quote:

(NB : remember change X to the usergroupid of the Admin2 User)
----------------
Last question, for unistal this hack, this query, as I modify it:

Quote:

ALTER TABLE `usergroup` ADD `canaccesscoadmin` SMALLINT(6) DEFAULT '0' NOT NULL
Thank's, Adalberto

Chris M 09-06-2002 09:08 PM

@adalberto...

If I understand correctly, you want to know how to :
  • Copying the line
  • Understand what I meant with the instructions
  • Know how to Uninstall this hack

Right - Well I'll try;)

1.) Copying the line :

You can copy that line under this one :
PHP Code:

// ###################### Start Kill #######################

if ($HTTP_POST_VARS['action']=="kill") { 

You can copy it out as many times as you need...

2.) Understand what I meant with the instructions :

I meant that you will have to change the letter "X" that is in the code to copy, to the usergroupid of the group you want to protect...

Here is a list of the ones you might want to know :
(The Numbers in Bold are the usergroupid)
2 - Registered User
5 - Super Moderator
6 - Administrator
7 - Moderator

3.) Know how to Uninstall this hack :

To Uninstall, simply reverse the changes made, and run this query :

[sql]ALTER TABLE `usergroup` DROP `canaccesscoadmin`[/sql]

Satan

adalberto 09-08-2002 05:18 PM

Quote:

Originally posted by hellsatan

If I understand correctly, you want to know how to :
Yes is correctly.

But in admin pannel, I when find, modify or add user result this error:
Parse error: parse error in /httpdocs/admin/user.php on line 308


Thank's Adalberto

Chris M 09-08-2002 05:23 PM

Have you made sure that you have changed the "X" in the code below?

PHP Code:

if (($usergroupid==X) and ($bbuserinfo[usergroupid]!=6)) { 
echo 
"<p>You cannot delete this Admin.</p>";
cpfooter();
exit;


Satan

adalberto 09-08-2002 06:09 PM

Quote:

Originally posted by hellsatan
Have you made sure that you have changed the "X" in the code below?
Yes...

mmm... sorry, but this X is 6 ?? :confused:

Chris M 09-08-2002 06:21 PM

6 is usually the usergroupid of Administrators...

Therefore you will need to change this :

PHP Code:

if (($usergroupid==X) and ($bbuserinfo[usergroupid]!=6)) { 
echo 
"<p>You cannot delete this Admin.</p>";
cpfooter();
exit;


to
PHP Code:

if (($usergroupid==6) and ($bbuserinfo[usergroupid]!=6)) { 
echo 
"<p>You cannot delete this Admin.</p>";
cpfooter();
exit;


Satan

adalberto 09-08-2002 06:30 PM

Quote:

Originally posted by hellsatan
[B]6 is usually the usergroupid of Administrators...

Mmm... I had already change, but this error remains :bored:

Sorry, this number where I find??

Chris M 09-08-2002 06:40 PM

Goto your Admin Control Panel...

Scroll down until you find under "Usergroups", the Modify link...

Click it...

Hover over the group you want to protect, and look in the bottom left corner...There should be a link...

The number on the end of the link is the usergroupid...

If that does not work, post the lines that the error is occuring on...

Satan

adalberto 09-08-2002 07:10 PM

The usergroupid is exact 6

The error line is this:

if ($userid==42) and ($bbuserinfo[userid]!=42) {

42 is amministrator number.

Mmmm... I forgot, have a 2.2.7 vBulletin version :bored:

Chris M 09-08-2002 07:55 PM

You need 2 sets of brackets;)

It should be :

PHP Code:

if (($userid==42) and ($bbuserinfo[userid]!=42)) { 

Satan


All times are GMT. The time now is 01:06 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.01332 seconds
  • Memory Usage 1,753KB
  • 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
  • (5)bbcode_php_printable
  • (6)bbcode_quote_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