User login

Drupal Development

Marketing of Agaric: In open source free software, code rules

Reviewing patches and contributing bugfixes to Drupal core helps Agaric in three ways:

  1. It helps Drupal, the software we build our websites with, get better.
  2. It helps us become familiar with the code on a deep level, easily.
  3. It is a key thing potential clients who 'get' open source will look for.

This note is just to let Kathryn and Veronica know this sort of direct giving back to the community should be built into our schedules.

Parse syntax error unexpected T_SL caused by Subversion conflict

You caused a conflict in your template.php

so the status on SVN was set to "C"

apparently that means the conflict only exists in that local checkout? Did you edit directly on the server?

Anyway, whatever happened, I do SVN update on my checkout of the repository, look at line 464

as the error message is Parse error: syntax error, unexpected T_SL on line 464

and everything is fine

but if I look at the file directly on the server, even though it is up to date (but giving that C flag)

AND/OR logic error in Userreference Access function

OK, the problem is definitely in this function. I'll get back to it in a little bit, but it may make enough sense for you to correct where an OR isn't doing what I think it should. I'm dyslexic and I swear that's why I can't do a damn thing with ANDs and ORs.

Landing Pages in Drupal

How to do landing pages in Drupal?

Using panels to allow for an infinite number

http://highervisibilitywebsites.com/hyper-dynamic-drupal-sites-part-i

But for Agaric's current needs we need a somehow-different menu on each landing page.

Custom page.tpl.php template files based on path

Cerating "Landing Pages" in Drupal

Copy (or inherit) taxonomy terms from one node to another

function wsf_action_copy_terms($from_nid, $to_nid, $avoid_race = FALSE) {
// agaric-ben @TODO optimize;
// see http://agaricdesign.com/note/copy-taxonomy-terms-from-one-node-another
  if ($avoid_race) {
    // avoid pseudo race condition from taxonomy_node_get_terms static variable

Making a random number

PWGD will need solid and fast randomization to make the jury pools. (With those who have already served pulled out, but that's another detail.)

It's well known that computers aren't good at random.

Does combined random make something more random? Use the number of milliseconds into the current second as the seed to generate a random number and the decimal part of the CPUs exact temperature to act as the seed for generating another random number and the two are used to pick a page from the virtual big book of random numbers and pick a line on that page.

White Screen of Death due to taxonomy parent-child infinite loop

The site stopped showing. Nothing.

What I should have done first:

tail -f /var/log/apache2/error.log

0 stedile:~# apache2ctl restart

0 stedile:~# /etc/init.d/mysql restart

Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . ..
Checking for corrupt, not cleanly closed and upgrade needing tables..

0 stedile:~# xm console stedile
-bash: xm: command not found

Combining one-to-one mysql tables into a single table

Merging tables does not mean what I want it to mean-- it refers to tables with the same schema.

I simply want to join two tables into one on a unique key.

To do that very easily

http://dev.mysql.com/doc/refman/5.0/en/insert-select.html

These are the tables Agaric needs to condense into one:

How to break Drupal's system_settings_form submit handling without trying

UPDATE for Drupal 6: If you provide a submit handler for a drupal_set_form form, you no longer have to add the system handler explicitly too.

The array() silliness at the end is gone, instead #submit itself is a simple, non-associative array.

In Drupal 6, whether the form is handled by the settings page helpful form wrapper or not, all you have to do is tack on another function to call.

Syndicate content