User login

Complete

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

Agaric Utility function: set default values in an array

the original line is almost as short as the function, but if we want to add checking on "empty()" or need to change anything else, it's all in one place

How to change your mysql root password using command line

So you wanna change your root password for mysql, huh?

Follow these instructions and know in your heart that you did it, the Agaric Way....

Resolution

MySQL stores username and passwords in user table inside MySQL database.

You can directly update password using the following method to update or change password for user root:

1) Login to mysql server, type following command at shell prompt:

$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

Set a module weight using its .install file

in placement.install

<?php
function placement_install() {
  db_query("UPDATE {system} SET weight = 10 WHERE name = 'placement'");
}
?>

The query is the same in both MySQL and PostgreSQL so for these databases (which are what Drupal core supports) this does not need to be placed in a switch statement.

Resolution

Print a form, such as a search form, anywhere in Drupal

Resolved error:

Missing argument 1 for search_box(), called in /sites/example/www/includes/common.inc(1352) : eval()'d code on line 5 and defined in /sites/example/www/modules/search/search.module on line 1037.

This was from code added to a page's content by a client or possibly even the previous developer. We completely redid the site but did copy-paste in some pages.

Using CVS for developing modules

We can commit to Drupal.org CVS and use it just like we use subversion to manage our sites. No more trying to develop a module in subversion and contribute changes to CVS, just do everything in CVS. It's not that much worse than SVN.

Don't believe me? Watch:

Get Linux running on your Linksys Router

Recently my router was giving me some problems, the worst type, dropped signal!

After hours of searching around in forums and such, I concluded that it must (hopefully) have something to do with Linksys's generally bad router software, you know, the page you goto to make all your settings and stuff... usually found at 192.168.1.1

Creating a random password... the Drupal way

Lesson of the day: don't reinvent Drupal functions.

Making a quick random number

Not truly random in some cosmic computer science sense, but good enough for non-mission critical (or rather, nothing for anyone to exploit the not-complete-randomness) uses.

http://www.php-scripts.com/php_diary/122799.php3

<?php
srand(time());
$random = (rand()%9);
?>

Resolution

Automatically making connections

Just a quick post to note that the Facebook functionality where when you type in a URL it instantly finds if there's a Facebook group with that web site is pretty cool.

It puts a little too much information about the group right embedded in your post, but still a very cool connection-maker (or re-enforcer).

Resolution

Semantic functionality provider OpenCalais redoes their site in Drupal

I think every connection between Drupal and people (and the occasional knight) who are trying to finally get the semantic web built is a good thing.

So I was happy to see where the link went in this e-mail from Calais today:

Syndicate content