User login

How to

Information on how to do something... anything.

Change the default application for editing files in Mac OS X

Select a file of the type you want to set a new default application for opening.
Press Command i or select Get Info from the File menu.
Under "Open with" select the application and press Change All.

Resolution

Highlight search words in Drupal autocomplete results

We've done this for SCF in the biblioreference module. Not the cleanest or most universal, but our autocomplete was messy and it's easy to make your own autocomplete function.

Here's the code and a lot of it surrounding it. The biblioreference_match_nodes function immediately below calls the biblioreference_autocomplete_highlight several times, each time before putting any HTML spans around the text, so we don't insert strong highlighting tags into our own markup.

Printing an arbitrary menu just like primary_links and secondary_links

You can find out your menu name by going to admin/build/menu and hovering over it-- the name is a text string, separating the words in the menu title with dashes, and all lower case.

In your template.php

<?php
function agarictheme_preprocess_page(&$vars) {
  $menu = menu_navigation_links("menu-name-here");
  $vars['special_menu_name'] = theme('links', $menu);
}
?>

In page.tpl.php (or page-front.tpl.php or other variation)

How does a Drupal module show...? Biblio listing

Situation is that we want autocomplete for referenced bibliography nodes to show authors, journal title, and year as well as article (node) title.

  1. Look at the module's implementation of hook_menu().

    If what you are looking is visible on your Drupal site, it is probably at a specific path. That means it is put there by the menu system, and Drupal modules can define their own menu items by implementing hook_menu.

Taking it to that level with cufon

So you've got yourself a solid drupal theme, and now you're sitting back looking at your work and thinking that it's good, but it could still be taken to that level.

Well, replacing some titles, basically some h1s and h2s with custom rendered fonts is one way to get it there, and using cufon is the answer. Sure, you could use the Dynamic Rendering module and sifr and do pretty much the same thing, but c'mon, cufon just sounds cooler than sifr... and it'll only take you about ten minutes to do this

and we all know quick and easy is the answer...

Getting Views as Data with Drupal 6 Views 2

Is there a standard way to get views as data? (to count the rows and such) or is it expected that this will be done in the preprocess functions, and views methods always return themed output?

Kathleen worked around this by making changes directly in the theme's views-view.tpl.php.

Alternatively,

<?php
function pdtheme_preprocess_views_view__contributions(&$variables) { //...
?>

should let you see the variables. see if $rows exist, and in theory decide how to output from there.

Close tags in a Drupal so they don't break your site

http://drupal.org/project/htmltidy

The http://drupal.org/project/htmlcorrector module made it into Drupal core. It should handle most issues involving closing tags.

Seeing what HTMLTidy gains, it should capture everything.

Current status: HTML Tidy not ready for Drupal 6.

Resolution

Open File Browser from Terminal Window in Ubuntu

nautilus foldername

or for the current folder:

nautilus .

To go the other way, File browser to terminal, you need to install:

sudo apt-get install nautilus-open-terminal

Resolution

Making sure multiple numeric ID input can be allowed in the most flexible way possible

Agaric knows that the best usability would never have people entering numeric IDs into a text field in the first place, but pending fancy remote search and completion techniques, we can at least take a set of numbers without rejecting them for using semicolons instead of commas.

Syndicate content