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

Drupal example source code file (better_formats_settings.admin.inc)

This example Drupal source code file (better_formats_settings.admin.inc) 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, default_value, defaults, description, fieldset, file, format, formats, function, node, php, tips, title, type

The better_formats_settings.admin.inc Drupal example source code

<?php
// $Id: better_formats_settings.admin.inc,v 1.6.2.3 2009/02/25 06:44:17 dragonwize Exp $

/**
 * @file
 * Contains FAPI and theme functions for the format settings form.
 */

/**
 * FAPI form builder for admin/settings/filters/settings page.
 *
 * @see better_formats_menu()
 */
function better_formats_settings_admin_form() {
  $form = array();

  $form['display'] = array(
    '#type' => 'fieldset',
    '#title' => t('Display'),
  );
  $form['display']['better_formats_fieldset_title'] = array(
    '#type'  => 'textfield',
    '#default_value' => variable_get('better_formats_fieldset_title', ''),
    '#title' => t('Selection title'),
    '#description' => t('Change the format selection title. Defaults to "Input format"'),
  );
  $form['display']['better_formats_long_tips_link_text'] = array(
    '#type'  => 'textfield',
    '#default_value' => variable_get('better_formats_long_tips_link_text', ''),
    '#title' => t('More format tips link text'),
    '#description' => t('Change the format full tips link text. Defaults to "More information about formatting options"'),
  );


  $form['control'] = array(
    '#type' => 'fieldset',
    '#title' => t('Control'),
  );
  $form['control']['better_formats_per_node_type'] = array(
    '#type'  => 'checkbox',
    '#title' => t('Control formats per node type'),
    '#description' => t('Control formats allowed and default formats per node type. Global settings will be used until a content type admin page is saved.'),
    '#default_value' => variable_get('better_formats_per_node_type', 0),
  );

  return system_settings_form($form);
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal better_formats_settings.admin.inc 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.