CNMAT Flashback

A look back at some items in our archives.

Archive Browser

Browse CNMAT content by type
Basic page

Getting Involved

Everyone can be involved in the exciting cultural, educational, musical
and technological projects happening at CNMAT in some capacity:



**Opportunities at CNMAT:**

  • Visiting scholars come for several months or years.
    Even though they often work on personal research, invariably they participate
Basic page

Matthew Wright's publications

Matthew Wright's Publications

Updated 1/7/2008


This is an annotated list of my publications. It's organized by topic in roughly
reverse chronological order. For papers available online, I've made the paper's
title be a link to the online version.(If html and pdf versions are both available,
the title links to html and then after the reference there's a separate link
to the pdf.)

Basic page

Activity Calendar

- [cnmat:node/add/activity|Create a new activity].

<?php
$view = views_get_view('activities');
echo views_build_view('embed', $view, array(date('Y'), date('n'), 'all'), FALSE, NULL);
?>

The activity calendar is for internal events and advisories. Including:

- Vacation notices
- Building maintenance
- Notable visitors
- Meetings
- Outside events of interest
- Deadlines

Basic page

Reservations

# Overview

- [cnmat:node/add/reservation|Create a new reservation].
- [cnmat:node/3228|How to get access to the reservation system].
- A reservation ensures exclusive availability of a room.
- If a reservation is to be unused please delete it from the calendar to make the time available to others.
- Use of CNMAT facilities is restricted to [cnmat:group/keyholders|Keyholders]. For details, read [cnmat:node/3213|the use policies].
- For more information about CNMAT resources in general, read [cnmat:node/3213|The CNMAT Users Manual].

# Main Room

- Membership required in: [cnmat:group/main_room_users|Main Room Users Group]
- Usage information: [cnmat:node/2774|Main Room Manual]
- Browse nodes at this location: [cnmat:taxonomy/term/681|Main Room]

<?php
$view = views_get_view('reservations_facility');
echo views_build_view('embed', $view, array(1341, date('Y'), date('n'), 'all'), FALSE, NULL);
?>

# Rear Studio

- Membership required in: [cnmat:group/rear_studio_users|Rear Studio Users Group]
- Usage information [cnmat:node/2726|Rear Studio Manual]
- Browse nodes at this location: [cnmat:taxonomy/term/674|Rear Studio]

<?php
$view = views_get_view('reservations_facility');
echo views_build_view('embed', $view, array(1342, date('Y'), date('n'), 'all'), FALSE, NULL);
?>

# Media Studio (aka "Small Studio", "Middle Studio")

- Membership required in: [cnmat:group/media_studio_users|Media Studio Users Group]
- Usage information: [cnmat:node/2775|Media Studio Manual]
- Browse nodes at this location: [cnmat:taxonomy/term/676|Media Studio]

<?php
$view = views_get_view('reservations_facility');
echo views_build_view('embed', $view, array(1343, date('Y'), date('n'), 'all'), FALSE, NULL);
?>

# Activity Calendar

- The activity calendar is for internal events and advisories. Vacation notices, meetings, visitors, deadlines...
- [cnmat:node/add/activity|Create a new activity].

<?php
$view = views_get_view('activities');
echo views_build_view('embed', $view, array(date('Y'), date('n'), 'all'), FALSE, NULL);
?>

Basic page

2009 Workshops

CNMAT presents a series of spring and summer workshops for students, artists, musicians and anyone interested in learning new software.

Basic page

Education

CNMAT’s educational program includes a wide range of opportunities for UC Berkeley students and outside scholars, artists, and music lovers.

Basic page

Checkouts

# Overview

- [cnmat:node/add/checkout|Create a new checkout]. All checkouts are subject to approval by a CNMAT principal.
- Use of CNMAT resources is restricted to [cnmat:group/keyholders|Keyholders]. For details, read [cnmat:node/6086|Borrowing Equipment from CNMAT].
- Checkout privileges may be rescinded if gear is consistently returned late, broken, or to the wrong location.

Basic page

Node Number Lookup

Find a node by number:  
  

if((int)$_GET['n']) {
$i = (int)($_GET['n']);
if(node_load($i)) {
drupal_goto(sprintf("node/%d", (int)($_GET['n'])));
} else {
echo "Node #{$i} does not exist.";
}
}
?>

Basic page

Email Overdue Checkouts

//check the log file for the last time an email was sent
$logfile = "/home/www-data/berkeley.edu-cnmat.www/htdocs/var/log/checkout-notifications.log";
$filetime = filemtime($logfile);
$diff = time() - $filetime;
//echo $diff;
echo " ";
$recipients = '';

//get the view with the checkouts
$view = views_get_view('checkouts_pastdue');
//gets the items in the view
$items = views_build_view('items', $view, null, false, 0, 0, 0, $filters);
$res = $items['items'];//results
//go through each result and get the node of the checkout and from there find and email the user
foreach($res as $r){
//print_r( $r);
$nd = node_load( $r->nid);
//print_r($nd);
$usr = user_load(array('name' => check_plain($nd->name)));

$email = $usr->mail; //here is the user's email address.
$recipients[]=$email;
$fieldval = $nd->field_notifications[0]['value'];

//the email body

}
//
$body = "Your equipment checkout on the CNMAT website has ended. Please return the items or update your checkout information.

www.cnmat.berkeley.edu/checkouts ";

$recipients = array_unique($recipients);

foreach($recipients as $person){
echo $person;
echo '
';
}
?>

Basic page

Music Information Center Taxonomy

$vid = 2577; // Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$tid = 4662; //if you need to use a term also
$pole = array();
$items = array();
$terms = taxonomy_get_tree($vid, $tid);
//$terms = taxonomy_get_tree($vid);
$output .= "

    \n";
    foreach ( $terms as $term ) {
    //$output .= "
  • \n";
    //$output .= l($term->name, "mic/$term->tid");
    $results = taxonomy_select_nodes(array($term->tid), 'or', 0, FALSE, 'n.sticky DESC, n.created DESC') ;
    //$output .= "
      \n";
      while ($node = db_fetch_object($results)) {
      $output .= "
    • nid\"> $node->title \n";
      $loaded = node_load($node->nid, NULL, FALSE);
      $output .= "
        \n";
        foreach($loaded->taxonomy as $loaded_term){
        //$output .= "
      • ";
        if ($loaded_term->vid!=2577){
        $output .= "
      • tid\"> $loaded_term->name \n";
        }
        //$output .= l($loaded_term->name, mic_resource/$loaded_term->tid);
        }
        //$output .= "

      \n";
      //>contents['field_core_component']
      }
      $output .= "

    \n";
    }

    $output .= "

\n";
print $output;
?>

Pages