User login

How to

Information on how to do something... anything.

How to theme a Drupal form

Update: This tutorial has been revised significantly to provide a robust solution consistently works.

Define a function named your_theme_name_ or phptemplate_ plus name_of_form($form).

Installing SquirrelMail

cd /usr/local/src/
sudo install -d /usr/local/src/downloads
cd downloads/
sudo wget http://squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fprdownloads.sourceforge.net%2Fsquirrelmail%2Fsquirrelma...

Multiselect forms with Drupal 5's FAPI

I always have to look this up, so here it is. Two examples for the price of one. Oh, and a link to the official Drupal 5 form documentation.

White screen of death on MAMP: increasing memory limit in php.ini

In MAMP, php.ini for PHP5 often needs to be edited because it is set to only 8MB by default, leading to white screen of death. It is found here (using Terminal or iTerm):

vi /Applications/MAMP/conf/php5/php.ini

And in Vi you can search for memory limit by typing /memory, and i to start editing text.

You can then go to the MAMP application and stop servers and start them again.

(Posted as comment to handbook here.)

Git the Agaric Way: using shell scripts to add and update projects

Update: Forget it. Complication outweighs benefits.

Note: Before you start doing any of this, you would need to copy Agaric's git directory structure-- note that this is not a single git repository, but many git repositories. More on that elsewhere, this is about using the system properly set up.

What finally works:

Navigate to the pseudo-repository's sites directory:

cd /RCS/git/agaric-sites/
Ebony-II:agaric-sites ben$ git-new-site.sh 5 test

Use just the body field in the view of a CCK node

This requires theming the view. Views does not know about or provide just the raw body, so you have to theme the view, load the node, and grab the body field.

In your view-....tpl.php:

<?php
 
$fullnode = node_load($node->nid);
print check_markup($fullnode->body, $fullnode->format, FALSE);
?>

THIS HAS SIGNIFICANT PERFORMANCE IMPLICATION FOR MANY NODES WITH MANY FIELDS

Display a Drupal login form anywhere with PHP, including in page content

Update: I gave slightly incorrect code, I'm pretty sure swapping out 'user_register' to put in 'user_login' will work just fine:

dan hak 3:08
whats the code for the login block

benjamin melançon 3:09

Using the BlipTV flash video player for Blip.TV videos

Drupal and BlipTV: Using RSS and Xpath anything that works to get the Blip.TV Player

$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;

<?php
 $foo = system('wget http://www.myserver.com/file.txt ~',$output);
?>

This is what I really want:

Syndicate content