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)

Chris M 07-25-2002 10:00 PM

[final]Lesser Admin Cp...
 
Please do the following before attempting to install:

1.) Backup your Files before doing anything
2.) Be aware that although I have tested this myself, there may still be problems...If you do not backup your files, I cannot condone your install of this hack...
3.) If you want to Backup your Database, You can - There shouldn't be any need to...

The file(s) you should have is/are:

install_lesseradmincp_txt.php
install_lesseradmincp_usergroups_txt.php

Install Info:
Hack Version: 1.4
Files to edit: 4
Templates to add: 0
Templates to edit: 0
Queries to Run: 1
Time to install: Approx 5 Minutes

Credits
Requested by - Nobody

Support - I am offering support, but only in THIS THREAD...I unfortunately cannot be here during the coming weeks (Mon-Fri), so therefore you will have to rely on others for assitance, should it be urgent...If you do require assitance, please - Only reply in this thread

Hack info

What does it do? - This basically will allow you to make a Lesser Control Panel for your other Admins...I know I released the "Total Admin Security" hack (link in my profile), but this will allow you to ensure that they cant delete your templates, especially if you put them in a seperate usergroup...

I know you will want a screenshot, so here is a screenshot of my Co-Admin Control Panel...The second Screenshot is of the Co-Admin Permissions...The third is of the Usergroup gone from edit user and add user...The fourth is of the Usergroup gone from search options, and the fifth is from search display options...

Live Demo/Screenshots

Co-Admin Control Panel
Co-Admin Permissions
The name "Co-Admin" is what I determine as "Lesser Admin" - The picture may differ slightly from the screenshot
Usergroup options gone from Edit user & add user
Usergroup no longer a Find option
Usergroup no longer able to be display in searches

[high]Latest Version[/high]

You can download Version 1.4 (normal) here...
You can download Version 1.4 (usergroup version) here...

Enjoy!:)

Satan

Link14716 07-26-2002 06:26 PM

I'll proably install this. Thanks ;)

NTLDR 07-26-2002 08:14 PM

Looks good hellsatan ;)

I don't currently have any use for it as I'm the only admin but I'm sure many will benifit from it.

Chris M 07-26-2002 08:23 PM

Uhuh...

I am the Only Admin at my boards also...I made it really, so that my Super Mods, who I call Co-Admins, can perform some of the Admin Functions, so I dont have to...

There are of course limitations to their power;) I made it so that I dont have anyone else who might be able to access the real Admin CP and do damage...

Satan

Thewnagchung 07-26-2002 09:05 PM

First off GREAT HACK!!

but before i install it i have a couple of questions.

could i make it were my mega mods(super mods) can access it? and can you also add a temp ban, and unban function?

edit: NM about letting them access it, i figured that out, but can you add the ban/unban function?

Chris M 07-26-2002 09:31 PM

Yes...

You will need to make sure that you only give them the url, as any Mod can access it at this time...I am trying to sort that out...

Whatever hacks you can do to the Admin CP, you can do to this one too...

If you want to ensure that only your mega-mods can access it, enter this in the top of every php file, under :

PHP Code:

require("./global.php"); 

You can enter :

PHP Code:

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


(Change X and Y to the Ids of your MegaMod group, and your Admin group)

So yes...In answer to your question, yes you can

Satan

Thewnagchung 07-26-2002 09:34 PM

Quote:

Originally posted by hellsatan
Yes...

You will need to make sure that you only give them the url, as any Mod can access it at this time...I am trying to sort that out...

Whatever hacks you can do to the Admin CP, you can do to this one too...

If you want to ensure that only your mega-mods can access it, enter this in the top of every php file, under :

PHP Code:

require("./global.php"); 

You can enter :

PHP Code:

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


(Change X and Y to the Ids of your MegaMod group, and your Admin group)

So yes...In answer to your question, yes you can

Satan

Thanks!

ione more question
how would i add a ban function that worked like this.

instead of having a set timer for a ban, the mega mod would ban the user, and if that user has been a pain leave him banned under that user name for good. BUT if he just wants it to be a temp ban, he can just un-ban him at a later date.

Xenon 07-26-2002 09:54 PM

Quote:

Originally posted by hellsatan
Yes...

You will need to make sure that you only give them the url, as any Mod can access it at this time...I am trying to sort that out...

Your hack is better than you mean ;)

you check for usergrouppermission: ismoderator which actually means the usergroup is a supermod group.

so just every supermod can acces to that panel ;)

if you think that are to much users, you have to add another field to usergroup table canaccesscoadmin...
then change all ismoderator to canaccesscoadmin

Chris M 07-26-2002 10:24 PM

Erm...

@Thewnagchung - That is an issue for the creator of the Temp Ban hack...I cannot help you there im sorry...:(

@Xenon - It does? I thought it meant any moderator...

Silly me!

I might do what you suggested, so I can have Super Mods too;)

Satan

Chris M 07-26-2002 10:57 PM

Ok...Ive updated the first post...

Satan

Xenon 07-26-2002 11:00 PM

you get better and better :)
good work satan

Thewnagchung 07-26-2002 11:13 PM

im getting this error once im done installing it o.O

Parse error: parse error, unexpected T_LOGICAL_AND in /home/videogam/public_html/forum/Admin2/user.php on line 299

Thewnagchung 07-27-2002 12:13 AM

PHP Code:

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


what values do I put in for X ?

forgive me but im a n00b at this

Xenon 07-27-2002 12:26 AM

X is your userid ;)
normally its 1

Thewnagchung 07-27-2002 01:09 AM

I got it to work for the most part, but I have a question.

if you give them the power to make users, cant they just make an admin account and thus forth wreak havoc anyway?

Chris M 07-27-2002 08:52 AM

Yes...That is why It is not finished;)

I am working on the Usergroup issue now:)

Satan

Chris M 07-27-2002 09:25 AM

I have updated the hack...It is in the first post...

This attached file is version 1.1 for those of you who never got it...

Satan

Marshalus 07-29-2002 07:47 PM

Great hack!

/me clicks install

Chris M 07-29-2002 07:57 PM

Thanks:)

Satan

Velocd 07-30-2002 03:28 AM

Nice hack Satan
*clicks install*

Night Owl 07-30-2002 05:43 AM

I followed the instructions and got a blank screen when I went to admin2/index.php. What could I have done wrong?

Chris M 07-30-2002 08:47 AM

It could be one of 2 things...

1.) You did not setup the global.php file correctly for the Admin2 directory, therefore not allowing the other files to work (as they require it)...Make sure you followed the instructions carefully:)
2.) Sometimes, and I know this is true, some files dont like being uploaded in Ascii Mode...On my server, I have to upload all vBulletin files in BINARY mode, so that they will work...Make sure you are uploading in the BINARY mode...If you are not sure which mode you are uploading in, try downloading SmartFTP, which has the option for Ascii and Binary modes when uploading...It will be on the top Quick Toolbar, and by default is Auto...Change it to Binary or Ascii, and upload...If that mode does not work, try the other...

Thats all I can suggest thats wrong...If it still does not work, email your new global.php file to me at : hellsatan@darkblazes.com

Satan

Night Owl 07-30-2002 04:17 PM

I am confused. I made the changes in step 6. This file goes into the admin2 folder, right?

Also step 10 says to "edit the /admin/global.php (to full Admin CP version)." What does that mean?

Night Owl 07-30-2002 04:34 PM

OK, I uploaded the edited global.php to the admin2 folder in binary mode. I can now get to the loggin screen. However, when I try to log in, either with my co-admin name or my admin name, I cannot get in. I tried uploading the other files in binary mode, but that didn't help.

Night Owl 07-30-2002 04:56 PM

Nevermind, I figured it out. LOL I didn't have the usergroup set to allow access to the lesser admin cp. LOLOL

However, I am having another problem.

Here is the error:

Quote:

Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: SELECT cancontrolpanel FROM usergroup WHERE usergroupid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064
I was attempting to change the title of an admin, to see if I could do it through the admin2 cp. This also happens when I try to edit any member.

Chris M 07-30-2002 06:20 PM

Ah yes...

I found a bug...

If you using Version 1.2 of the hack, do the following :

Find in /admin2/user.php :

PHP Code:

  // check that not removing last admin
  
$countadmin=$DB_site->query_first("SELECT COUNT(*) AS users FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1 AND user.userid<>$userid");
  
$getperms=$DB_site->query_first("SELECT cancontrolpanel FROM usergroup WHERE usergroupid=$usergroupid");
  if (
$countadmin[users]==and $getperms[cancontrolpanel]!=1) {
    echo 
"<p>You are about to edit the last user with control panel access so that they do not have control panel access. This would lock you out of the control panel, so you cannot proceed.</p></body></html>";
    exit;
  } 

and remove it completely!

Only do it if you are using Version 1.2 - The bug will not occur in Version 1.1, because you can still update usergroups - Anyone who does not want a Security leak, should upgrade to Version 1.2...

Why is there a bug? Im not totally sure, but I think it is because that php statement above, is looking for the updating of Usergroups, and in Version 1.2, the usergroup updating options have been deleted...Therefore it is looking for something it Cannot find...It seems logical enough...I tested it myself at my co-admin panel, and all seems fine...

Reasons why not to do it with Version 1.1? - Well...For starters, you can still update Usergroups...So...If you delete that, and accidentally change your OWN usergroup, then you may be in trouble...

That should solve your problem...I have updated the first post:)

Satan

Night Owl 07-30-2002 06:41 PM

It is working now. But it is allowing lesser admins to change the email and password of admins. Is it supposed to do that?

Chris M 07-30-2002 06:46 PM

Well...

If you had implemented the Total Admin Security Hack, which was included in it, they wouldnt be able to Delete or update you...That way making Admin Passwords impossible to change;)

Satan

Night Owl 07-30-2002 07:11 PM

Well, I did implement that. Not only did I already have it, but I also included protection for each admin. It isn't working.

Night Owl 07-30-2002 07:13 PM

But let me make sure I put it all in the right place....

Well, I thought I'd put it all in there. Now, I've got to figure out where I did put it. :confused:

Chris M 07-30-2002 07:19 PM

Well I can guarantee that it does work...

I know myself - If there was ever a time I was grateful for it, was when someone hacked into The Lyceum, and tried to delete my account 10 times...

Satan

Chris M 07-30-2002 07:20 PM

Hmmm...

Search for :

Code:

if ($userid==X)
Replace X with the Id of a user you protected...

Satan

Night Owl 07-30-2002 07:33 PM

Here is my code:

PHP Code:

// ###################### Start do update #######################
if ($HTTP_POST_VARS['action']=="doupdate") {
if ((
$userid==1) and ($bbuserinfo[userid]!=1)) {  
echo 
"<p>You cannot update this Admin.</p>";
  
cpfooter();
  exit;
}
if ((
$usergroupid==17) and ($bbuserinfo[usergroupid]!=6)) {  
echo 
"<p>You cannot update this Admin.</p>";
  
cpfooter();
  exit;


OK. The can't update is working on me, user 1. So, to make it work on the other admins, do I just take this part of the code:

PHP Code:

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


input the proper id numbers and add it below the existing piece of code?

Thank you for your time. Sorry I am being such a pain. I am feeling the pressure back at my board. :lol

Velocd 07-30-2002 09:22 PM

In this hack Satan you state towards the beginning of the instructions (step 6) to modify global.php. Are you referring to admin2/global.php or the original admin/global.php?

Chris M 07-30-2002 11:28 PM

The /admin2 global.php...

That is to set permissions for the co-admin, or lesser admin or whoever you want to call him/her/it/them...

@Night Owl - yes...

Satan

Hellburn 08-03-2002 11:15 AM

I dont unterstand what for files i must change. The original files or the admin2 files. What is right?:

Step5 = admin/usergroup.php
Step6 = ?/global.php (admin or admin2)
Step7 = admin2/user.php
Step8 = ?/user.php (admin or admin2)
Step9 = ?/index.php (admin or admin2)

thx you

P.S. Where i can see the usergroupid at the cp?

Chris M 08-03-2002 12:52 PM

All the files you must change are in the new /admin2 directory, unless stated otherwise...

I guess I did not state that clearly enough...

For the usergroupid - Goto your Control Panel, and click "Modify" in the "User Groups" subsection...

Hover over the edit button of the usergroup you want, and look at the link in the bottom left of the screen...The last digit, i.e. 6 = Admins, will be your usergroupid...

So it will appear as something like:

Code:

/usergroup.php?action=edit&usergroupid=6
Satan

Hellburn 08-03-2002 01:23 PM

thx

by Step 8 :

// ###################### Start do update #######################
if ($HTTP_POST_VARS['action']=="doupdate") {

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

And add below :

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

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

What id i must change for X ? My Admin id or the admin2 id?

Chris M 08-03-2002 01:29 PM

Your id...

Hmmm...

I think you copied 2 lines, but from different areas...

Lol...

The first part is updating...The second part mentions deleting lol...

Always replace X with your Userid unless stated otherwise...

Satan

Hellburn 08-03-2002 01:35 PM

Quote:

Originally posted by hellsatan
Your id...

Hmmm...

I think you copied 2 lines, but from different areas...

Lol...

The first part is updating...The second part mentions deleting lol...

Satan

i dont know what you want, i make only that what i read.


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.01633 seconds
  • Memory Usage 1,849KB
  • 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_code_printable
  • (8)bbcode_php_printable
  • (4)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