Mash Up

Workflow improvements on server, SVN repository structure

From the Agaric archives way back in April:

1. How to set up - or automatically create - "site@example.com" e-mails.

2. Automatically "svn update" on specific test-sites directories (or would this have to be for *all* of test-sites, and so we need a different directory structure?) upon checking in a change to a site theme.

Drupal does *not* find example.com folders that are inside subdirectories.

So Dan, what that means is we have to decide whether we want a possible
hassle in checking out symlinks (essentially creating them outside version

 

Styling XML: Making Colloquy transcripts browser-viewable

Agaric wants:
colloquy IRC export as html

Well, it outputs XML, so why don't we theme that?

http://www.w3.org/TR/html4/present/styles.html#h-14.2.3

http://www.w3.org/Style/styling-XML

css after text
pseudo text

http://www.w3schools.com/css/css_pseudo_elements.asp

Too cool!

sender {
color: #900;
}
sender[self="yes"] {
color: #009;
}
sender:after {
content: ":";
}

xml display any selector as a tool-tip
xml display element as a tool-tip
xml show arbitrary element as a tooltip

 

Can't do 301 redirects in the Comcast prison

Creating a permanent 301 redirect for an account at Comcast Home is way more difficult than it ought to be.

UPDATE. As in, conclusion: it can't be done. That is unethical web hosting.

Of course, they probably don't want you leaving their pathetic services for a real web site host, let alone with a content management system and open source free software.

Log in. Going to http://home.comcast.net will at least get you to a screen for this.

This poor guy got NO LOVE:
http://forums.searchenginewatch.com/showthread.php?t=7937

 

Line length for comments to wrap, Drupal best practices

Agaric asked this question on IRC #drupal-dojo, eventually the answer came back: 80 characters.

Thanks add1sun!

IRC is a little like the real sea, and tossing bottles with messages into it...

agaric: coding standards: for long comments (/** *stuff here */) that wrap, we're supposed to hard wrap, right? At how many characters?
Michelle: coding standards?
Druplicon: coding standards is http://drupal.org/coding-standards

 

Using TextWrangler for Drupal coding: changing tab to two spaces

Drupal coding standards call for two spaces per tab. Any text editor with a bunch of programming options must be able to set the default tab spacing, right?

In TextWrangler's case, yes, but if you searched here before even trying its user interface, you'll be glad you did. It's not anywhere a sane person, or even a rabid rhesus monkey, would think to look.

It's here:

TextWrangler Preferences › Editor Defaults

OK, so far so good. Now, the tab setting is inside the last option on this form, "Default font: "

 

Another need for CMT functionality... well, a little piece of it: user-editable term descriptions

Editable Description for Taxonomy Term
http://drupal.org/node/152970

I need to be able to set permissions for editing the description for the term. That is, the administrator can give edit and revision permissions for the term description.

 

Delete from multiple tables that may have a one-to-many relationship

NOTE: Conclusions here are provisional and input from a genuine SQL guru would be greatly appreciated.

SQL multiple table delete

Delete rows in three tables that share a key and satisfy a WHERE condition (in one of the tables). Table T3 will have a single row for each of these keys, as will table T2 for that matter, but table 1 will have multiple entries for each key.

The MySQL docs show up to two tables deleted, using three:

DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;

 

Possible performance optimization of table structure

It would be possible to do a performance optimization of table structure by moving (or rather, duplicating) the votingapi-calculated score into the cmt tables.

I will revisit this later.

 

Merging terms: dealing with the aftermath

Current thinking is to secretly store a term ID for every synonym

How do we ensure that a term ID that existed once passes on to whatever term Id supersedes it? That is, taxonomy term 12 on example.com, after a lifetime of dedicated service, has been merged into term 18, so how do make sure existing links to example.com/taxonomy/term/12 get you to example.com/taxonomy/term/18?

URL aliases?

Or an addition to the code in taxonomy.module that catches /term?

We'll deal with this later.

 

CMT database schema, mark II

   cmt_term_description
	   vapi_id : corresponds to votingapi content_id
     tid : same as in term_data
     description : same as in term_data.  Don't see a reason to put a key on description

   cmt_term_weight
	   vapi_id : corresponds to votingapi content_id
     tid : same as in term_data
     weight : same as in term_data

   name (inserted into synonym-modeled table cmt_term_name, where votes for names are tracked)
   LEFT OUT: vid (for now, cannot vote on what vocabulary a term belongs in)
                      
   cmt_term_hierarchy