Useful Drupal scripts

Submitted by devin on Wed, 02/12/2014 - 22:15

Here are some useful Drupal scripts! The first is a script that will put your Drupal directory's UNIX file permissions back to a secure and useful state. The second is great if you have a production and a staging website. You often need to clone your production website back to production then change some configuration to make the staging website "development". This is pretty basic; for instance, I sometimes need to disable google analytics as well in this script. The third is basically a listing of the crucial Drupal 7 modules I install in every site I have.

#assumes your site is installed at /home/username/public_html 


if [ "$1" != "--really" ]; then 
  cat $0
  exit 0 

cd /home/$USERNAME/ 
chown -R $USERNAME:www-data $INSTALL_DIR 
find $INSTALL_DIR -type d -exec chmod u=rwx,g=rx,o= '{}&' \; 
find $INSTALL_DIR -type f -exec chmod u=rw,g=r,o= '{}' \; 

#this code handles multisite install files directories 
find $INSTALL_DIR/sites -type d -name files -exec chmod ug=rwx,o= '{}' \; 
for d in $INSTALL_DIR/sites/*/files; do 
  chown -R www-data:$USERNAME $d 
  find $d -type d -exec chmod ug=rwx,o= '{}' \; 
  find $d -type f -exec chmod ug=rw,o= '{}' \; 

#clone your production database to staging then run this script using drush to get into development mode 

#set some important variables. Need to customize the favicon updating line and the developer modules line at least, plus these variables: 


drush vset -y preprocess_css 0 
drush vset -y preprocess_js 0 
drush vset -y error_level 2 
drush vset -y site_mail $DEV_EMAIL 

#this line changes your favicon to default - I leave my theme's default favicon as the Drupal logo and then I can easily see which tab is development and which is production 
drush php-eval '$s=variable_get("theme_THEMENAME_settings",""); $s["default_favicon"]=1; variable_set("theme_THEMENAME_settings", $s);' 

#developer modules - add more? 
drush en -y devel field_ui rules_admin views_ui 

drush cc all 


My always-install modules

drush dl admin_menu globalredirect pathauto subpathauto views devel wysiwyg xmlsitemap redirect token ctools diff tadaa
drush en -y admin_menu_toolbar views_ui globalredirect subpathauto pathauto devel wysiwyg xmlsitemap redirect diff tadaa

wget ''
unzip -d sites/all/libraries

Submitted by Milanedgef on Fri, 02/19/2021 - 02:53


Few things are verily universal. But while people across the creation address contrasting languages, put manifold foods and be revenged experience distinct emotions, millions across the world note porn. In defiance of being so widely consumed, porn is maligned as the beginning of camaraderie’s ills. It’s even been labelled a mr condition hazard past politicians in Utah.

Porn has transformed closed the ago few decades, rightful to the availability of the internet and faster entanglement connections. It is also attractive more immersive than ever before. Take effective reality. Earlier this year, researchers from Newcastle University in the UK pointed minus that VR changes the ordeal of porn from aloof non-participant to protagonist. They warned that this has the passive to fog the route between actuality and fantasy, peradventure damaging relationships and encouraging dangerous behaviour.

more on - <a href=>gay0day</a&gt;

Add new comment