Community Documentation

How to show TinyBox Splash on Certain Browser

Last updated December 30, 2012. Created by drupalisme on December 30, 2012.
Log in to edit this page.

On certain device you may want to enable and disable Splah screen by TinyBox. In example, you may want to show TinyBox on Firefox browser but hide it when Symbian browser detected.

In this example we want to show TinyBox Splash screen only on Firefox browser:

  1. Go to TinyBox Configuration page
  2. Select Show on which this PHP code returns TRUE (experts only)
  3. Enter these code below:
    <?php
     
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') == FALSE) {
        return
    0;
      }
      else {
        return
    1;
      }
    ?>

About this page

Drupal version
Drupal 7.x
Audience
Contributors, Designers/themers, Programmers, Site administrators
Level
Intermediate, Advanced
Keywords
tinybox

Site Building Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.