Home > By category > Scripts >Modules > Constants



Constants

  • Downloads: 
  • Views: 
  • Rating:

This module provides an interface for managing arbitrary key-value pairs stored in Drupal's 'variables' table.

Constants are simple key-value pairs. They are stored in Drupal's core 'variables' table with a 'CONSTANT:' namespace to differentiate them from other variables. The module provides simple get-save-delete functions to mask the namespace.

Constants aren't really constant at all, but are ideal for replacing values that might otherwise be hard-coded as PHP constants.
For example, node id's are often hard-coded for theming purposes, but can change from site to site, so this allows for easy management of those values. This UI can also be used for any other scenario where a whole admin UI isn't needed to manage a few variables.

The use case I built this for: I was building a complex form on a development site using the Webform module. Webform uses the node id (nid) in the $form_id (e.g. webform_client_form_NID), so I needed to hard-code the nid in a hook_form_alter for custom form handling. This was fine on the development site, but when I wanted to deploy it to a production (or other) site (using node_export), all my custom nid-based theming and form handling broke. (And if I changed the hard-coded value, it would break on the development site.) So I made a simple UI to handle the nid as a variable, changed the nid as needed for each site, and the form worked everywhere.

I'd be very interested in hearing what other use cases people have, or if I've duplicated work already done elsewhere.

To install, enable the module, grant the "administer constants" permission to your role, and navigate to /admin/settings/constants.

Free download from Shareware Connection - This module provides an interface for managing arbitrary key-value pairs stored in Drupal's 'variables' table.

Publisher: Ben Buckman | License: Freeware | Price: 0.00
Version: 6.x-1.0 | Size: 10 KB | Platform: PHP, Scripts
Released Date: 02-01-2013 | Rating: 0 | Title: Constants

Author Url: http://drupal.org
Program Info Url: http://drupal.org
Download Url: http://ftp.drupal.org/files/projects/constants-6.x-1.0.tar.gz

Constants keywords:
Constants related downloads:

Field Spotter - Field Spotter is a simple javascript tool to help you identify fields in rendered Drupal output.

DotNetNukeā„¢ Project Reports Module - The Reports module provides a simple, but flexible, view on data from your DotNetNuke Database.

YM Custom Image - Module Yahoo Messnger (YM) Status Custom Image is a modue that allow you to display your current yahoo messenger status with various of images options.

Quick Reporting Tool - Developer Module - Quick Reporting Tool - Developer Module is a simple application for creating database connections and SQL queries.

Magellan Module - The Joomla Magellan Module provides a simple way to add Magellan Directory affiliate ad to your site.

Shareware Connection periodically updates pricing and software information of 'Constants' from company source 'Ben Buckman' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft,  Using 'Constants' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Constants.

New Reviews

Trend Micro HouseCall - With time, PC users find it increasingly difficult to keep their systems free of malware and rogue apps, despite using latest and feature packed security software. This is mostly owing to the evolving nature of malware and newer types of ...

Style Jukebox - No matter if you use a computer for personal needs or work in a networked setup, listening to music is commonplace. It is required for relaxation amidst work and nearly every user indulges in it. For music playback on PC, the WMP is not the only ...

CyberGhost VPN - There are so many ways available to browse the web nowadays. You can use a plethora of devices and pick from various service providers to get online. However, tech savvy users resort to additional measures to access the internet without being ...

SiSoftware Sandra Lite - People use computers for various needs, including work, entertainment and information seeking. However, a majority of PC users do not bother much about intricate details of their PC’s hardware parts. A section of users are particular about ...

SeaTools for Windows - Among all the hardware components used in a desktop or laptop, the hard disk is a prime one. In the hard disk is not in good shape, even a PC with powerful CPU and lots of RAM will malfunction or run sluggishly. Hard disk failure can lead to data ...

MiniTool Partition Wizard Home Edition - It is true that you need a powerful CPU and adequate amounts of RAM to keep your computer running smoothly. However, it is also necessary to ensure that the hard disk remains in top condition. Hard disk needs to be properly optimized and ...

dMaintenance - As a computer user, you may need to deal with several types of applications. For a lot of Windows users, the integrated tools of the OS may not suffice at times. They may need to use several third party apps for needs such as entertainment, ...

Machete Video Editor Lite 3.8 build - Average PC users are no longer strangers to video file handling and editing. There are so many sources from where you acquire video files, as it is. You also need to deal with video clips acquired from cameras and smart phones. At times, you may ...

Windows Live Family Safety - Using parental control applications has become a necessity for those people who have tech savvy kids and computers at home. In fact, you should use such software even if your kid is not tech savvy. Needless to say, children depend on internet for ...

HandBrake - Nearly every PC user gets into a situation when they fail to understand what to do with a DVD that will not play back on DVD player or PC owing to format restrictions. Some users may also feel irked about a video file downloaded from web refusing ...




New Downloads

MacX iPhone DVD Ripper

MacX iPhone DVD Ripper
provides perfect solution to
rip DVDs to iPhone 6/6 Plus,
iPhone 5S/5C/5, iPhone
4S/4/3GS, iPod, ...

Project Management System

Project management saves a lot
of time and work effort and
above all ensure plan
coherence and increase quality
of ...

num2colormap.m

I needed to create rgb jpg
images of heatmaps that had
the same dimensions as my
input data

Contacts Module

The Contacts module allows
users to store a list of
contacts and relevant related
information.

Accelerated Particle Swarm
Optimization

This is an accelerated PSO
(APSO), developed by Xin-She
Yang in 2008

Sort Data Table

Sort Data Table script
provides you options to
dynamically sort data
contained in a table.

Flashy

We found that there was a
shortage of flash video
wrapper players in the world
that were released under a
fully-Free license.

Patterns

Complex websites and web
applications can be created by
combining configurations of
Modules, Content Types (CCK,)
Views, ...

Area Conversion Calculator

Area Conversion Calculator
converts a types of area
measurement units to other
known units.

Phase and amplitude hue
plot

This routine was meant to be
used as a tool to represent
the a complex electric field
in a plane (with phase and
amplitude)

cofactors

When a user enters an n x n
matrix eg

SureGrid Control

SureGrid Control is a
graphical OLE DB data
consumer.