View Full Version : Remove View PHP Info from adminCP
Mr. HillBilly
01-13-2004, 10:00 PM
In adminCP/index.php find and remove
(Both instances)
construct_nav_option($vbphrase['view_php_info'], 'index.php?do=phpinfo');
Find and Remove (Still in adminCP/index.php)
// ################################ SHOW PHP INFO #############################
if ($_REQUEST['do'] == 'phpinfo')
{
phpinfo();
exit;
}
Save and upload.
Please click install if you use this little hack. Thanks!
magnus
01-13-2004, 10:42 PM
Or you could just add a conditional which allows only you to see it..
<if condition="$bbuserinfo[userid] == 1">
<!-- HTML -->
</if>
.. off course, it's weird you'll trust a person with the ability to use every administrative aspect of your board, but don't deem them trustworthy enough to see what PHP options your server is compiled with (which really is no secret, anyway).
Zachery
01-13-2004, 10:55 PM
Or you could just add a conditional which allows only you to see it..
<if condition="$bbuserinfo[userid] == 1">
<!-- HTML -->
</if>
.. off course, it's weird you'll trust a person with the ability to use every administrative aspect of your board, but don't deem them trustworthy enough to see what PHP options your server is compiled with (which really is no secret, anyway).
i dont think that will work in vB's php pages as if conditions get parsed by the template manager :)
Mr. HillBilly
01-13-2004, 11:23 PM
Or you could just add a conditional which allows only you to see it..
<if condition="$bbuserinfo[userid] == 1">
<!-- HTML -->
</if>
.. off course, it's weird you'll trust a person with the ability to use every administrative aspect of your board, but don't deem them trustworthy enough to see what PHP options your server is compiled with (which really is no secret, anyway).
Funny how when I try to contribute people always give me crap.
magnus
01-13-2004, 11:27 PM
i dont think that will work in vB's php pages as if conditions get parsed by the template manager :)
Good point, so, insted use:
if ($bbuserinfo['userid'] == "1")
{
<!-- PHP -->
}
:)
Zachery
01-13-2004, 11:28 PM
Funny how when I try to contribute people always give me crap.
i dont think its bad :) personally i dont care but i dont have a dedicated server
Nice work :)
magnus
01-13-2004, 11:31 PM
Funny how when I try to contribute people always give me crap.
Hrm, I don't really see how my above statements constituted "giving you crap". I was merely offering a solution which didn't remove a default vB3 ability from the main Administrator in order to limit others.
I apologize if it was construed that way, however, if you're going to release something you need to be open to creative critisism. I offered a less-destructive alternative to your idea. Nowhere did I say anything derogatory about your idea or it's concept, I simply inquired as to why you would need this.
Mr. HillBilly
01-14-2004, 01:26 AM
why you would need this.
Why dont you go bug someone elses hack thread?
BillaBongUSA
01-14-2004, 01:50 AM
Hey, come on, it's not like he just blatantly insulted your work. Maybe instead of being so edgy about it, you could explain why this hack might be useful to someone.
Boofo
01-14-2004, 03:02 AM
Isn't that also a setting you can turn off in the board settings? ;)
Wayne Luke
01-14-2004, 04:09 AM
Isn't that also a setting you can turn off in the board settings? ;)
No, that setting makes it publicly viewable. However, you can control this with Administrator permissions so you don't need an IF statement or to remove it unless there is some other reason behind the original author's thinking.
Boofo
01-14-2004, 04:47 AM
No, that setting makes it publicly viewable. However, you can control this with Administrator permissions so you don't need an IF statement or to remove it unless there is some other reason behind the original author's thinking.
Oh, ok, I see. But I'm curious now. What permission would you set so other Admins can't view it (if that is what you meant)?
magnus
01-14-2004, 09:36 AM
Oh, ok, I see. But I'm curious now. What permission would you set so other Admins can't view it (if that is what you meant)?
In your AdminCP under Usergroups, select Administrator Permissions. Then, set Can Run Maintenance Tools to No (see attached screenshot). However, this will also prevent the selected Administrator from doing: Database Backup, Repair/Optimize Tables, Update Counters, Diagnostics and Execute SQL Query as well. You can use the provided if statement above to selectively restrict access if you so desire.
Why dont you go bug someone elses hack thread?
Wow, nice attitude.. you're going to go far here.
Please forgive me for my previous posts in your thread, I assure you, it will never happen again.
Thank you for your contribution, and keep up the great work!
SpeedStreet
01-14-2004, 09:39 PM
OK, since Magnus has been chased off, I have to ask:
How exactly is this useful?
This isn't really a code modification. Its a code deletion. It doesn't add any new functionality to the site, so it *seems* that this is just a code "modification" for the sake of creating a hack.
KuraFire
01-15-2004, 01:57 PM
<snip> so it *seems* that this is just a code "modification" for the sake of creating a hack.
Spot on. All I can derive from Hillbilly's posts is that he's trying to get a hack on his name, no matter how unnecessary, and gets pissed when someone points that out to him.
This really should be moved out of the Code Mods for vB3 category. And maybe placed in a new section "Guide for new hackers: what NOT to do" ;)
Rusche
01-15-2004, 03:28 PM
Spot on. All I can derive from Hillbilly's posts is that he's trying to get a hack on his name, no matter how unnecessary, and gets pissed when someone points that out to him.
This really should be moved out of the Code Mods for vB3 category. And maybe placed in a new section "Guide for new hackers: what NOT to do" ;)
Well at least his hack is here, I released a hack a week ago and it was removed without any notice or anything
NTLDR
01-15-2004, 03:42 PM
There is a difference bettween Template Mods and Hacks. Technically this is a hack as it changes code, yours was a template mod which doesn't belong here.
How about we keep this on topic now?
KuraFire
01-15-2004, 06:22 PM
There is a difference bettween Template Mods and Hacks. Technically this is a hack as it changes code, yours was a template mod which doesn't belong here.
How about we keep this on topic now?
Yes, let us indeed keep this on topic. The topic of how much this 'hack' is unnecessary and can be done without file modifications and thus should be removed from this particular category.
SpeedStreet
01-15-2004, 07:12 PM
Yes, let us indeed keep this on topic. The topic of how much this 'hack' is unnecessary and can be done without file modifications and thus should be removed from this particular category.
Agreed.
This type of hack should be moderated save you will see an influx of coders that will remove an option from the AdminCP just to become Adv. Coders.
KuraFire
01-15-2004, 09:29 PM
Agreed.
This type of hack should be moderated save you will see an influx of coders that will remove an option from the AdminCP just to become Adv. Coders.
Well, it won't make them Advanced Coders. It's highly unlikely that a lot of people will install these sort of hacks, and you need a very high People Installed vs. Amount of Hacks Released ratio before you'll become Adv. Coder. :)
So the new titles by Stefan have some good effects, but I don't think that that's what people like Hillbilly are after. Having a few very good hacks doesn't necessarily get you as much 'fame' as having a ton of hacks that do little more than just work.
g-force2k2
01-15-2004, 09:48 PM
SpeedStreet and KuraFire I don't particularily care for your attitudes. He found it useful and made it so fine, you don't like then don't use it that simple.
Well, it won't make them Advanced Coders. It's highly unlikely that a lot of people will install these sort of hacks
To be quite honest my first hack was pathetic, everyone has to start somewhere and showing no respect to fellow hackers does nothing. Just some of my views.
Regards,
g-force2k2
Boofo
01-15-2004, 09:51 PM
And maybe he didn't realize there was a better or easier way to do this. It's his first attempt. We need to give him the break that we all got when we started out. ;)
KuraFire
01-16-2004, 07:56 AM
Aight, I apologize for my attitude. But that doesn't take away from the fact that in retrospect this should still go elsewhere :)
SpeedStreet
01-16-2004, 07:21 PM
I think its great you are all giving this the benefit of the doubt, but looking at this logically, there is no discernable benefit to said hack. There are a great many hacks out there that I choose not to use because they could not or would not benefit me, but a hack to remove a link from the AdminCP that already has the option to remove it provides no benefit whatsoever to the modding community.
That being said, I wholeheartedly encourage everyone to produce any and all hacks great and small. But like Kurafire,I don't believe that our hack database should be needlessly cluttered up with hacks that are hacks for hacks sake.
While even my original hack or two that I have provided has been somewhat lame, I still think that a measure of integrity must be maintained within our repository.
Anyhow, that's my two cents and I'm done with it.
duncan99
01-26-2004, 02:50 PM
I think the basic principle as the forum title said" Code modification", it is a hack no matter how it becomes better or worser, useful or useless. Let the users make a choice.
I would appreciate his work even I don't use it this time, maybe I will use it other time.
KuraFire
01-26-2004, 02:58 PM
I think the basic principle as the forum title said" Code modification", it is a hack no matter how it becomes better or worser, useful or useless. Let the users make a choice.
I would appreciate his work even I don't use it this time, maybe I will use it other time.
I would appreciate his work id it didn't `pollute` our vB3 Hacks database. That's my concern, and I think it should be the concern of most of us.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.