User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Hate the latest iTunes, switching to Songbird

After a long delay because my poor abused MacBook didn't get restarted for a few months, Mac OS X managed to update iTunes. And the new version, 8, is terrible. There are ugly little arrows everywhere that just send you to the iTunes store for songs you already have.

I don't need a whole separate box to tell me what's playing that hides a third of my playlists. And I certainly don't need an entire idiot sidebar that needs an account at Apple's iTunes store to show it's genius.

Bringing Linked Data to Drupal; bringing the Semantic Web to the World

Based on my comment to <http://buytaert.net/drupal-the-semantic-web-and-search">Dries Buyteart's Drupal, the semantic web and search, which ended with "I can has semweb in Drupal core?"

Yes, we can!

First, congratulations for having it in drop. Now the world is catching up, it is time to put RDF back in Drupal core.

Drupal function to give path to files directory

All Agaric wanted was the Drupal function to give the path to files directory (which Drupal core itself should probably use instead of embedding the full filepath in the files database), and finding it was soooooo much harder to find than it should have been.

The Drupal function which we suppose we ought to use is file_create_url().

See http://api.drupal.org/api/function/file_create_url/5

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:

Upgrading Enabled Modules from Drupal 5 to Drupal 6

Reference

Converting 5.x modules to 6.x
http://drupal.org/node/114774

Upgrading your menu system from 5.x to 6.x
http://drupal.org/node/103114

Changes specific to the Enabled Modules module

Description replaced with a serialized info column in system table.

Not dead yet: Overcoming fatal errors converting a theme with some override functions in template.php

Upgrading a theme from Drupal 5 to Drupal 6, Agaric ran across this lovely fatal error:

Fatal error: Call to undefined function menu_item_link() in /sites/example/www/sites/default/themes/agaric_custom_theme/template.php on line 15

And indeed, menu_item_link ends with Drupal 5: http://api.drupal.org/api/function/menu_item_link/5

Site layout destroyed by weird invisible character in stylesheet

what just happened? some scary bad invisible character(s) got in the css file

I think by using Digital Color Meter

And caused all the CSS rules after that character not to work!

Resolution

Another reason user module needs to be rewritten... or maybe this is just a file handling issue

I'm blaming user module even though I know intimately that I shouldn't: a 2 hour estimate to add user picture upload to the client's custom registration form has become a journey through HTML form and PHP file handling hell because even Drupal core doesn't let you upload a user picture when uploading. Finally just put it on the second page of the client's two screen login process.

Wrote a module almost just like http://drupal.org/project/reg_with_pic

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:

Automatically putting a user's post into an organic group

The final result is in the (as yet unreleased, but if you want the code we'll send it) special treatment module.

Some test ouput and discovery of key function along the way:

Syndicate content