User login

Reference

Testing session at Drupal Camp NYC 5

Why click on forums every time?

Why create a user every time to make sure it isn't

Me: And I thought it was just so

  • Functional tests - what users do
  • Unit tests - (not doing so much)
  • Security tests - insert javascript, cross-site scripting, SQL injection, penetration testing on every form field: if it sees the form it

Assertions are the base of any testing framework.

Views 2 discussion at Drupal Camp NYC 5

Views 2 Relationships: Let's you get information that's one step away.

For instance, you can get content based on when users joined or something.

Add a relationship for Queue.
Add the Questionable Content queue.

Now we can use the in-queue filter: it has to be in that queue to show up in the view.

pretty slick.

And then you can sort for nodequeue.

Generally if you're thinking of writing an SQL filter do do what a views does, you can figure it out yourself.

DrupalCamp JQuery Session

Presented by Nat

References

Notes for Intro to jQuery in Drupal session, NYC Drupal Camp 5
http://groups.drupal.org/node/14858

Notes

Javascript used to be adding elements to web pages that if the browser didn't have javascript, they just weren't there.

Graceful degredation now losing favor to Drupal enhancement.

HTML is semantic markup.

D7 Taxonomy Menu reworking for usability: tabs for vocabulary and term editing

Note: This note is not to my usual audience (ok, well it's still to myself...). Usually notes on Agaric are about working with Drupal, extending it, making modules or themes. This note is about developing and improving Drupal core itself. Although if you happen to be building any module for Drupal 7 right now, say because for instance you are insane, you would run into this issue also.

To those in IRC last night, I really wasn't crazy.

Nothing I could do through the user interface would touch the menu_router table.

How to do graphics in a sidebar not the Drupal way

Note the title said NOT the Drupal way. That means this is a cautionary tale of how NOT to add changing promotional graphics to your site.

In a local checkout of the repository:

cd themes/example/images/home/
svn add example_graphic_one.gif
svn add example_graphic_two.gif
sudo svn commit -m "new graphics for front and story pages"

Note that this site is incorrectly putting its custom theme in /themes, rather than /sites/default/themes (or /sites/something/themes).

On production:

Functions needed to define a new CCK field; Field placement module thoughts

If we were to implement Field Placement's imagecache preset option as a CCK field itself, here are (a lot of) the parts we would have to implement, drawn from imagefield itself. Many helper functions left out, but the below code is the gist of defining a CCK field type.

All in all, it seems like more work than warranted to display a setting option that does not get displayed on the node itself, but rather affects the display of another CCK field.

How Drupal 5's Administration Theme functionality works

Drupal's administration theme functionality works very simply: if the first argument of the internal path is admin, the custom theme is set to the admin theme.

This suggests that the $custom_theme variable can be set by modules to change to any arbitrary theme, and it will override the default theme.

The setting of custom_theme to admin_theme is done in system module's implementation of hook_menu:

Variables available in _phptemplate_variables for node templates

The variables you get to play with while setting new variables are nice.

So you can do switch or if statements on $var['type'] to only provide certain variables to certain node types.

<?php
function _phptemplate_variables($hook, $vars = array()) {
  switch ($hook) {
    case 'node':
        drupal_set_message('<pre>'.print_r($vars,TRUE).'</pre>');
        break;
  }
  return $vars;
}
?>

Syndicate content