When you deploy something to a site, you will most probably use features. To use featutes with hook_update_N you can use default
When you deploy something to a site, you will most probably use features. To use featutes with hook_update_N you can use default
This one is easily overlooked but pretty important, strings in translation function can have arguments that can be replaced in 3 ways.
$text = t("This is !name's website", array('!name' => $username));
$text = t("This is @name's website", array('@name' => $username));
$text = t("This is %name's website", array('%name' => $username));
I wanted to make 2 features with the same view, but different setting, what was odd was once I had created one, the other didn't list in feature components list. I tried many things but in the end it appears that this is a "feature" of features, a not so nice one I might add.
zcat /Users/Marko/Downloads/file.sql.gz | mysql -u 'root' -p'password' your_database
just drop this line in your linux or mac and fill data you need to fill and wait :) or this for gz files
gunzip < /Users/Marko/Downloads/mydb.sql.gz | mysql -u root -p mydb
or for ZIP files
When I want to find something in GIT and see who and when removed some code I start to search GIT, best command combo is this.
git log -S "$location['country_code']" -p
For current branch
Drush
echo "SHOW TABLES LIKE 'cache%'" | $(drush sql-connect) | tail -n +2 | xargs -L1 -I% echo "TRUNCATE TABLE %;" | $(drush sql-connect) -v
Here's how to do this from the command line...
dpm(entity_get_info());
and you will get all the info you will need, like proper machine names.
To alter the form output we need to use form alter and overide array. We are going to add few options to filters that group filter options together, in this case we are dealing with list of countries.
/**
It is said here in docs api you can add JS file to some other region then header of footer https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal…
To to that you need to assign it to that region but also add it in html/page preprocess
Disabling Generate automatic URL alias is not possible with configuration, this needs to be done with code.
In hook_form_alter we call