tapatalk statistics piwik

copy file PiwikTracker.php from piwik directory
libs/PiwikTracker/PiwikTracker.php
to yours tapatalk plugin
add on mobiquo/mobiquo.php
following lines before line with “exit”:

$idSite = 1;//set up your site id from piwik
$piwikUrl = ‘http://www.yourUrls.tld/piwikPath/’; //remember to update
$piwikToken = ‘123456’; //copy it from piwik site settings

$useragent = @$_SERVER[‘HTTP_USER_AGENT’];
$useragent = str_replace(“Mozilla/5.0 Firefox/3.5.6 Tapatalk/”, “Mozilla/5.0 Tapatalk/”, $useragent);
$remoteip = getenv(‘REMOTE_ADDR’);
$method = $context[‘mob_request’][‘method’];

require_once(‘./PiwikTracker.php’);
PiwikTracker::$URL = $piwikUrl;
$t = new PiwikTracker( $idSite, $piwikUrl);
$t->setCustomVariable( 1, frontend, tapatalk, visit );
$t->setCustomVariable( 3, Tapatalk, Tapatalk, visit );
$t->setUserAgent( $useragent );
$t->setBrowserHasCookies(true);
$t->setPlugins($flash = false, $java = false, $director = false);
if (!empty($remoteip)) { $t->setIp( $remoteip ); }
$t->setTokenAuth( $piwikToken );
$t->doTrackPageView( “On Tapatalk ” . $method );

wordpress plugin

add custom menu to backend / admin dashboard

add_action( 'admin_menu', 'register_my_custom_menu_page' );

function register_my_custom_menu_page(){
add_menu_page(
'page title',
'menu Title',
'manage_options',
'my_custom_menu',
'my_custom_menu_page',
'',
101
);
add_submenu_page(
'my_custom_menu',
'page subtitle',
'sub menu',
'manage_options',
'my_custom_submenu',
'my_custom_submenu_page'
);
add_submenu_page(
'my_custom_menu',
'page subtitle2',
'sub menu2',
'manage_options',
'my_custom_submenu2',
'my_custom_submenu_page2'
);
}
function my_custom_menu_page()
{
echo "Admin Page Test";
}
function my_custom_submenu_page()
{
echo "Admin SUB Page Test";
}

function my_custom_submenu_page2()
{
echo "Admin SUB Page 2";
}

select

mam jakis sentyment do tej funkcji zwracajacej htmlowego selecta

<?PHP

function selectTabs($selName, $tabs, $id, $cssLen=NULL)
{
  if ($css_len==NULL) $size = '150px';
  unset($sel);
  $select.='<select name="'.$selName.'" style="width:'.$cssLen.';" >';
  $select.="n";
  $select.='<option value="">'."</option>n";
  if ( count($tabs)>0)
  {
    foreach ($tablica as $key => $value) {
        $select.='<option ';
        if (trim($id) == trim($key)){ $select.=' selected ';}
          $select.='value="'.$key.'">'.$value."</option>n";
    }
    $select.='</select>';
    return $select;
  }
}
?>