Contributions API

Calling all Drupal developers!

Help us get this on the first page of Digg. DIGG NOW!

Modules in 6

devel_themer_popup

Definition

devel_themer_popup()
contributions/devel/devel_themer.module, line 448

Description

Return the popup template placed here for easy editing

Code

<?php
function devel_themer_popup() {
  $majorver = substr(VERSION, 0, strpos(VERSION, '.'));

  // add translatable strings
  drupal_add_js(array('thmrStrings' =>
    array(
      'themer_info' => t('Themer info'),
      'toggle_throbber' => ' <img src="'. base_path() . drupal_get_path('module', 'devel'). '/loader-little.gif' .'" alt="'. t('loading') .'" class="throbber" width="16" height="16" style="display:none" />',
      'parents' => t('Parents: '),
      'function_called' => t('Function called: '),
      'template_called' => t('Template called: '),
      'candidate_files' => t('Candidate template files: '),
      'candidate_functions' => t('Candidate function names: '),
      'drupal_api_docs' => t('link to Drupal API documentation'),
      'source_link_title' => t('link to source code'),
      'function_arguments' => t('Function Arguments'),
      'template_variables' => t('Template Variables'),
      'file_used' => t('File used: '),
      'duration' => t('Duration: '),
      'api_site' => variable_get('devel_api_site', 'http://api.drupal.org/'),
      'drupal_version' => $majorver,
      'source_link' => url('devel/source', array('query' => array('file' => ''))),
    ))
    , 'setting');

  $title = t('Drupal Themer Information');
  $intro = t('Click on any element to see information about the Drupal theme function or template that created it.');

  $popup = <<<EOT
  <div id="themer-fixeder">
  <div id="themer-relativer">
  <div id="themer-popup">
      <div class="topper">
        <span class="close">X</span> $title
      </div>
      <div id="parents" class="row">

      </div>
      <div class="info row">
        <div class="starter">$intro</div>
        <dl>
          <dt class="key-type">

          </dt>
          <dd class="key">

          </dd>
          <div class="used">
          </div>
          <dt class="candidates-type">

          </dt>
          <dd class="candidates">

          </dd>
          <div class="duration"></div>
        </dl>
      </div><!-- /info -->
      <div class="attributes row">

      </div><!-- /attributes -->
    </div><!-- /themer-popup -->
    </div>
    </div>
EOT;

  drupal_add_js(array('thmr_popup' => $popup), 'setting');
}
?>