Category: Drupal 7

Bulk hide comments

UPDATE drpl_node SET comment = 0 WHERE type = 'article';
UPDATE drpl_node_revision SET comment = 0 WHERE nid IN (SELECT nid FROM drpl_node WHERE type = 'article');

Front page template

On Drupal 7, use page–front.tpl.php. Note the double dash.

Block embedding in a theme

Drupal 7:

<?php
$block = module_invoke('ddblock', 'block_view', '1');
print $block['content'];
?>