Need to detect node or page

Status
This content is read-only, or is not open for further replies.

grantus

Guest
I've been using this code for a long time now and it works great:
Code:

Code:
$fileDir = '/path/to/public_html';

require($fileDir.'/src/XF.php' );
\XF::start($fileDir);

$app = \XF::setupApp('XF\Pub\App');
$app->start();

$visitor = \XF::visitor();

$user_id = $visitor['user_id'];

When I have my own custom page I use this code to fetch the $user_id but is there a way to check if the page itself is a node or a page? Because if it's a node then it fails because of this code:

Code:

$fileDir =...

Read more

Continue reading...

free plugins
minecraft paid for free
free minecraft paid plugins
free minecraft plugins
spigotmc
SpigotMC
aac free
ewg free
Minecraft Premium Plugins
ewg free download
litebans free
epicworldgenerator free
free schematics
leaked schematics minecraft
schematics
schematics leaked
schematics free
minecraft schematics free
paid minecraft schematics free
paid minecraft schematics for free
free cracked plugins
free cracked minecraft plugins
plugins
featherboard download
featherboard plugin download
antiaura download
xenforo leaked
xenforo for free
xenforo addons
 
Liked by:
Status
This content is read-only, or is not open for further replies.

Latest threads

Forum statistics

Threads
67,029
Messages
99,596
Members
64,237
Latest member
Ahmed1
Top Bottom