$pagc = $_SERVER["SCRIPT_NAME"];
if ($pagc =='/forum/index.php' || $pagc =='/forum/viewforum.php' || $pagc =='/forum/viewthread.php' || $pagc =='/forum/post.php' || $pagc =='/forum/postedit.php' || $pagc =='/forum/postify.php' || $pagc =='/forum/postnewtread.php' || $pagc =='/forum/postreply.php') { echo "class1"; }
else { echo "class2"; }
if (strpos(TRUE_PHP_SELF, '/forum/') !== FALSE) {
// code here, we are in forum
}
$in_forum = FALSE;
if (strpos(TRUE_PHP_SELF, '/forum/') !== FALSE) {
$in_forum = TRUE;
}
define("IN_FORUM", $in_forum);
if (IN_FORUM) {
echo "We are in Forum";
}
echo (IN_FORUM ? "We are in Forum" : "We are NOT in Forum");
Category Forum
Themes SupportLabels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions