User login

Library Catalog

Overriding a string the second-simplest way in Drupal 7

Here's the situation: You don't need administrator-customizable strings like the String Overrides modules provide, but you'd like the changes in a more share-able (or consistently version controlled) place than settings.php, which details an easy $conf way of doing string overrides.

Well, here's how to do it with a variable set function that can go in a module's install or update hook:

move user search tab from search/user to admin/people/search

Agaric decided to make a contributed module to do this: http://drupal.org/project/usersearchtoadmin

See that project page. The below is mostly notes on wrong turns!

It would be nice if this just used a different permission other than a person's ability to access profiles:

Define and Use a JQuery Plugin as a Helper Function for Drupal JavaScript

Here's the basics of defining and using a JQuery plugin within the context of Drupal.

This is definitely not the best and highest use of a plugin, and may in fact be a downright abomination-- this isn't a plugin that really works outside the context of the code it is written for, and certainly not outside Drupal. But it was a clean way to abstract out 42 lines of code, so here it is, for the enjoyment of all.

The first part here is simply how to call JQuery from Drupal, the second part is the plugin.

How to fetch a file at a URL and set it as the default image in an image field

There's two separate cool things here that you might want to do. One, simply know how to save a file from a URL (there's a secret Drupal function for that in system module) and two, how to give an image field a default image when creating it programmatically (that part is outsourced to the fieldhelp module).

Syndicate content