Drupal basic codes


<?php
$GLOBALS['base_path']; // The base path to the Drupal installation. Usually this is just "/" or "/drupal" if you installed Drupal into a sub-directory.
$GLOBALS['base_url']; // The full URL to the Drupal installation (i.e. "http://example.com" or "http://example.com/drupal")
$site_frontpage = variable_get('site_frontpage', 'node'); // The site's configured frontpage path (i.e. "frontpage" or "node/123"), settable at http:// example.com/admin/settings/site-information 
?>
Is the user logged in?
if ($user->uid == 0) {
//user is not logged in
}
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s