« November 2011 | Main | January 2012 »

December 19, 2011

Lock a node from further edits by its author

Status: Impossible

Take a look at the stupid configuration mistake I was making.


Wide ranging support-post that offering nothing concrete.

Narrowly focused support-post offering something concrete but in-the-end insufficient

Is it possible to take away access from specific nodes? - sure but not in the way you want to do it.

Other stuff:

Help me!!

Workflow has the solution!!

Speaking of Workflows, inconclusive posts I love.

Cricket, cricket

As long as I'm linking to everything tangentially related to this topic.

cool api knowledge:

content_access_action_acl_revoke_access($node, $author, $settings);

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

Tweak REU application form

The second year for this form is coming around and of course there are items I hadn't anticipated.

1. Remove edit capabilities for authors after the form is "submitted"

- Visit admin/content/node-type/reu-application/access and remove "Edit Own" permissions. Enable node specific settings.

- Enable Workflow Access (admin/build/modules)
- Visit the workflow settings for REU Application (/admin/build/workflow/edit/1)
- Adjust Messages put across by rules

Show Message: REU Application is In Progress
Application not submitted! When you are ready to submit, click Edit and change the status from In progress to Submitted and Save your changes. Warning: You will lose edit rights up submission!

Show Message: REU Application is Submitted
Application submitted! No further changes are allowed to this application. You will be contacted when a decision regarding your application is reached. Thank you for applying!!

2. Add Year to REU application
- Default to 2011
- Use VBO to populate old applications
- Incorporate year filter into views

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

Copy directories and maintain permissions

After googling it a second time, I usually decide I should just blog it for future reference:

$ sudo cp -rfp ~/Desktop/blah/* /var/blah

the -p is the key

from $ man cp

-p same as --preserve=mode,ownership,timestamps

preserve the specified attributes (default: mode,ownership,timestamps),
if possible additional attributes: context, links, xattr, all


Posted by kkwaiser at 10:19 AM | Comments (0) | TrackBack

December 07, 2011

Optimizing Node Reference Autocomplete

Looks like the way to do this is to use a View (under advanced settings for the CCK field) that is optimized with filters and caching. Haven't tried this out though.


Something that may be more efficient in your case: Use a view to restrict the list of possible nodes instead of restricting by type. This will allow you to optimize your query by removing the ORDER BY and avoiding any sorts on the returned list.

And a suggestion from daggerhart via IRC:

additionally, you could write you own query, and use it in the view instead of the generated one (you'll have to hook into the view before it executes)

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

DRAFT Watermark

Hopefully the internet will appreciate this:

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

December 06, 2011


May inquired with ITS to see if they have this module on their servers


mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server.

Posted by kkwaiser at 11:17 AM | Comments (0) | TrackBack

December 05, 2011

Long Text vs Long Text With Summary

'Long text and summary' field was created, which contains a textarea for the body along with an optional textarea for the teaser. This new field has options to display the teaser using either the text that is in the teaser field or as a snippet from the body text of a stated size.


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

How to add Taxonomy field to a custom content type in drupal 7

Wouldn't have expected this to trip me up:

When you add a field to the content type select Term reference from the list titled "Select a field type".

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

Optimizing on ITS Umich servers

Just a few implementation notes optimization tips I picked up at Drupal Camp Michigan.

Check suggestions from Google PageSpeed.

mod_deflate -

Ask ITS (webmasters@umich.edu) to enable this on the server. Then add something like the following to .htaccess:

# compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript

mod_expire -

This will allow the server to Leverage Browser Caching.

Ask ITS (webmasters@umich.edu) to enable this on the server. Drupal's primary .htaccess file should be configured out of the box for this to work.

Posted by kkwaiser at 10:59 AM | Comments (0) | TrackBack