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 | |
namespace Drupal\my_module\Plugins\Blocks; | |
/** | |
* @Plugin( | |
* type="menu_block", | |
* title="Menu Block", | |
* description="A block for displaying system or user generated menus." | |
* ) |
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
/*jslint browser: true, plusplus: true, indent: 2 */ | |
/*global Node, console, Blob */ | |
/** | |
* Et tu pleures. Et tu pleures. Et tu pleures. Mais ça marche. | |
* | |
* But how the fuck will I make this work? | |
* - Step 1: Open your firebug (or other) console | |
* - Step 2: Paste this code into it | |
* - Step 3: Click "Execute" (or maybe "Run") | |
* - Step 4: If everything went OK your browser will download the file |
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
/** | |
* abs(Nombre number) : Nombre result | |
* Renvoie la valeur absolue du nombre number. | |
* Le nombre dont la valeur absolue sera calculée. | |
* La valeur absolue du nombre. | |
* | |
* @level 1 | |
* @cores 1 | |
* |
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
/** | |
* abs(Number number) : Number result | |
* Returns the absolute value of given number. | |
* A number. | |
* Given number's absolute value. | |
* | |
* @level 1 | |
* @cores 1 | |
* |
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
diff -urN mimemail.orig//mimemail.info mimemail//mimemail.info | |
--- mimemail.orig//mimemail.info 2015-01-12 12:06:10.000000000 +0100 | |
+++ mimemail//mimemail.info 2015-01-12 12:08:23.000000000 +0100 | |
@@ -1,6 +1,5 @@ | |
name = Mime Mail | |
description = Send MIME-encoded emails with embedded images and attachments. | |
-dependencies[] = mailsystem | |
package = Mail | |
core = 7.x | |
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_process(). | |
*/ | |
function MYTHEMEORMODULE_process(&$variables, $hook) { | |
// Seems legit. | |
// @see laborange2_theme_registry_alter(). | |
if (false === strpos($hook, 'advanced_forum')) { | |
// This one is a stupid variable mis-use and typo from advanced_forum. | |
if (!empty($variables['theme_hook_suggestion']) && false !== strpos($variables['theme_hook_suggestion'], 'advanced_forum')) { | |
// Do not override the 'theme_hook_suggestion' other than advanced |
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
$mockList = [ | |
[ | |
'name' => "Sa maman", | |
'firstname' => 'Josianne', | |
'lastname' => 'Balasko', | |
], | |
[ | |
'name' => "Des ours", | |
'firstname' => 'Jean', | |
'lastname' => 'Rochefort', |
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
$conf['mail_system'] = ['default-system' => 'NetSmtp_MailSystemProxy']; | |
$conf['netsmtp_proxy'] = ['default' => 'MimeMailSystem']; | |
$conf['netsmtp_catch'] = [ | |
'[email protected]', | |
'[email protected]', | |
// ... | |
]; | |
$conf['netsmtp_debug_trace'] = true; | |
$conf['netsmtp_debug_mime'] = true; | |
$conf['netsmtp'] = [ |
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
// Prevent double click in some forms. | |
(function(jQuery) { | |
"use strict"; | |
Drupal.behaviors.fixDoubleClick = { | |
attach: function (context) { | |
var k, selectors = [ | |
"#comment-form" | |
// Add here forms with problems. | |
]; | |
for (k in selectors) { |
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
require_once DRUPAL_ROOT . '/includes/update.inc'; | |
$modules = db_query("SELECT name, 1 FROM {system} WHERE type = 'module'")->fetchAllKeyed(); | |
foreach (array_keys($modules) as $key) { | |
module_load_install($key); | |
$updates = []; | |
// From module.inc/update.inc. | |
$regexp = '/^' . $key . '_update_(?P<version>\d+)$/'; | |
$functions = get_defined_functions(); | |
foreach (preg_grep('/_\d+$/', $functions['user']) as $function) { | |
$matches = []; |
OlderNewer