Skip to content

Instantly share code, notes, and snippets.

body{background:red}.epay_payment_button_light{background:#005394 none repeat scroll 0% 0%;color:#fff;text-align:center;font-family:georgia,sans-serif;margin-left:0px !important;padding:8px 16px 9px;font-weight:bold;line-height:1;border:1px solid}#epay_paymentcards_form label,#ctl00_MainContent_WindowUC1_ctl00_ctl00_TotalLabel,#epay_paymentinfo ul li.total label{font-family:Georgia,serif !important;font-weight:normal;font-size:17px !important}#epay_paymentinfo ul li p{width:130px !important}#epay_paymentcollection input[type="submit"]{display:none}
@googletorp
googletorp / convert quote from varchar to text
Created November 1, 2015 21:43
Drupal migration example
// Update the table.
$storage_definition = BaseFieldDefinition::create('string_long')
->setLabel(t('Quote'))
->setDescription(t('The quote, always treated as non-markup plain text.'))
->setRequired(TRUE)
->setTranslatable(TRUE)
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'hidden',
'type' => 'rd_quote',
@googletorp
googletorp / theme.php
Last active September 6, 2015 12:37
Set height/width on responsive images
<?php
/**
* Implements hook_preprocess_responsive_image_formatter().
*/
function theme_preprocess_responsive_image_formatter(&$variables) {
$item = $variables['item'];
$height = $item->get('height')->getValue();
$width = $item->get('width')->getValue();
if (!$variables['responsive_image']['#width']) {
2014-09-25 14:33:57 +0200
rm Zend/zend_{language,ini}_parser.[ch]
@googletorp
googletorp / quicktabs.patch
Last active December 23, 2015 06:59
Quicktabs
diff --git a/quicktabs.module b/quicktabs.module
index 182a89c..9d3ba1b 100644
--- a/quicktabs.module
+++ b/quicktabs.module
@@ -150,6 +150,7 @@ function quicktabs_block_view($delta = '') {
$block['content'] = $qt['content'];
$block['content']['#contextual_links']['quicktabs'] = array('admin/structure/quicktabs/manage', array($delta));
$block['subject'] = check_plain($qt['#title']);
+ $block['content'] = render($block['content']);
}
@googletorp
googletorp / search_api_solr.diff
Last active December 20, 2015 02:59
Patch for search api v 1.1 using websolr
diff --git a/includes/solr_connection.inc b/includes/solr_connection.inc
index 8a26212..6839367 100644
--- a/includes/solr_connection.inc
+++ b/includes/solr_connection.inc
@@ -95,12 +95,12 @@ class SearchApiSolrConnection implements SearchApiSolrConnectionInterface {
/**
* Path to the system servlet.
*/
- const SYSTEM_SERVLET = 'admin/system';
+ //const SYSTEM_SERVLET = 'admin/system';
@googletorp
googletorp / registration_aegir.patch
Last active December 17, 2015 21:39
A fix for installing registration module on aegir
diff --git a/registration.install b/registration.install
index 5746828..c2e084b 100644
--- a/registration.install
+++ b/registration.install
@@ -372,6 +372,14 @@ function registration_field_schema($field) {
* Implements hook_install().
*/
function registration_install() {
+ // Some weird bug wuth classes not being loaded properly.
+ module_load_include('inc', 'registration', 'lib/registration_state.controller');