#Resources#
###Installation Profiles###
###Features##
###Drush & Makefiles###
#Resources#
###Installation Profiles###
###Features##
###Drush & Makefiles###
(function ($) { | |
Drupal.behaviors.yourTheme = { | |
attach: function(context, settings) { | |
$('form label').css('display', 'none'); | |
if(Modernizr.input.placeholder) { | |
// Text inputs | |
var formElements = $('form').find('input, textarea'); | |
$.each(formElements, function(index, value){ | |
if($(this).is('input')){ | |
var label = $(this).siblings('label').text(); |
function themefoo_preprocess_node(&$variables, $hook) { | |
$node = $variables['node']; | |
$type = $variables['type']; | |
$columns = 1; // Default to 1 column layout. | |
/* | |
* Programmatically figure out how many columns we have | |
* based on which fields the user has filled out in | |
* the node form. | |
* | |
* I'll update this gist later to explain |
## | |
## Variables | |
## | |
var.log_root = "/var/log/lighttpd" | |
var.server_root = "/var/www" | |
var.state_dir = "/var/run" | |
var.home_dir = "/var/lib/lighttpd" | |
var.conf_dir = "/etc/lighttpd" | |
var.vhosts_dir = server_root + "/vhosts" |
/* | |
* Render the new user picture | |
*/ | |
<?php print '<div class="user-picture"><img src="' . $user_picture . '" /></div>'; ?> | |
/* | |
* Render the now-available 'below_content' region | |
* under the content or wherever you want. | |
*/ | |
<div class="content"<?php print $content_attributes; ?>> |
(function ($) { | |
Drupal.behaviors.themename = { | |
attach: function(context, settings) { | |
// Add a hover class to nav items. | |
$('.mainnav nav a') | |
.hover( | |
function() { | |
$(this).addClass('hover'); | |
}, | |
function() { |
☎ - ☎ ☎ | |
☂ - ☂ ☂ | |
☑ - ☑ ☑ | |
☒ - ☒ ☒ | |
☐ - ☐ ☐ | |
☁ - ☁ ☁ | |
⌘ - ⌘ ⌘ | |
♻ - ♻ ♻ | |
⊕ | |
� |
<?php | |
function yourmodule_custom_form($form, &$form_state, $term) { | |
/* Note: rather than passing a $term var, you could use arg(2) from the url */ | |
drupal_set_title('Your Label: ' . ucwords($term)); | |
// or | |
drupal_set_title('Your Label: ' . str_replace('%20',' ', arg(2))); | |
/* Make life easier: */ | |
$school = ucwords($term); |
<?php | |
// Get the "Add to cart" array ready for rendering. | |
$add_to_cart = array( | |
'#theme' => 'uc_product_add_to_cart', | |
'#form' => drupal_get_form('uc_product_add_to_cart_form_' . $node->nid, $node), | |
); | |
/* | |
* Check the database to see the Stock availability of the product. | |
*/ | |
if(uc_stock_is_active($node->model)){ |