This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 | |
/** | |
* Override variables used in page.tpl.php. | |
*/ | |
function YOURTHEMENAME_preprocess_page(&$vars) { | |
// Adds jquery accordion library so we can use it in our site. | |
drupal_add_library('system', 'ui.accordion'); | |
} |
This file contains hidden or 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
<div id="accordion"> | |
<h3><a href="#titel1">Deine Überschrift</a></h3> | |
<div>Dein aufgeklappter Text</div> | |
<h3><a href="#titel2">Deine zweite Überschrift</a></h3> | |
<div>Dein aufgeklappter Text</div> | |
</div> |
This file contains hidden or 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
/** | |
* @file | |
* Use accordions in node body. | |
*/ | |
(function ($) { | |
Drupal.behaviors.undpaulAccordion = { | |
attach: function(context) { | |
$('#accordion').accordion({ |
This file contains hidden or 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
################################################################################ | |
# Shell and drush commands to update the given installation | |
# | |
# Go to sites/all/scripts (e.g. cd sites/all/scripts) and type "sh update.sh" | |
# in your console/shell/Terminal. | |
# | |
# The commands have to be functional for any case after the initial installation | |
# installation. So on any set up after calling that script, the configuration | |
# must be the same. | |
# |
This file contains hidden or 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
################################################################################ | |
# Shell and drush commands to set up (or some part of it) the new site. | |
# | |
# Go to sites/all/scripts (e.g. cd sites/all/scripts) and type "sh install.sh" | |
# in your console/shell/Terminal. | |
# | |
# The commands are built to run once, e.g. to set some symlinks, but shall be | |
# designed to not break other commands on the second run. | |
# | |
################################################################################ |
This file contains hidden or 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 | |
// Database connection settings. | |
$databases = array ( | |
'default' => | |
array ( | |
'default' => | |
array ( | |
'database' => 'lokalerdatenbankname', | |
'username' => 'lokalerdatenbankbenutzer', |
This file contains hidden or 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 | |
/** | |
* Include local.settings.php | |
* | |
* The file is in .gitignore so we can safely use it for local configs. | |
*/ | |
if (file_exists('sites/default/local.settings.php')) { | |
include('local.settings.php'); | |
} |
This file contains hidden or 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 | |
/** | |
* Implements hook__wysiwyg_editor_settings_alter(). | |
*/ | |
function MODULENAME_wysiwyg_editor_settings_alter(&$settings, $context) { | |
global $base_url; | |
if ($context['profile']->editor == 'ckeditor') { | |
$skins_path = drupal_get_path('module', 'MODULENAME') . '/ckeditor/skins'; |
This file contains hidden or 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_preprocess_HOOK() for page.tpl.php | |
*/ | |
function busy_preprocess_page(&$variables) { | |
// Pass the main menu and secondary menu to the template as render arrays. | |
if (!empty($variables['main_menu'])) { | |
$variables['main_menu']['#attributes']['id'] = 'main-menu'; | |
$variables['main_menu']['#attributes']['class'] = array('links', 'clearfix'); | |
} | |
if (!empty($variables['secondary_menu'])) { |
NewerOlder