View Full Version : Is there if not conditional for entire admincp folder? or for all files in admincp
basketmen
09-23-2010, 11:39 AM
i know if not conditional for a script :
if (THIS_SCRIPT != 'scriptname') {
stuff
}
but what is if not conditional for all files in admincp folder? i want to wrap some code so not used by files in admincp
Guest190829
09-24-2010, 11:02 PM
I believe there is a constant VB_AREA that may be defined for all admin CP files...I don't have access to the code right now, so can't give you any more information at the moment.
basketmen
09-24-2010, 11:14 PM
in admincp/global.php there is this line define('VB_AREA', 'AdminCP');
so the conditional writed like this? :
if (VB_AREA != 'AdminCP') {
stuff
}
Guest190829
09-24-2010, 11:51 PM
Yes, AFAIK, that should work. :)
basketmen
09-25-2010, 12:07 AM
Yes, AFAIK, that should work. :)
i already try it, its not working, i open a file in admincp/thefile.php its still including the code in stuff
hmm wonder where is still wrong
is it the conditional included all files in admincp?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.