drupal
Undefined index: name in system_requirements()
drush vset install_profile "profile-name"Create in a .user.ini file in public_html folder with this content:
file_uploads = On
post_max_size = 50M
upload_max_filesize = 50MHow print $message on Drupal
Only add this line into your tpl.php file in the place you need the message comes up:
<?php print $messages; ?>Theming Node Teaser
Include in the template.php file this function:
function THEMENAME_preprocess_node (&$variables) {
$variables['theme_hook_suggestions'][] = 'node__' . $variables['type'] . '__' . $variables['view_mode'];
}Now the node--CONTENTTYPE--teaser.php works!
Simplenews - How to subscribe all existing users?
To add all users that are not already subscribers run this query:
insert into simplenews_subscriber(activated, mail, uid) select 1, mail, uid from users where uid not in (select uid from simplenews_subscriber) and uid > 0;And to subscribe them to a newsletter run this query:
RewriteRule ^sites\/default\/files\/(protected_download_dir\/.*)$ index.php?q=system/files/$1 [L,QSA]The files in this folder (or, all files that match the regular expression) will not be served directly by apache, but by a full drupal request using the file_download() callback. The routing for system/files is defined in system_menu().
Add viewport meta to template.php
Find this function:
function my_theme_preprocess_html(&$variables)
and insert this code at the end. If the function does not exist, please, create it.
$viewport = array(
'#tag' => 'meta',
'#attributes' => array(
'name' => 'viewport',
'content' => 'width=device-width, initial-scale=1, maximum-scale=1',
),
);
drupal_add_html_head($viewport, 'viewport');
}
Placing a Block in a tpl
--- OUR TEAM BLOCK --
<div class="container midpadding team-block" style="">
<?phpHow install drush on Cpanel
Log into your cPanel hosting account via SSH. Make sure SSH is enabled for your IP before connecting.
Once logged in, make sure you are in the home directory of your hosting account.
From your home directory, use the wget command to get the newest version of Drush.
wget https://github.com/drush-ops/drush/archive/master.zip
Unzip the drush file archive by using the following command
unzip -q master.zip
Rename this directory to simply be 'drush', by using the following command:
