You are here

function popup_test_content in Popup 6.x

Same name and namespace in other branches
  1. 7 modules/popup_test/includes/popup_test.pages.inc \popup_test_content()
  2. 7.x modules/popup_test/includes/popup_test.pages.inc \popup_test_content()

Popup test content page

1 string reference to 'popup_test_content'
popup_test_menu in modules/popup_test/popup_test.module
Implementation of hook_menu

File

modules/popup_test/includes/popup_test.pages.inc, line 122

Code

function popup_test_content() {
  module_load_include('inc', 'popup', 'includes/popup.api');
  $firstnode = db_result(db_query("SELECT nid FROM {node} LIMIT 1"));
  $rendered = 'Text: Some text ' . popup(array(
    'text' => 'This is popup text',
    'activate' => 'click',
  )) . ' and some more text.<br />' . 'Node: Some text ' . popup(array(
    'node' => $firstnode,
    'activate' => 'click',
    'width' => 450,
  )) . ' and some more text.<br />' . 'Block: Some text ' . popup(array(
    'block' => TRUE,
    'module' => 'user',
    'delta' => 3,
    'activate' => 'click',
  )) . ' and some more text.<br />' . 'Form: Some text ' . (module_exists('search') ? popup(array(
    'form' => 'search_form',
    'activate' => 'click',
    'width' => 450,
  )) : '[Search module not enabled, skipping form test.]') . ' and some more text.<br />' . 'View: Some text ' . (module_exists('views') ? popup(array(
    'view' => 'tracker',
    'activate' => 'click',
    'width' => 500,
  )) : '[Views module not enabled, skipping view test.]') . ' and some more text.<br />' . 'PHP: Some text ' . popup(array(
    'php' => 'return "Some php generated text: ' . date('d-M-Y', time()) . ' ";',
    'activate' => 'click',
  )) . ' and some more text.<br />' . 'Menu: Some text ' . popup(array(
    'menu' => 'navigation',
    'origin' => 'top-right',
    'expand' => 'bottom-right',
  )) . ' and some more text.<br />';
  return $rendered;
}