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
.drush/drush.ini: | |
memory_limit = 128M | |
error_reporting = E_ALL | E_NOTICE | E_STRICT | |
display_errors = stderr | |
in html folder file name php5.ini: | |
expose_php = Off | |
max_input_time = 60 | |
variables_order = "EGPCS" |
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
var data2= new Array(); | |
var items= new Array(); | |
$.ajax({ | |
dataType: "jsonp", | |
cache: true, | |
url: 'http://api.wunderground.com/api/c901ba8827136492/history_20000405/q/CA/San_Francisco.json', | |
data: data2, | |
success: function(data2){ // do something 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
(function ($) { | |
Drupal.behaviors.appointment = { | |
attach: function(context, settings) { | |
//Begin my code | |
function arrayContains(needle, arrhaystack) | |
{ | |
return (arrhaystack.indexOf(needle) > -1); | |
} | |
var statelist=new Array(); |
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
.me-team .slide-item-wrap img { | |
border-radius: 50%; | |
display: block; | |
margin: 0 auto; | |
max-width: 100%; | |
transition: all 0.18s linear 0s; | |
} |
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
server { | |
listen 80; | |
server_name shoptest.snethosting.com; | |
access_log /var/log/nginx/shoptest.snethosting.com.access.log; | |
root /home/shoptest; | |
index index.php; | |
location / { | |
try_files $uri $uri/ @drupal; | |
} |
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
$query = new EntityFieldQuery(); | |
$query->entityCondition('entity_type', 'node') | |
->entityCondition('bundle', 'event') | |
->propertyCondition('status', 1); | |
$noderesult = $query->execute(); | |
if (isset($noderesult['node'])) { | |
$kb_items_nids = array_keys($noderesult['node']); | |
$kb_items = entity_load('node', $kb_items_nids); | |
// dsm($kb_items); |
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
$formatter = new stdClass(); | |
$formatter->disabled = FALSE; /* Edit this to true to make a default formatter disabled initially */ | |
$formatter->api_version = 2; | |
$formatter->name = 'my_address'; | |
$formatter->label = 'My Address'; | |
$formatter->description = ''; | |
$formatter->mode = 'php'; | |
$formatter->field_types = 'addressfield'; | |
$formatter->code = ' $address=""; | |
foreach ($variables[\'#items\'] as $item) { |
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
// Using Omega theme copy this to preprocess-html.inc | |
$data = array( | |
'#tag' => 'meta', | |
'#attributes' => array( | |
'http-equiv' => "X-UA-Compatible", | |
'content' => "IE=edge,chrome=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
#!/bin/bash | |
cd base_install | |
cp local.make.example ../drush.make | |
cp drupal-org.make ../ | |
cd .. | |
drush make drush.make | |
cd sites/default | |
cp default.settings.php settings.php | |
chmod 777 settings.php | |
mkdir files |
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_field_widget_form_alter(). | |
*/ | |
function MODULENAME_hook_field_widget_form_alter(&$element, &$form_state, $context) { | |
// Prevent replace tokens on field admin ui form. | |
if (!is_null($element['#entity'])) { | |
// Determine the $user. If entity has uid, try to load. If can't, use the | |
// global $user. | |
if (isset($element['#entity']->uid)) { |