User login

How to

Information on how to do something... anything.

Using Ubiquity to post notes to Drupal

Good instructions for a particular method here:
http://www.schoonzie.com/using-the-ubiquity-firefox-extension-to-create-drupal-nodes

Followed but not currently using because of after installing the command by phoque command Ubiquity threw (apparently harmless) errors, and the process for modifying blog URLs was not clear (as in, even just listing the ones you've entered).

Use hook_theme for new theming functions and templates; use hook_theme_registry_alter to take over existing ones

Everyone else has figured this out by now, but loudly proclaiming ignorance (as soon as I know I am ignorant) is a proud U.S. of A. tradition (albeit ordinarily done with less self-awareness).

Apologies if you had to click to read this, because the whole insight is in the page title: Use hook_theme for new theming functions and templates; use hook_theme_registry_alter to take over existing ones.

Agaric will demonstrate this with a negative example and a positive example.

How to reset the theme registry

Update for D7:

drupal_flush_all_caches();

drupal_flush_all_caches() should work for just about anything. registry_rebuild() alone did not work in my tests.

Drupal 6

The Drupal function to reset the theme registry is drupal_rebuild_theme_registry (D6).

You can add it to your template.php while developing:

Keep .DS_Store files out of your Git projects when developing on a Mac

Following Alex Miller's note on git ignore files I added this to my .gitconfig file in my home directory:

[core]
excludesfile = ".gitexcludes"

And created also in my home directory the file .gitexcludes with this in it:

.DS_Store

Not sure yet if that relative path approach will work, or if I'll have to specify /home/ben/.gitexcludes...

Resolution

CVS commands for branching a Drupal 5 module to Drupal 6

following add1sun's page: http://drupal.org/node/315987

Ebony-II:~ ben$ cd /RCS/
Ebony-II:RCS ben$ mkdir projects
Ebony-II:RCS ben$ cd projects/
Ebony-II:projects ben$ export CVSROOT=:pserver:agaric@cvs.drupal.org:/cvs/drupal-contrib
Ebony-II:projects ben$ cvs login


Logging in to :pserver:agaric@cvs.drupal.org:2401/cvs/drupal-contrib
CVS password:

Calculate the sum of an entire result set of values with a single SQL query

As tested in phpMyAdmin:

SELECT SUM( `value` )
FROM `dru_ec_product_zing_auction` AS za
LEFT JOIN `dru_node` AS n ON za.nid = n.nid
WHERE STATUS > 0;

Drupalized:
SELECT SUM(value) FROM {ec_product_zing_auction} AS za LEFT JOIN {node} AS n ON za.nid = n.nid WHERE status > 0

As actually used in a Drupal module, zing_auction:

How to CVS checkout best release of all modules of a given Drupal version [unresolved]

Adapted from my comments at mroswell's question about downloading all Drupal 5 modules with CVS on the Drupal Groups site. (The person who would know if anyone would, dww, says there's not a solution yet.)

Command to check out all contributed modules with a given branch tag. The name of the directory you want to check out into follows the "-d" and can be any name you want. I gave it such an odd name (alld5modules) to try to emphasize that fact :-P

Theming Drupal's user login block with CSS

http://api.drupal.org/api/function/user_login_block/6

Really, what is wanted is CSS

Here's a sample:

  #block-user-0 .form-item /* "User login form" block */
  {
    margin-top: .5em;
    margin-bottom: .5em;
  }

Find other domains sharing the same IP address

When taking over a site it's always good to check for any domain names the client might have forgotten about. Although shared hosting (or managing multiple clients on a dedicated server as Agaric does) will show all the domains pointing to a single IP address, it's still a useful way to look through and see which may be related, and should follow the site to its new home.

A number of services will do this for you. A good free one is:
http://www.myipneighbors.com/

Resolution

Syndicate content