User login

Documentation

Drupal, project, life documentation. This is where notes go to try to earn their way onto Drupal.org.

How to add a stylesheet in Drupal for a module

Attaching a CSS file via your module is so simple it's not really documented, that Agaric could find with these searches:

drupal add style sheets to module
drupal add stylesheet modules
attach CSS

How to add CSS in Drupal 5

This example is from the book module:

    drupal_add_css(drupal_get_path('module', 'book') .'/book.css');

Attaching a CSS file via your module is so simple it's not really documented, that Agaric could find with these searches:

drupal add style sheets to module
drupal add stylesheet modules
attach CSS

How to add CSS in Drupal 5

This example is from the book module:

    drupal_add_css(drupal_get_path('module', 'book') .'/book.css');

So for your module "example_module," with "example_module_extra_style.css" in a folder css within your module directory, the code would look like this:

Ask Agaric: Multiple section setup

A visitor wrote:

A visitor wrote:

SCP file up to server

Upload a file from home computer to remote server using SCP (through bash shell)

Ebony-697:~/Desktop/BrowserTemp ben$ scp -r module.tar.gz ben@server.example.org:/var/www/html/drupal-4.7.2/modules

IP address can also be used.

uploading to server

Upload a file from home computer to remote server using SCP (through bash shell)

Ebony-697:~/Desktop/BrowserTemp ben$ scp -r module.tar.gz ben@server.example.org:/var/www/html/drupal-4.7.2/modules

IP address can also be used.

uploading to server

Finding missing person Images Directory when her own CMS says she doesn't exist

(Or: Cracking the case of the recalcitrant images directory)

The client came to me, late at night, distraught, and with numerous PNGs of the crime. He filled up my inbox with desperate messages, and the files attached at the bottom of this post:

  • why???
  • seriously! what the hell is going on here?? the site doesn't seem to be in touch with the server at all!?
  • seriously why? disabled and reenabled the modules, deleted the images folder and remade it

    argh!

(Or: Cracking the case of the recalcitrant images directory)

The client came to me, late at night, distraught, and with numerous PNGs of the crime. He filled up my inbox with desperate messages, and the files attached at the bottom of this post:

  • why???
  • seriously! what the hell is going on here?? the site doesn't seem to be in touch with the server at all!?
  • seriously why? disabled and reenabled the modules, deleted the images folder and remade it

    argh!

Editing other users' custom block content in Drupal 4.7?

In Drupal 4.7, it seems the original creator of a custom block is the only one who can edit its content.

At least, the permissions options under block don't give access to the title and content– just the visibility settings.

In Drupal 4.7, it seems the original creator of a custom block is the only one who can edit its content.

At least, the permissions options under block don't give access to the title and content– just the visibility settings.

Problems with IE5 and the Zen theme

Zen-based themes break rather badly (lose the navigation menu) in Microsoft Internet Explorer 5.00 and, if you look up what's wrong, have the following inscrutable error:

"Object doesn't support this property or method"

I hope this patch fixes it and is in Drupal 5.2.
http://drupal.org/node/110758

Zen-based themes break rather badly (lose the navigation menu) in Microsoft Internet Explorer 5.00 and, if you look up what's wrong, have the following inscrutable error:

"Object doesn't support this property or method"

I hope this patch fixes it and is in Drupal 5.2.
http://drupal.org/node/110758

Dumping the MySQL structure for only certain tables

NOTE: These notes are in the process of being turned into a script that will work for shared-table multisite installations as well as regular Drupal sites.

mysql structure only certain tables

http://www.datanamic.com/support/mysqldump.html

mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]

-no-data, -d

NOTE: These notes are in the process of being turned into a script that will work for shared-table multisite installations as well as regular Drupal sites.

mysql structure only certain tables

http://www.datanamic.com/support/mysqldump.html

mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]

-no-data, -d

Do not write any table row information (that is, do not dump table contents). This is very useful if you want to dump only the CREATE TABLE statement for the table.

Stop Drupal from shortening long usernames

drupal shortening long usernames

http://lists.drupal.org/pipermail/support/2007-June/005042.html

If you wanted to override this, you could define a new function in

drupal shortening long usernames

http://lists.drupal.org/pipermail/support/2007-June/005042.html

If you wanted to override this, you could define a new function in

the template.php file of your theme. To do this, simply copy the of
the existing function from <http://api.drupal.org/api/5/function/
theme_username> and rename it to your-theme's-name_username. Then
depending on what you want to do, you could simply comment out the line

$name = drupal_substr($object->name, 0, 15) .'...';

or change the value (15) to something long enough to allow the user's

Google Apps integration with Drupal

google apps drupal integration

What's out there:

Anyone interested in helping write a "Google Apps Integration Module"?
http://drupal.org/node/108906

Google Apps for Education
http://groups.drupal.org/node/2958
- that page is just idle speculation as of 2007 July.

google apps drupal integration

What's out there:

Anyone interested in helping write a "Google Apps Integration Module"?
http://drupal.org/node/108906

Google Apps for Education
http://groups.drupal.org/node/2958
- that page is just idle speculation as of 2007 July.

Google Summer-of-code project (not even one of Drupal's 20) to integrate Drupal with the Google Apps API:
http://www.techsanctuary.com/drupal-google-apps-integration

Some thoughts from Boris Mann of Bryght:
http://bryght.com/blog/boris-mann/google-apps-now-extensible-open-source-connections

Sending pictures by e-mail to a Drupal site

Dan successfully did this with the mailhandler and mailsave modules.

He'll have to post how. Here's some utterly irrelevant and useless background:

Images with mailhandler... back in 2003!
http://drupal.org/node/2702

I successfully implemented imagehandler.module for Drupal 4.0. Since mailhandler and image module has changed a lot since, you probably need retune the function. It currently supports only JPG.

Dan successfully did this with the mailhandler and mailsave modules.

He'll have to post how. Here's some utterly irrelevant and useless background:

Images with mailhandler... back in 2003!
http://drupal.org/node/2702

<

blockquote>
I successfully implemented imagehandler.module for Drupal 4.0. Since mailhandler and image module has changed a lot since, you probably need retune the function. It currently supports only JPG.

function imagehandler_mailhandler($node, $stream, $msg_number, $mailbox) {
$image = mailhandler_get_part($stream, $msg_number, "IMAGE/JPEG");

Syndicate content