Use "drush solr-index" instead of running cron. This saves more and more time exponentially the more nodes you have to index. Here's a shell script to run if you have a ton of nodes to index:
for i in {1..100}; do drush solr-index; done
<?php | |
echo "Hello, World!"; | |
?> |
<?php | |
/** | |
* Disable selected form fields by name. | |
* | |
* @param array $fields | |
* Array of fields names that needs to be disabled. | |
*/ | |
function MYMODULE_form_helper_disable_fields(&$form, $fields = array()) { | |
if (is_array($fields)) { | |
foreach ($fields as $field) { |
<?php | |
/** | |
* Deny (hide) selected form fields by name. | |
* | |
* @param array $fields | |
* Array of fields names that needs to be denied. | |
* | |
* Values of these fields will not be passed to $form_state['values']. | |
* | |
* @example |
#!/bin/bash | |
# 0 - no | |
# 1 - closed (read only) | |
# 2 - open (read/write) | |
# Disable comments for content of NODETYPE | |
drush vset --yes comment_NODETYPE 1 | |
# Disable comments for the already created content of NODETYPE |
drush php-eval "variable_set('uc_recurring_payment_methods', array('paypal_wps' => 'paypal_wps'));" |
<?php | |
function MYMODULE_preprocess_html(&$vars) { | |
/** | |
* Disable Skype phone highlighting in Internet Explorer. | |
* Add meta: <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> | |
* @see http://bacsoftwareconsulting.com/blog/index.php/web-development/prevent-skype-from-highlighting-phone-numbers/ | |
*/ | |
$meta = array( | |
'#type' => 'html_tag', |
<?php | |
function writeLog($string) { | |
$log_file = dirname(__FILE__) . '/log.txt'; | |
if ($fh = @fopen($log_file, "a+")) { | |
fputs($fh, $string, strlen($string)); | |
fclose($fh); | |
return true; | |
} | |
else { |
Use "drush solr-index" instead of running cron. This saves more and more time exponentially the more nodes you have to index. Here's a shell script to run if you have a ton of nodes to index:
for i in {1..100}; do drush solr-index; done
drush sql-dump > DATABASENAME-$(date +%Y-%m-%d-%H.%M.%S).sql |
tar -czf FOLDERNAME-$(date +%Y-%m-%d-%H.%M.%S).tar.gz FOLDERNAME |