Skip to content

Instantly share code, notes, and snippets.

@herbdool
herbdool / convert-location.php
Last active October 24, 2024 02:06
Convert Location module data to Address, Telephone and Email
<?php
/**
* Convert Location to Address, Telephone and Email
*
* bee php-script convert-location.php
*
* @todo add batching.
*
* - Requires using bee commandline tools in Backdrop: https://github.com/backdrop-contrib/bee
@herbdool
herbdool / utf8mb4_convert.bee.inc
Created October 24, 2024 02:03
utf8mb4 converter
<?php
/**
* @file
* Command(s) for working for converting to utf8mb4.
*/
/**
* Implements hook_bee_command().
*/
@herbdool
herbdool / convert-media2backdrop.php
Created October 24, 2024 02:00
Convert embedded media (images and video) from Drupal 7 to Backdrop equivalents
<?php
/**
* Convert d7 media to Backdrop media
*
* bee php-script convert-d7media2backdrop.php
*
* Requires video_filter module in Backdrop.
* Will convert from Drupal 7 media module format.
*/
@herbdool
herbdool / convert-d7media2backdrop.php
Last active November 18, 2023 02:26
Convert D7 Media to Backdrop Media
<?php
/**
* Convert d7 media to Backdrop media
*
* bee php-script convert-d7media2backdrop.php
*
* @todo add batching.
*/
@herbdool
herbdool / convert-fc2p.php
Last active October 11, 2023 15:27
Convert Field Collection to Paragraph
<?php
/**
* Convert Field Collection to Paragraphs
*
* bee php-script convert-fc2p.php
*
* @todo add batching.
*
* - Both field_collection and paragraphs need to be enabled.
@herbdool
herbdool / pantheon.civicrm.settings.local.php
Created March 4, 2022 20:45
Pantheon settings for CiviCRM
<?php
/**
* CiviCRM Local configuration file.
*/
/**
* 1. After installing CiviCRM place this snippet in civicrm.settings.php,
* just below
* "global $civicrm_root, $civicrm_setting, $civicrm_paths;"
@herbdool
herbdool / civicrm.settings.local.php
Created November 18, 2021 18:24
CiviCRM settings file for Drupal 9 on Pantheon
<?php
/**
* CiviCRM Configuration File.
*/
/**
* Installing CiviCRM with Drupal 9 on Pantheon.
*
* 1. Create a new site on Pantheon using Drupal 9 (sftp mode).
@herbdool
herbdool / gist:54ca80f8089c261e072896fb6a1be2bf
Created January 24, 2020 14:55 — forked from bryhal/gist:4129042
MYSQL: Generate Calendar Table
DROP TABLE IF EXISTS time_dimension;
CREATE TABLE time_dimension (
id INTEGER PRIMARY KEY, -- year*10000+month*100+day
db_date DATE NOT NULL,
year INTEGER NOT NULL,
month INTEGER NOT NULL, -- 1 to 12
day INTEGER NOT NULL, -- 1 to 31
quarter INTEGER NOT NULL, -- 1 to 4
week INTEGER NOT NULL, -- 1 to 52/53
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'...
verbose: /usr/share/lando/bin/docker-compose,--project-name,gottabd,--file,/home/herb/.lando/compose/gottabd/globals-0.yml,--file,/home/herb/.lando/compose/gottabd/appserver-0.yml,--file,/home/herb/.lando/compose/gottabd/appserver-1.yml,--file,/home/herb/.lando/compose/gottabd/appserver-2.yml,--file,/home/herb/.lando/compose/gottabd/appserver-3.yml,--file,/home/herb/.lando/compose/gottabd/database-0.yml,--file,/home/herb/.lando/compose/gottabd/database-1.yml,--file,/home/herb/.lando/compose/gottabd/database-2.yml,--file,/home/herb/.lando/compose/gottabd/database-3.yml,--file,/home/herb/.lando/compose/gottabd/database-4.yml,--file,/home/herb/.lando/compose/gottabd/database-5.yml,--file,/home/herb/.lando/compose/gottabd/proxy-0.yml,up,--detach,--no-recreate,--remove-orphans,appserver finished with code 0
verbose: Running ["/usr/share/lando/bin/docker-compose","--project-name","gottabd","--file","/home/herb/.lando/compose/gottabd/globals-0.yml","--file","/home/herb/.lando/compose/gottabd/appserver-0.yml","--file
@herbdool
herbdool / backend-payments.patch
Created May 29, 2018 00:16
Stripe backend payments fix
diff --git a/CRM/Core/Form/Stripe.php b/CRM/Core/Form/Stripe.php
index 828e2ea..4b4963e 100644
--- a/CRM/Core/Form/Stripe.php
+++ b/CRM/Core/Form/Stripe.php
@@ -8,9 +8,35 @@ class CRM_Core_Form_Stripe extends CRM_Core_Form {
/**
* Function to access protected payProcessors array in event registraion forms
+ * to see if any of them are stripe processors.
*/