home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (nodewords_basic.install)

This example Drupal source code file (nodewords_basic.install) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

array, copyright, database, db_placeholders, db_query, function, metatags, name, nodewords_basic_uninstall, php, sql, system, type, where

The nodewords_basic.install Drupal example source code

<?php
// $Id: nodewords_basic.install,v 1.1.2.9 2009/12/25 03:09:07 kiam Exp $

/**
 * @file
 * Installation file for Nodewords - basic meta tags.
 */

/**
 * Implements hook_install().
 */
function nodewords_basic_install() {
  db_query("UPDATE {system} SET weight = 12 WHERE name = 'nodewords_basic' AND type = 'module'");
}

/**
 * Next update ID: 6105.
 */

/**
 * Implements hook_uninstall().
 */
function nodewords_basic_uninstall() {
  if (db_table_exists('nodewords')) {
    $metatags = array(
      'abstract',
      'canonical',
      'copyright',
      'description',
      'keywords',
      'revisit-after',
      'robots'
    );

    db_query("DELETE FROM {nodewords} WHERE name IN (" . db_placeholders($metatags, 'varchar') . ")", $metatags);
  }
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal nodewords_basic.install source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.