Drupal

FOSS CMS

Update Comment Status of a Node

Just recently I had the issue where a list of nodes imported via user import as a content profile had comment status disabled.

There were thousand of nodes to update, hence the best way was to use VBO. However, there was no option provided for comment status update, hence the alternative was to execute "Arbitrary PHP Code".

The following snippet below can be used for updating node status for nodes selected in VBO:

Add Tab - A Simple Drupal Module

Technologies: 

addtab is a simple Drupal Module that adds a tab that provides links for adding same content type, ie whenever a content is viewed a tab would appear that would link to creating similar content.

The Create tab that you can see in this page being displayed is basically due to this module.

A drupal module consists primarily of two files .info and .module file.

addtab.info:

; $Id$ addtab.info,v 1.0 2011/02/20 01:26:00 amitsedai Exp $
name = addtab
description = Creates a new tab in a node view for adding same content type
core = 6.x