Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Template change based on a Theme
techu Offline
Member
***
Posts: 154
Joined: Sep 2010
Post: #2
RE: Template change based on a Theme
may be you can use php in templates  and then in the xthread template you can write something like this:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$useragents = array ( 
'Palm' ,
'Nokia' ,
'Samsung' ,
'Motorola' ,
'iPhone' ,
'iPad' ,
'Smartphone', 
'Windows CE' ,
'Blackberry' ,
'WAP' ,
'SonyEricsson',
'PlayStation Portable', 
'LG', 
'MMP',
'OPWV',
'Symbian',
'EPOC',

); 

foreach ( $useragents as $useragents )
{
 if(strpos($_SERVER['HTTP_USER_AGENT'], $useragents) !== false)
	{
		$ismobile = 1;
	}
}
if(strpos($_SERVER['HTTP_ACCEPT'], "text/vnd.wap.wml") !== false)
         {
                $ismobile = 1;
         }

if($ismobile == 1)
       {
              //mobile compatible template
        }
else
       {
             //pc compatible templates
      } 


[Image: banner.png]
(This post was last modified: 02-28-2011 12:35 AM by techu.)
02-28-2011 12:25 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Template change based on a Theme - leefish - 02-27-2011, 07:24 PM
RE: Template change based on a Theme - techu - 02-28-2011 12:25 AM

 Standard Tools
Forum Jump: