Green Drupal Notes

Read More

Drupal - Check role for authenticated links in views

<?--

global $user;
$role_auth = 'authenticated';
$user_roles = array_values($user->roles);
if (in_array($role_auth, $user_roles)) {
  echo '<div style="display: block; width:100%;float: left;position: relative;"><h2><a href="/manage/link_url"> Manage Content and View Sorting </a><div>' ;
}

--?>

Read More

PHP Snippet print drupal custom search block

This code can be used to print Custom Search blocks any where you can stick PHP. Tested in Drupal 7.

#open php code

$block = block_load('custom_search_blocks','1');
$content = _block_get_renderable_array(_block_render_blocks(array($block)));      
$output = drupal_render($content);        
print $output;

#close php code

Apache Note

Read More

Apache Notes - preventing external hot links

/**
.htaccess code to prevent external sites from directly linking to to files in an Apache directory. This prevent external sites from "hot-linking"
**/

SetEnvIf Referer "^http://subdomain\.domain\.edu" local_referral
SetEnvIf Referer "^https://subdomain\.domain\.edu" local_referral

# Apache 2.2
Order Deny,Allow
Deny from all
Allow from env=local_referral
Allow from env=auth_referral

# Apache 2.4 Syntax
local_referral
SetEnvIf Referer "server_23\.gluebox\.com" localreferer
Require env localreferer

#######################
// Double check for all .htaccess files in a directory
find . -name ".htaccess" -type f

// Now delete theme
find . -name ".htaccess" -type f -delete

########################
#  Enable a list of Drupal modules from a text file,
#  helpful for moving sites around
#  Make a list of all non-core modules.

sudo drush pml --no-core --type=module --status=enabled --pipe | cat > modlist.txt

# Now enable the list

sudo drush en -y $(cat modlist.txt)

 

Hypertufa Pagoda Test Fit, Hypertufa Mix Consistency, Pagoda Base Layout, Sample Pagoda - seen in passing

Read More

Hypertufa Pagoda Project - Molding Cement

Hypertufa Cement Mix - Zen Garden Pagoda Project

3.5 part portland cement
2 part kids play sand
1 part vermiculite
4 part peat moss
1-2 cup acrylic binding agent

These are the rough proportions for our Hypertufa mix, your mileage may very. Just be sure to use the same measuring container.

Obviously we added water too, though we didn't measure the proportions. We mixed in water until the consistency would form a solid ball.


Hypertufa Material List

Pagoda Base Layout

Pages

Subscribe to Front page feed