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
Verifying my Blockstack ID is secured with the address 1FrZofHxVSgyJzkHtDiHBCrJBVW9Ec6VDU https://explorer.blockstack.org/address/1FrZofHxVSgyJzkHtDiHBCrJBVW9Ec6VDU |
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 | |
function CUSTOMMODULE_commerce_cart_product_add($order, $product, $quantity, $line_item) { | |
if (!empty($product->field_bundled_products)) { | |
$ids = array(); | |
foreach($product->field_bundled_products[LANGUAGE_NONE] as $bundle) { | |
$ids[] = $bundle['value']; | |
} | |
$line_item->data['bundled'] = array(); | |
$bundles = entity_load('field_collection_item', $ids); |
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
{ "rules_cod_create_user_registration" : { | |
"LABEL" : "cod_create_user_registration", | |
"PLUGIN" : "reaction rule", | |
"ACTIVE" : false, | |
"TAGS" : [ "cod" ], | |
"REQUIRES" : [ "rules", "commerce", "registration" ], | |
"ON" : [ "registration_insert" ], | |
"IF" : [ | |
{ "AND" : [ | |
{ "NOT data_is_empty" : { "data" : [ "registration:anon-mail" ] } }, |
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 | |
function mymodule_node_view($node, $view_mode, $langcode) { | |
if($view_mode == 'full') { | |
$flag = flag_get_flag('helpercontent'); | |
if ($flag->is_flagged($node->nid)) { | |
drupal_goto("<front>"); | |
} | |
} | |
} |
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 | |
function module_invoke() { | |
$args = func_get_args(); | |
$module = $args[0]; | |
$hook = $args[1]; | |
unset($args[0], $args[1]); | |
$function = $module . '_' . $hook; | |
if (module_hook($module, $hook)) { | |
// debug here |
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 | |
function mymodule_init(){ | |
global $conf; | |
if(drupal_is_front_page()){ | |
$conf['site_name'] = "WELCOME TO THE FREAKING HOMEPAGE!"; | |
// $conf['other_vars'] = "to change"; | |
} else { | |
switch($_GET['q']){ | |
case 'node/12345': | |
$conf['site_name'] = "this node is awesome!"; |
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 | |
// Lets just pretend your content type is "Event" with machine name "event" | |
$node = new stdClass(); | |
$node->type = 'event'; | |
node_object_prepare($node); | |
$node->title = "My event title"; | |
$node->language = LANGUAGE_NONE; |
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 | |
/* | |
Make Sure you include: | |
ctools_include('modal'); | |
ctools_modal_add_js(); | |
On the pages you put your link. | |
*/ |