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

Drupal example source code file (nodewords_extra.install)

This example Drupal source code file (nodewords_extra.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

14, array, database, db_placeholders, db_query, function, in, metatags, name, nodewords_extra, php, sql, system, where

The nodewords_extra.install Drupal example source code

<?php
// $Id: nodewords_extra.install,v 1.1.2.11 2009/12/25 03:09:13 kiam Exp $

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

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

/**
 * Next update ID: 6106.
 */

/**
 * Implements hook_uninstall().
 */
function nodewords_extra_uninstall() {
  if (db_table_exists('nodewords')) {
    $metatags = array(
      'dc.contributor',
      'dc.creator',
      'dc.date',
      'dc.publisher',
      'dc.title',
      'geourl',
      'location',
      'pics-label',
    );

    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_extra.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.