/[drupal]/contributions/modules/signup/includes/token_help.inc
ViewVC logotype

Contents of /contributions/modules/signup/includes/token_help.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Fri Aug 14 23:26:00 2009 UTC (3 months, 1 week ago) by dww
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -28 lines
File MIME type: text/x-php
#549646 by dww: Exposed signup-related node and signup data to token.module.
1 <?php
2 // $Id: token_help.inc,v 1.1 2008/11/15 02:03:50 dww Exp $
3
4
5 /**
6 * @file
7 * Code for building help text for token.module support on various forms.
8 */
9
10 /**
11 * Private function to generate HTML for showing the available tokens.
12 *
13 * @param $form
14 * Reference to the form array to include the help fieldset in.
15 * @param $element_name
16 * Name of the form element to use for the help fieldset.
17 */
18 function _signup_token_help(&$form, $element_name) {
19 $form[$element_name] = array(
20 '#type' => 'fieldset',
21 '#title' => t('Replacement tokens'),
22 '#description' => t("Since these tokens will be used in plain text e-mail, it is better to use the '-raw' versions of any tokens that provide them."),
23 '#collapsible' => TRUE,
24 '#collapsed' => TRUE,
25 );
26 $form[$element_name]['help_text'] = array(
27 '#value' => _signup_build_token_help(),
28 );
29 }
30
31 /**
32 * Private function to generate HTML for showing the available tokens
33 *
34 * @return The themed representation of the available tokens.
35 */
36 function _signup_build_token_help() {
37 static $help_html = '';
38 if (empty($help_html)) {
39 $help_html = theme('token_help', array('signup', 'node', 'global'));
40 }
41 return $help_html;
42 }

  ViewVC Help
Powered by ViewVC 1.1.2