PDA

View Full Version : THIS_SCRIPT Help in plugin


Elite_360_
11-20-2012, 01:37 AM
need to know how to make a plugin not run in the admincp its a username markup and dont want it to run it there because it show the markup when you try to login the admincp where you enter your User Name

if(THIS_SCRIPT !== 'admincp/index?????'){
my code
}

i know i can do it this way just have to add to many THIS_SCRIPT and would like the code to be short

if(THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'member' OR THIS_SCRIPT == 'calendar' "About ten more THIS_SCRIPT" ){
my code
}

Elite_360_
11-20-2012, 02:03 AM
never mind i figured it out by adding this
define('THIS_SCRIPT', 'admincp');
right below this in the admincp/index.php
// ##################### DEFINE IMPORTANT CONSTANTS #######################
my code now
if(THIS_SCRIPT !== 'admincp'){
MY CODE
}


but if anybody know a way please let me know i really dont want to edit the php files

kh99
11-20-2012, 10:38 AM
You should be able to do this (without adding anything to a file):

if (VB_AREA != 'AdminCP')