Esempio n. 1
0
function touch_theme_page($title, $content)
{
    $body = theme('menu_top');
    $body .= $content;
    $body .= theme('google_analytics');
    ob_start('ob_gzhandler');
    header('Content-Type: text/html; charset=utf-8');
    echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<meta name="viewport" content="width=device-width; initial-scale=1.0;" />
				<title>', $title, '</title>
				<base href="', BASE_URL, '" />
				' . theme('css') . '
			</head>
			<body id="thepage">';
    //To display adverts, download the admob code from, well, admob :-)
    if (file_exists("common/admob.php")) {
        echo '<div class="advert">';
        require_once "common/admob.php";
        echo '</div>';
        echo $body;
        echo '<div class="advert">';
        echo admob_request($admob_params);
        echo '</div>';
    } else {
        echo $body;
    }
    echo '</body>
		</html>';
    exit;
}
Esempio n. 2
0
function theme_page($title, $content)
{
    $body = theme('menu_top');
    $body .= $content;
    $body .= theme('menu_bottom');
    $body .= theme('google_analytics');
    if (DEBUG_MODE == 'ON') {
        global $dabr_start, $api_time;
        $time = microtime(1) - $dabr_start;
        $body .= '<p>Processed in ' . round($time, 4) . ' seconds (' . round($api_time / $time * 100) . '% waiting for Twitter\'s API)</p>';
    }
    if ($title == 'Login') {
        $title = 'mobile Twitter Login';
        $meta = '<meta name="description" content="Free open source alternative to mobile Twitter, bringing you the complete Twitter experience to your phone." />';
    }
    ob_start('ob_gzhandler');
    header('Content-Type: text/html; charset=utf-8');
    echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<title>', $_SERVER['SERVER_NAME'], ' - ', $title, '</title>
				<base href="', BASE_URL, '" />
				' . $meta . theme('css') . '
				<meta name="viewport" content="width=device-width; initial-scale=1.0;" />
			</head>
			<body>';
    //To display adverts, download the admob code from, well, admob :-)
    if (file_exists("common/admob.php")) {
        echo '<div class="advert">';
        require_once "common/admob.php";
        echo '</div>';
        echo $body;
        echo '<div class="advert">';
        echo admob_request($admob_params);
        echo '</div>';
    } else {
        echo $body;
    }
    echo '</body>
		</html>';
    exit;
}
  <?php 
// AdMob Publisher Code
// Language: PHP (fsockopen)
// Version: 20081105
// Copyright AdMob, Inc., All rights reserved
// Documentation at http://developer.admob.com/wiki/Main_Page
global $wptouch_pro;
$settings = $wptouch_pro->get_settings();
$admob_params = array('PUBLISHER_ID' => $settings->admob_publisher_id, 'AD_REQUEST' => true, 'ANALYTICS_REQUEST' => false, 'TEST_MODE' => false, 'OPTIONAL' => array());
if ($wptouch_pro->is_in_developer_mode()) {
    $admob_params['TEST_MODE'] = true;
}
// Send request to AdMob. To make additional ad requests per page, copy and paste this function call elsewhere on your page.
echo admob_request($admob_params);
/////////////////////////////////
// Do not edit below this line //
/////////////////////////////////
// This section defines AdMob functions and should be used AS IS.
// We recommend placing the following code in a separate file that is included where needed.
function admob_request($admob_params)
{
    static $pixel_sent = false;
    $ad_mode = false;
    if (!empty($admob_params['AD_REQUEST']) && !empty($admob_params['PUBLISHER_ID'])) {
        $ad_mode = true;
    }
    $analytics_mode = false;
    if (!empty($admob_params['ANALYTICS_REQUEST']) && !empty($admob_params['ANALYTICS_ID']) && !$pixel_sent) {
        $analytics_mode = true;
    }
    $protocol = 'http';
Esempio n. 4
0
function admob_ad()
{
    require_once 'common/admob.php';
    return "Admob:" . admob_request($admob_params);
}