This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jeremys-Mac:squeeze-20131203 james$ vagrant box list | |
Debian 6 Squeeze x64 according to documentation (virtualbox) | |
Jeremys-Mac:squeeze-20131203 james$ vagrant init "Debian 6 Squeeze x64 according to documentation" | |
A `Vagrantfile` has been placed in this directory. You are now | |
ready to `vagrant up` your first virtual environment! Please read | |
the comments in the Vagrantfile as well as documentation on | |
`vagrantup.com` for more information on using Vagrant. | |
Jeremys-Mac:squeeze-20131203 james$ vagrant up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Importing base box 'Debian 6 Squeeze x64 according to documentation'... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Retrieves the title of the Content Item with the given filepath | |
*/ | |
function km_zipcart_get_title($file) { | |
// Start our query with searching for the file | |
$qf = db_select('file_managed','fm'); | |
$qf->condition('fm.filename',$file,'='); | |
// Get the fields we need | |
$qf->fields('fm', array('fid','filename')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var fsas = []; | |
$('table td:not([style]) b').each( | |
function() { | |
var val = $(this).text(); | |
if (val.length == 3) { | |
fsas.push(val); | |
} | |
}); | |
var csv = fsas.sort().join(','); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($('.chooser').length == 0) { | |
var pagearr = []; | |
var $pageSel = $('<select class="chooser">').hide(); | |
var pageMax = parseInt($('.pager').data('pages')); | |
var pageCur = parseInt($('.pager').data('currentpage')); | |
for(i=0;i<pageMax;++i) { | |
if (i < 5 || i >= (pageMax-5) || (i+1)%10 == 0 || ((i > pageCur-5) && (i < pageCur + 5))) { | |
pagearr.push({ val: i+1, text: (i+1)+" / "+pageMax }); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$view = new view(); | |
$view->name = 'sh_drupal_languages'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'node'; | |
$view->human_name = 'sh_drupal_languages'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('.page-admin-reports-fields .content table.sticky-table td:first-child').each(function() { | |
var enabledFields = ["field_subtitle", "field_text", "field_video", "title_field", "field_related_products", "field_resources", "field_product_categories", "architect_body", "body", "field_architect_specifications", "field_event_link", "field_event_location", "field_file", "field_hero_title", "field_link", "field_news_publication_title"]; | |
var url = 'http://' + window.location.host + '/admin/config/regional/entity_translation/translatable/' + jQuery(this).text() + '?destination=admin/reports/fields'; | |
var $sibling = jQuery(this).next('td'); | |
$sibling.text(''); | |
if (enabledFields.indexOf(jQuery(this).text()) != -1) { | |
var $link = jQuery('<a href="' + url + '" target="_blank">' + jQuery(this).text() + '</a>').css('font-weight','700'); | |
$link.appendTo($sibling); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feeds Paths: | |
Feeds Import -> import/%/ path definitions -> http://cgit.drupalcode.org/feeds/tree/feeds.module#n293 | |
Feeds UI -> admin/structure/feeds/% path definitions -> http://cgit.drupalcode.org/feeds/tree/feeds_ui/feeds_ui.module#n46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function east_penn_trucks_20141222_preprocess_page(&$vars, $hook) { | |
// Remove the Breadcrumb and Title from the homepage | |
if ($vars['is_front']) : | |
$vars['breadcrumb'] = ''; | |
$vars['title'] = ''; | |
endif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Main containers | |
.container | |
@include outer-container | |
// Rows | |
.row | |
@include row() | |
// A basic column without a defined width or height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_menu_alter(). | |
*/ | |
function MYTHEME_menu_alter(&$items) { | |
$items['user/%user']['title callback'] = 'MYTHEME_user_page_title'; | |
} | |
/** | |
* Custom Callback for setting page title. | |
*/ |
OlderNewer