December 19, 2011
Lock a node from further edits by its author
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.
Speaking of Workflows, inconclusive posts I love.
cool api knowledge:
content_access_action_acl_revoke_access($node, $author, $settings);
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
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
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)
Hopefully the internet will appreciate this:
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.
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.
How to add Taxonomy field to a custom content type in drupal 7
Wouldn't have expected this to trip me up:
Optimizing on ITS Umich servers
Just a few implementation notes optimization tips I picked up at Drupal Camp Michigan.
Check suggestions from Google PageSpeed.
Ask ITS (firstname.lastname@example.org) to enable this on the server. Then add something like the following to .htaccess:
This will allow the server to Leverage Browser Caching.
Ask ITS (email@example.com) to enable this on the server. Drupal's primary .htaccess file should be configured out of the box for this to work.