me-licio-us

Like del.icio.us but I'd rather have it on my own website, thank you very much.

wanderlusting

Wanderlusting travel journals

So, some friends of ours have created a travel journal - Wanderlusting - as a way to share all our stories with the world. Fun stuff.

remove "not verified" from comments

Note: this is a really bad way to do this - see the comments for the right way.

I disagree on this point, but a friend asked and other folks have previously been confused so I removed the "not verified" label from a site and I was confused on where to do it. A little bit of grepping and I found it's in common.inc:

@@ -898,7 +899,8 @@
$output = $object->name;
}

- $output .= ' ('. t('not verified') .')';
+ //burrell says "no 'not verified' on the comments"
+ //$output .= ' ('. t('not verified') .')';

Satan Built my Roadie

While many motorheads like to talk about how Jesus Built their hotrod apparently Satan has joined the bike building industry.

The penta-bike

It's a pentagram bike or pentacycle or pentagram bicycle or something like that. OK, it's all those things!

Remove Table of Contents from Drupal Book

Continuing on from the project I just mentioned...I wanted to remove the list of pages (which is analogous to a table of contents) from the book pages. On this particular site I'm using the book block on the right hand side, so having this information on the bottom of top level page makes for duplication of links and just seems plain funny. Below is the relevant diff -u on the subject:

Edit: This is actually a really bad idea. See the comments below for the right way to do it for Drupal 6.

@@ -469,9 +469,9 @@
   if ($node->nid) {
     $output .= '
'; - /*if ($tree = book_tree($node->nid)) { + if ($tree = book_tree($node->nid)) { $output .= '
'. $tree .'
'; - }*/ + } if ($prev = book_prev($node)) { $links .= '

Dates in Drupal

So, I'm converting a site from a current static HTML version to a drupalized version and in the process we are taking comments that were created over email from a "contact me mailto:" email on the old site and putting them into forum discussions on the new site. Most of the discussions were "receive email, send response" variety, so it's just a node and a comment.

In order to give a feel of the time of the original email and the response, we used the node administration facility of setting the time when creating the nodes. That works great, but when you enter comments you don't have the same control over the time. So, we calculated the average response time in the emails and decided to set comments to be that far in the future after their node. The first curious thing to me was figuring out what dates in Drupal are based on - turns out it's the Unix Timestamp which is fairly common.

So, armed with the knowledge that the average comment lag was 183807 seconds, I ran the following sets of queries to get the desired offset:

mysql> create table gjk_junk as SELECT n.nid, created +183600 as new_time FROM node n inner join comments c on n.nid = c.nid;
Query OK, 19 rows affected (0.96 sec)
Records: 19 Duplicates: 0 Warnings: 0

mysql> create table comment_bak as select * from comments;
Query OK, 19 rows affected (1.61 sec)
Records: 19 Duplicates: 0 Warnings: 0

mysql> update comments c, gjk_junk g set timestamp = new_time where c.nid = g.nid;
Query OK, 19 rows affected (0.20 sec)
Rows matched: 19 Changed: 19 Warnings: 0

mysql> select c.cid, c.timestamp, b.cid, b.timestamp from comments c inner join comment_bak b on c.cid = b.cid;
+-----+------------+-----+------------+
| cid | timestamp | cid | timestamp |
+-----+------------+-----+------------+
| 2 | 1140696532 | 2 | 1141291314 |
| 3 | 1110370045 | 3 | 1141291509 |

Swedish Pancakes Recipe - Plett Pan

Here's my recipe for "Swedish" pancakes. They are very light little mini crepe kind of things and call for the use of a special pan that has 7 little divots in it. To make this you need a
plett pan

The Pancake Recipe:

In a mixing bowl with a good pouring lip:

  • 1 egg (or 2 whites)
  • 1 cup flour
  • 1+1/4 cup milk
  • 1 tbsp sugar
  • 1/2 tsp salt

Mix with a whisk to make them nice and fluffy.

Get the pan hot. Using a stick of butter where you have peeled the wrapper back, apply butter to the circles of the pan. Then pour the batter into the divots and cook on one side. When the tops are starting to get a little firm, use a mini-spatula or a knife to flip them. When they are all done you can pick up the whole pan and turn it over above a serving tray to get the pancakes off in one swoop.

Can you guess which recipe we searched for fifteen minutes this morning before we made it?

Top with syrup, fruit, jelly, powdered sugar, etc.
Serves 3 when served alongside some fresh fruit and maybe a little sausage patty.

Here's a photo of what the "plett pan" or "swedish pancake pan" should look like:



Denver Traffic Counts

Some of you may know about our burgeoning Spanish House initiative. It's going to be awesome! Related to that I wanted to find traffic counts for a couple locations. Our Denver City Government provides the traffic counts they have done in the last few years. It's awesome.

Syndicate content