You are here

function splashify_display_splashtext in Splashify 6

Same name and namespace in other branches
  1. 7 splashify.display.inc \splashify_display_splashtext()

Display the What: Content either in the site template or full screen.

Return value

string If the $what_mode equals 'template', returns the string entered into $what_content_value. If $what_mode equals 'fullscreen', it displays the text right there and exits the request.

1 string reference to 'splashify_display_splashtext'
splashify_menu in ./splashify.module
Implements hook_menu().

File

./splashify.display.inc, line 297
Handles displaying the splash page.

Code

function splashify_display_splashtext() {
  $config = _splashify_get_config();
  $when_frequency = $config['when_frequency'];
  $where_page = $config['where_page'];
  $where_listpages = $config['where_listpages'];
  $what_mode = $config['what_mode'];
  $what_content = $config['what_content'];
  $what_content_value = $config['what_content_value'];
  $what_content_title = $config['what_content_title'];
  $how_mode = $config['how_mode'];
  $how_size = $config['how_size'];
  if ($what_mode == 'template') {

    // Display what they entered in the field in the site template.
    if (!empty($what_content_title)) {
      drupal_set_title($what_content_title);
    }
    return $what_content_value;
  }
  elseif ($what_mode == 'fullscreen') {

    // Display what they entered in the field as a full page.
    print $what_content_value;
    exit;

    // drupal_exit() is only for D7
  }
}