« January 2012 | Main | March 2012 »

February 29, 2012

Persistent Identifier Resources

I have previously identified my ignorance regarding persistent URLs. Here are a few resources that may alleviate the condition:

New Drupal module call Persistent Identifiers? Yes, please.

Implementing Persistent Identifiers - a useful pdf

Posted by kkwaiser at 02:02 PM | Comments (0)

February 28, 2012

Loggin and communication data requests - Part 1

Relevant but related to data downloads:
Part 3, part 2 and part 1.

The goal here is to offer a contact form that will structure requests for access to private data files. Right now, I'm using the same form used by the Data Download functionality but that may need to change because the data download reuses the same information time and again and the submission content for a data request will be different than that of a data request. Capiche?

Any ways, here is where I am:

1) Added a field to data set indicating whether it is Public/Private

2) If Private, a specific Panels template is called which includes a link to the Data Download form. This link is formatted to place the dataset NID in the url because I need this in order to get the data set contact's email. The URL looks like http:/umbs.lsa.umich.edu/research/weform?id=342
3) I added a private (hidden) field to the webform with a default value of %get[id] to make it part of the submission data.
4) Enabled Webform Rules and created a rule that triggers when Data Download form is submitted *if* the data set is private.
5) Added custom php rule to create the email. Ran into asinine token related issues which frustrate me to know end!!!
6) fin

Posted by kkwaiser at 04:06 PM | Comments (0)

Logging and communicating file downloads. Part Treux

[EDIT: I had to reconfigure how files were displayed. Switching to a File type of View. See this post for more.]

If you want part 2 and part 1.

Implementation Round 2:

1) Install and enable additional modules

Squeeze - gives ability to interrupt a file download by redirecting to a Webform
Filefield Stats - gives cryptic name to file download link, allows squeeze to not fire until the file is actually clicked on (i.e., user can still view node page)
Download Stats - introduces Rules action to trigger upon file download. I will use this to send an email to the file contributor with information from the Webform

$ sudo drush dl squeeze-6.x-1.x-dev filefield_stats download_count
$ drush en squeeze filefield_stats download_count

* May need to apply this patch for Squeeze

2. Create a webform to collect use information

3. Visit update.php and Configure

- Permissions (admin/user/permissions)
Squeeze - check all for administrator, nothing else
Download Count - Check all for admin, view own download counts for Authenticated
Filefield Stats - check all for admin, nothing else

- Modules
Squeeze (admin/settings/squeeze):
Check Default for 'Show page?';
Squeeze enabled content types: Data File Data Set;
Default Squeeze form: Data Download Form;
Check Redirect back to protected page

Download Count (admin/settings/download_count):
No changes
You can disable all the new menu items though admin/build/menu-customize/navigation

Filefield Stats: no options

4. Per the Squeeze module: File fields should have 'Generic files + Stats URL [+ Download Count]' as display type

I use a View (admin/build/views/edit/datafile_list) to list files so this setting is in the Field section of the pertinent view. Change the Public file, leave Private files as is.

5. Create a Rule that will trigger upon download and send an email to the Data Set Contact
This rule should include the following conditions (custom PHP):
Is downloaded file from a Data File CT?
Does the Contact want to be downloaded when files are downloaded?

The action should do the following:
Retrieve Data Set contact information
Retrieve last webform submission for the IP of the downloading user
Package the Webform submission information into an email and send to Contact.

6. [Optional] Get this module patch taken care of for usability purposes.

7. Profit

Posted by kkwaiser at 12:26 PM | Comments (0) | TrackBack

February 24, 2012

Upgrading to D7?

It's a Friday. And I want to be productive but I don't want to do any of the things I usually do. This is when I usually spend some time exploring my options re: drupal. Today I'm looking at how hard it will be to upgrade to Drupal 7 using Drupal's Upgrade Status module.

Here's a summary.

Modules in use: 84(!)(!)(!)
Stable for D7: 27
In D7 Core: 9
Dev for D7: 27
No D7 releases: 20

-----------------
Now, the last figure is the most important. It looks like 10 of those 20 have ready D7 substitutes available. Of the 10 that have no port available, 5 of those are deal breakers - meaning they supply absolutely necessary functionality that I don't currently have a substitute for. Here are the details:

Substitute Available:

Views Bonus Pack
-> Creates export to CSV functionality
-> EML Modules uses this
-> See Views Data Export
-> Need Level: 10

Private Download
-> Used to keep some data files private
-> Drupal 7 has can do both public/private file types out of the box
-> Need Level: 10

Content Profile
-> I attach a Person node to a User account
-> Port thread
-> Profile2 if you "don't need nodes in D7"
-> Need Level: 10

Node Relationships
-> Usability module allowing creation of nodes within Modal Frames.
-> No port activity
-> References Dialog as a potential substitute
-> Need Level: 7

CCK Fieldgroup Tabs
-> Recommends Fieldgroup Module (Stable D7)
-> Usability module to break up node/add forms
-> Need Level: 5

Tabs (jQuery UI tabs)
-> Deprecated in favor of Elements
-> Usability module to break up node/add forms
-> Need level: 5

Views Custom Field
-> Allows use of custom PHP in a views field
-> See Views PHP for substitute
-> Need Level: 5?

Taxonomy Role
-> Used to bar/grant access to vocabularies
-> Port thread indicates Field Permissions is a substitute
-> Need Level: 4

Table Wizard
-> Used sparingly to store data in database tables
-> Data as potential substitute. D7 development has picked up with new maintainer.
-> Need Level: 1

Node import
-> Use Feeds instead
-> Need level: 1

Path Rules
-> Used to check the URL path and trigger a rule to do something
-> I could probably stop using this module right now but custom PHP within Rules should do the same thing
-> I think this is now part of Rules Core
-> Need Level: 1


No Substitute:

Filefield Stats
-> Part of the Download Data form, used by the Squeeze Module
-> Need level: 10

Squeeze
-> Part of the Download Data form,
-> Need level: 10

Views Bonus EML
-> Allows export of metadata to EML compliant format
-> No port thread
-> Need Level: 10

Workflow Required Fields
-> Used in the REU application form to make certain fields required by state
-> Port thread
-> Need Level: 8

CCK Required by Role
-> Port Thread
-> Use: Multiple user roles may add content, this allows for variability in the required fields for each role
-> No port issue open
-> Need level: 8

Unitag
-> Used to put user entries into vocabularies into a moderation queue (i.e. protect the keywords list)
-> This module has mysteriously stopped working so I'm a bit frustrated with it
-> Port thread
-> Need Level: 6 (if it works)

Chaos tool custom plugins for Panels
-> Add images/links to Panes
-> No port issue open
-> Need level: 5

CCK Tweak Button
-> Hack to theme the "Add Another" buttons on node/add forms
-> If I can manage a proper theming job, this should become obsolete
-> Need level: 3

Views Date Range Filter D6
-> Usability module for viewing housing applications
-> No plans to port
-> Need Level: 2

Posted by kkwaiser at 02:59 PM | Comments (0)

February 21, 2012

How to force browsers to download a csv file

1) Open the .htaccess file found in the core drupal installation
2) Add this line

AddType application/octet-stream .csv

--------------------------------------------------------------------------
UPDATE
I believe I have solved this. It appears you can either set "DefaultType application/octet-stream" or enable the mime_magic module. Recommendations or opinions on these approaches are welcome. Notes follow.

-------------------------------------------
Modify .htaccess

Source:
http://helpful.knobs-dials.com/index.php/Apache_config_and_.htaccess_-_semi-sorted
http://hints.macworld.com/article.php?story=20040211102018600

Add:
DefaultType application/octet-stream

-------------------------
Modify apache2.conf
/etc/apache2/apache2.conf

Source:
http://hints.macworld.com/article.php?story=20040211102018600

change:
DefaultType text/plain

to:
DefaultType application/octet-stream

Restart apache

-------------------------------
Modify httpd.conf
/etc/apache2/httpd.conf

Add:

DefaultType application/octet-stream

Restart apache

--------------
Enable mime_magic

Sources:
http://www.wellho.net/mouth/1564_Default-file-MiMe-types-for-Apache-httpd-and-Apache-Tomcat.html
http://httpd.apache.org/docs/1.3/mod/mod_mime.html


Enable mime_magic
$ sudo a2enmod
-> mime_magic

$ sudo /etc/init.d/apache2 restart

Disable a module:

$ sudo a2dismod
-> mime_magic
$ sudo /etc/init.d/apache2 restart

Posted by kkwaiser at 01:03 PM | Comments (0)

Searching terminal history on Ubuntu

Going from this blog post

$ history | grep [search term]

OR

Ctrl + R -> type in search term -> hit Ctrl+R again to cycle through results -> Enter to apply command

Posted by kkwaiser at 09:29 AM | Comments (0)

February 20, 2012

Webform software from UM

Apparently the U has a contract with this company FormStack which can be used for building webforms.

Posted by kkwaiser at 02:30 PM | Comments (0)

February 06, 2012

blah

Questions -

Scope has been defined as an overall profile of the research/scholarship sensitivity (vs project or data set granularity.)

- Right now, we register most sensitive data types meaning Moderate and Low will not be registered for researchers with High Sensitivity data (i.e., they skip out of that portion of form.)

- Some Sensitive data types may catch too many people.


Classification Scheme
- It was suggested that H/M/L has too many connotations. To a researcher, all their data are High.

- Sensitive | Private/Confidential | Public
- High | Moderate | Low
- 3 | 2 | 1

High Sensitivity, Non-regulated Data Types
- What UM-endorsed resources are OK to use?

Is CSG up to the task of supporting units in securing data?

Posted by kkwaiser at 04:50 PM | Comments (0)

February 03, 2012

Use of Nearshore Monitoring Buoys in the Great Lakes

Didn't even know about this webinar took place but it's worth watching:

Use of Nearshore Monitoring Buoys in the Great Lakes

Posted by kkwaiser at 08:42 AM | Comments (0)