This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($path)) { | |
$nodepath = $_GET['q']; | |
} | |
if ($nodepath == 'contact') { | |
$title = 'Get In Touch'; | |
} | |
if ($nodepath == 'blog') { | |
$title = 'Design & Development Portfolio'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_user_login(). | |
*/ | |
function mymodule_user_login(&$edit, $account) { | |
$current_path = drupal_get_path_alias($_GET['q']); | |
// If the user is logging in from the 'example' page, redirect to front. | |
if ($current_path == 'example') { | |
$_GET['destination'] = '<front>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $user; | |
if($user->roles[3] || $user->roles[4]){ | |
//dont track admins or moderators | |
} | |
if($user->roles[0] || $user->roles[1] || $user->roles[DRUPAL_ANONYMOUS_RID] || user_is_anonymous()){ | |
//track anonymous or regular users | |
} // endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://ftp.drupal.org/files/projects/drupal- <VERSION NUMBER> .tar.gz | |
tar -xzvpf drupal- <VERSION NUMBER> .tar.gz | |
cd drupal- <VERSION NUMBER> | |
mv *.* ../ | |
cp -r includes misc modules profiles scripts themes ../ | |
cd .. | |
rm -rf drupal- <VERSION NUMBER> | |
rm -rf drupal- <VERSION NUMBER> .tar.gz |
NewerOlder