Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

shantanu oak http://oksoft.blogspot.com

« Newer Snippets
Older Snippets »
Showing 1-6 of 6 total  RSS 

Remove primary links

// remove primary links
// in the module - page.tpl.php 
// comment the three lines as shown...
<!-- Navigation Level 1 -->
<?php #if (isset($primary_links)) : ?>
<?php #print theme('links', $primary_links, array('class' => 'nav1')) ?>
<?php #endif; ?> 1

Change the word username in the form


// user.module -  function user_login_block() change username and password words

// form.inc - function theme_form_element($element, $value)  t('!title:132

login destination

// description of your code here

// login destination module enabled
  global $user; $myid = $user->uid;
return ($user->uid == 1) ? 'admin/'.$myid : 'user/'.$myid.'/edit/Address' ;

Remove the | sign in the title

// Remove the | sign in the title
// phptemplate.engine line 189 change it to :

$head_title = array(strip_tags(drupal_get_title())); 

Remove the "request new password" link

// Remove the "request new password" link

// user.module 
// Just comment (or remove) the following line in user_login_block function:
// $items[] = l(t('Request new password'), 'user/password', array('title' => t('Request new password via e-mail.')));

Disable RSS logo in Drupal

// To disable RSS logos both in the address bar and on pages in Drupal 5.1 :

// Edit theme.inc to disable feed icons

function theme_feed_icon($url) {
//  if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), t('Syndicate content'))) {
//    return '<a href="'. check_url($url) .'" class="feed-icon">'. $image. '</a>';
//  }
}

// AND also edit common.inc

function drupal_add_feed($url = NULL, $title = '') {
  static $stored_feed_links = array();

/*  if (!is_null($url)) {
    $stored_feed_links[$url] = theme('feed_icon', $url);

    drupal_add_link(array('rel' => 'alternate',
                          'type' => 'application/rss+xml',
                          'title' => $title,
                          'href' => $url));
  }*/
  return $stored_feed_links;
}



« Newer Snippets
Older Snippets »
Showing 1-6 of 6 total  RSS