TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 582
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

[bug] Blocks show on Mobile / Wap version

Started by gijs, April 07, 2008, 10:51:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gijs

Hmmm, just converted to TP 1.0.5 beta 1 and find out the the mobile version of my site displays my blocks while this wasn't the case with TP 0.9.7.

The mobile site is displayed by adding ;wap2 to the url. I see a 'lean' version of the site, so that is good, but also my blocks are shown, which isn't good.

How can I change this? Not sure if it's a bug or a setting that I need to change somewhere?

Zetan

Blocks are displayed differently in TP 1 than they were in TP 0.9.X.
No work has been done to make it WAP compliant yet.

gijs

Ah, ok. I label it as a 'bug' then.
Thanks for replying.

gijs


Zetan


gijs

Any idea where to look (in what file) to fix this? If have no idea how I can 'hide' the blocks/panels in the mobile version. Can this be done in wireless.css ?

Smoky

I have posted this here somewhere, but cant find it, so this is a re post!! (searching, you would have found it)

but here it is again:




<?php
//Configuration
global $userBrowser;

// Your wapsite
//enter the link you want user to be redirected in case of WML browser
$wmllink = "http://wap.twistedgraffix.com/main/";

// Your website
//enter the link you want user to be redirected in case of PC browser
$htmllink = "http://www.Twistedgraffix.com";

//There is no need to edit any information from this point on
//however in case if you want to contribute please do so
//please be sure to let me know about the changes
//Detect the browser
$userBrowser = $_SERVER['HTTP_USER_AGENT']; 

//Remove the below // qutoes.
//It helps to check if there is any error when editing
//If everything is all right it will display the browser information
//please remember to put // back after testing or no redirection will occur
//echo $userBrowser;

//Check for Mozilla
if(stristr($userBrowser, 'Mozilla')) 
{
  
$ub="PC";
}
//Check for Mozilla
elseif(stristr($userBrowser, 'gecko')) 
{
  
$ub="PC";
}
//Check for opera
elseif(stristr($userBrowser, 'opera')) 
{
  
$ub="PC";
}
//Check for omniweb
elseif(stristr($userBrowser, 'omniweb')) 
{
  
$ub="PC";
}
//Check for msie
elseif(stristr($userBrowser, 'msie')) 
{
  
$ub="PC";
}
//Check for konqueror
elseif(stristr($userBrowser, 'konqueror')) 
{
  
$ub="PC";
}
//Check for safari
elseif(stristr($userBrowser, 'safari')) 
{
  
$ub="PC";
}
//Check for netpositive
elseif(stristr($userBrowser, 'netpositive')) 
{
  
$ub="PC";
}
//Check for lynx
elseif(stristr($userBrowser, 'lynx')) 
{
  
$ub="PC";
}
//Check for elinks
elseif(stristr($userBrowser, 'elinks')) 
{
  
$ub="PC";
}
//Check for Mozilla
elseif(stristr($userBrowser, 'Mozilla')) 
{
  
$ub="PC";
}
//Check for links
elseif(stristr($userBrowser, 'links')) 
{
  
$ub="PC";
}
//Check for w3m
elseif(stristr($userBrowser, 'w3m')) 
{
  
$ub="PC";
}
//Check for webtv
elseif(stristr($userBrowser, 'webtv')) 
{
  
$ub="PC";
}
//Check for amaya
elseif(stristr($userBrowser, 'amaya')) 
{
  
$ub="PC";
}
//Check for dillo
elseif(stristr($userBrowser, 'dillo')) 
{
  
$ub="PC";
}
//Check for ibrowse
elseif(stristr($userBrowser, 'ibrowse')) 
{
  
$ub="PC";
}
//Check for icab
elseif(stristr($userBrowser, 'icab')) 
{
  
$ub="PC";
}
//Check for crazy browser
elseif(stristr($userBrowser, 'crazy browser')) 
{
  
$ub="PC";
}
//Check for IE
elseif(stristr($userBrowser, 'internet explorer')) 
{
  
$ub="PC";
}
//If it's not any of the above browsers
//Then it gotta be a WML or very unpopular browser
else
{
  
$ub="WML";
  }
//Code for redirecting based upon the results
if($ub == "PC") {
    
header("Location: ".$htmllink);
    exit;
    }
    else 
    {
    
header("Location: ".$wmllink);
    exit;
    }
    
?>




if you place this in the root, meaning like this:

in the ftp go to your site, then to public_html:

copy and save the above as index.php

good luck...

This website is proudly hosted on Crocweb Cloud Website Hosting.