Skip to content

Instantly share code, notes, and snippets.

View gormus's full-sized avatar
💭
Never be cruel, never be cowardly.

Osman Gormus gormus

💭
Never be cruel, never be cowardly.
View GitHub Profile
<?php
/**
* Disable access to 'Permissions' page.
*
* Even the role has 'administer permissions' enabled, users will not be able to
* access to 'Permissions' page, but be able to use all other functionality
* this permission grants them. i.e. (de-)assigning roles to selected users.
*/
function hook_menu_alter(&$items) {
global $user;
@gormus
gormus / settings.php
Created September 12, 2010 05:21
Drupal 6 (Pressflow): Disable "first-time" message
<?php
/**
* String overrides:
*
* To override specific strings on your site with or without enabling locale
* module, add an entry to this list. This functionality allows you to change
* a small number of your site's default English language interface strings.
*
@gormus
gormus / template.php
Created September 12, 2010 04:39
Drupal 6 template.php theme_search_theme_form(), theme_search_block_form()
<?php
/**
* Implements theme_search_theme_form()
*/
function p6_search_theme_form($form) {
$form['search_theme_form']['#title'] = t('Search this site');
$form['search_theme_form']['#default_value'] = '';
$form['search_theme_form']['#attributes']['title'] = t('Enter the terms you wish to search for.');
$form['search_theme_form']['#description'] = t('Enter the terms you wish to search for.');
@gormus
gormus / external_links.js
Created September 12, 2010 04:27
Open all the external and PDF links in a new window, with exceptions.