You are here

function themekey_help_examples_form in ThemeKey 7.3

Same name and namespace in other branches
  1. 6.4 themekey_help.inc \themekey_help_examples_form()
  2. 6.2 themekey_help.inc \themekey_help_examples_form()
  3. 6.3 themekey_help.inc \themekey_help_examples_form()
  4. 7 themekey_help.inc \themekey_help_examples_form()
  5. 7.2 themekey_help.inc \themekey_help_examples_form()

Uses Drupal's form builder to format ThemeKey's help examples

See also

themekey_help()

1 string reference to 'themekey_help_examples_form'
themekey_help in ./themekey.module
Implements hook_help().

File

./themekey_help.inc, line 93
Provides content for help pages.

Code

function themekey_help_examples_form($form, &$form_state, $collapsed) {
  $form['themekey_help_examples'] = array(
    '#type' => 'fieldset',
    '#title' => t('Examples'),
    '#collapsible' => TRUE,
    '#collapsed' => $collapsed,
  );
  $form['themekey_help_examples']['Set a special theme for site administrator'] = array(
    '#type' => 'fieldset',
    '#title' => t('Set a special theme for site administrator'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['Set a special theme for site administrator']['item'] = array(
    '#type' => 'item',
    '#markup' => t('Create a Theme Switching Rules:') . '<pre>
Property: user:uid
Operator: =
Value: 1
</pre>',
  );

  // TODO: add some examples using drupal:path and drupal:path:wildcard
  $form['themekey_help_examples']['TODO: add some examples using drupal:path and drupal:path:wildcard'] = array(
    '#type' => 'fieldset',
    '#title' => 'TODO: add some examples using drupal:path and drupal:path:wildcard',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['TODO: add some examples using drupal:path and drupal:path:wildcard']['item'] = array(
    '#type' => 'item',
    '#markup' => 'TODO' . '<pre>
</pre>',
  );
  $form['themekey_help_examples']['Select a theme for Firefox 3.0.x, but not Firefox 3.5.x'] = array(
    '#type' => 'fieldset',
    '#title' => t('Select a theme for Firefox 3.0.x, but not Firefox 3.5.x'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['Select a theme for Firefox 3.0.x, but not Firefox 3.5.x']['item'] = array(
    '#type' => 'item',
    '#markup' => t('Cascade following Theme Switching Rules:') . '<pre>
Property: system:user_browser_simplified
Operator: =
Value: Mozilla Firefox

  Property: system:user_browser
  Operator: >
  Value: Mozilla Firefox 3.0

    Property: system:user_browser
    Operator: <
    Value: Mozilla Firefox 3.5
</pre>',
  );
  $form['themekey_help_examples']['Select a theme for IE 6'] = array(
    '#type' => 'fieldset',
    '#title' => t('Select a theme for IE 6'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['Select a theme for IE 6']['item'] = array(
    '#type' => 'item',
    '#markup' => t('Cascade following Theme Switching Rules:') . '<pre>
Property: system:user_browser_simplified
Operator: =
Value: Internet Explorer

  Property: system:user_browser
  Operator: >
  Value: Internet Explorer 6

    Property: system:user_browser
    Operator: <
    Value: Internet Explorer 7
</pre>',
  );
  $form['themekey_help_examples']['Select a theme for Christmas 2009'] = array(
    '#type' => 'fieldset',
    '#title' => t('Select a theme for Christmas 2009'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['Select a theme for Christmas 2009']['item'] = array(
    '#type' => 'item',
    '#markup' => t('Cascade following Theme Switching Rules:') . '<pre>
Property: system:date
Operator: >
Value: 2009-12-24

  Property: system:date
  Operator: <
  Value: 2009-12-27
</pre>',
  );
  $form['themekey_help_examples']['Select a theme for New Year 2010'] = array(
    '#type' => 'fieldset',
    '#title' => t('Select a theme for New Year 2010'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['Select a theme for New Year 2010']['item'] = array(
    '#type' => 'item',
    '#markup' => t('Create a Theme Switching Rule:') . '<pre>
Property: system:date
Operator: =
Value: 2010-01-01
</pre>',
  );
  $form['themekey_help_examples']['Select a theme dedicated for your start page (front page, index page, ...)'] = array(
    '#type' => 'fieldset',
    '#title' => t('Select a theme dedicated for use on your start page (front page, index page, ...)'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['themekey_help_examples']['Select a theme dedicated for your start page (front page, index page, ...)']['item'] = array(
    '#type' => 'item',
    '#markup' => t('Create a Theme Switching Rule:') . '<pre>
Property: drupal:is_front_page
Operator: =
Value: true
</pre>',
  );
  return $form;
}