How to design wap2 version for my site? Or there is any mod for it?
If you know CSS you can change the design in "Themes/default/css/wireless.css" I believe.
Bro i dont know css, is there any mod to do this work?
Wap2 is already available once smf is installed. Just check the very bottom of any page, you'll see a link 'WAP2' that can be clicked.
QuoteSMF 2.0.2 | SMF © 2011, Simple Machines
XHTML RSS WAP2
Quote from: geek_andy on February 23, 2012, 09:41:26 AM
If you know CSS you can change the design in "Themes/default/css/wireless.css" I believe.
Anyone can confirm this?
Quote from: hcfwesker on February 23, 2012, 04:01:39 PM
Wap2 is already available once smf is installed. Just check the very bottom of any page, you'll see a link 'WAP2' that can be clicked.
QuoteSMF 2.0.2 | SMF © 2011, Simple Machines
XHTML RSS WAP2
yeah i know the link is available. But we have to customize the wap mode by ourself to use it....
Ok I got the wap2 theme and the mod.
http://custom.simplemachines.org/themes/?lemma=2035
But, is there any other theme for wap mode??
As far as i know, there are three themes for smf. I dont remember the urls but i can tell the names so that you can search them.
1. Curve
2.Smf4mobile
3.smf4iphone
the curve one has one benefit that its author has released an auto switching mod, so whenever a mobile user visit your site, he will be automatically shown the curve theme, while desktop users can still enjoy your main theme.
Smf itself has three versions for handheld device.
1. Wml version at example.com?wap1
2.wap 2.0 version at example.com?wap2
3. Iphone version at example.com?imode
i think we need a theme like gomobile created for mybb, if some one create like that, it will help us all very much, or if smf team brings a mobile theme which has registration feature, attachments capabilities and showing avators in posts, posts counts etc then it will be much help full. Because due to mobile browsers, people are able to use websites with huge pages so the mobile themes should have a twist.
There's also SMF4Mobile , which is a paid theme. I have it and it's great. even auto-detects mobile devices. http://smf-media.com/smf4mobile/
How can I disable the wap1 theme?? I want to use wap2 theme instead of wap1. please help
Theme can be switched via the url, use wap2 at end of url instead of wap1 . More over you can edit wap links in themes/theme_name/index.template.php folder under copyright section
I know about the links, i'm asking how to completely disable the wap1 theme, and want to use wap2 theme instead of wap1
You can try what I did to remove wap1 and wap2 access from my site.
in the root file index.php
Find
if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));
Replace with
if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));
That should remove Wap1 access.
I dont think removing wap1 version will help in any way instead it may cause a decrease in mobile traffic. Any how as you wish
Thanks. It disabled my wap1 mode. But now the browser like ucweb doesnt detecting the wap2 mode, which was previously detecting wap1 mode automatically.
bump. hey please help, how to add automatic detection of wap2 mode by ucweb.
I think instead of removing (isset($_REQUEST['wap'])
Replace it with
isset($_REQUEST['wap2']) so you will have two wap2 parameters.and one imode, i am not php expert , i think hcfwesker can tell weather having to same parameters declared will cause error or not, if if doesnt hurt any thing, then ucweb will redirect to wap2 but remember that opera mini isnt detected as wireless and is served by web version
I'll research this tomorrow, you can do a dirty yet quick check with $context['browser'].
Okay, fiddled with this, though it won't work for an odd reason:
Before this:
// Some settings and headers are different for wireless protocols.
Add:
// Using an iPhone or Android device? Lets get something WORKING, man!
if ($context['browser']['is_iphone'] or $context['browser']['is_android'])
redirectexit($scripturl . '?wap2');
When you use an android with Opera browser, that script will be able to recognize it?
I don't have an android, but I have and old E65 with opera-mini, and the wap or imode form never get showed
Quote from: distante on March 01, 2012, 11:48:56 AM
When you use an android with Opera browser, that script will be able to recognize it?
I don't have an android, but I have and old E65 with opera-mini, and the wap or imode form never get showed
That would require use of the $context['browser']['is_opera'] parameter, and I dunno if both [is_android'] and ['is_opera'] get set when Opera Mini is used.
Though the script doesn't work yet, it doesn't do what is expected.
I think the reason that opera isnt served by wap version is that opera min is detected as opera (web browser). I am sorry i dont have android as my father told me that he will buy me a smart phone when i pass the entry test of medical college. So i will inform you new year :-)
Quote from: pkrack on March 01, 2012, 02:17:25 PM
I think the reason that opera isnt served by wap version is that opera min is detected as opera (web browser). I am sorry i dont have android as my father told me that he will buy me a smart phone when i pass the entry test of medical college. So i will inform you new year :-)
http://www.useragentstring.com/pages/Opera%20Mini/
That page tells me that Opera Mini can't be identified by OS, only by "Opera".
I have an iPod touch with Opera Mini installed, I'll check it in a moment.
Bro i want to redirect ucweb browser to wap2 mode..
Oh sorry, your problem got covered in our discussion. So have you changed wap to wap2 i.e not deleting them but changing them . Another idea which sprang up in my mind is that you can edit wireless.template.php and in section declared as wap1 , change the css file path to wap2 css . I think it will work if both css have classes with same name and if a single css file is called by both versions then then it wouldnt work.
Please tell me the complete procedure...
hello please help...
So here is the wap code in index.php // Determine if this is
using WAP, WAP2, or
imode. Technically, we
should check that wap
comes before
application/xhtml or
text/html, but this
doesn't work in practice
as much as it should.
if (isset($_REQUEST
['wap']) || isset
($_REQUEST['wap2']) ||
isset($_REQUEST
['imode']))
unset($_SESSION
['nowap']);
elseif (isset($_REQUEST
['nowap']))
$_SESSION['nowap'] =
true;
elseif (!isset($_SESSION
['nowap']))
{
if (isset($_SERVER
['HTTP_ACCEPT']) &&
strpos($_SERVER
['HTTP_ACCEPT'],
'application/
vnd.wap.xhtml+xml') !==
false)
$_REQUEST['wap2'] = 1;
elseif (isset($_SERVER
['HTTP_ACCEPT']) &&
strpos($_SERVER
['HTTP_ACCEPT'], 'text/
vnd.wap.wml') !==
false)
{
if (strpos($_SERVER
['HTTP_USER_AGENT'],
'DoCoMo/') !== false ||
strpos($_SERVER
['HTTP_USER_AGENT'],
'portalmmm/') !==
false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
}
}
if (!defined('WIRELESS'))
define('WIRELESS', isset
($_REQUEST['wap']) ||
isset($_REQUEST
['wap2']) || isset
($_REQUEST['imode']));
i copied it so that if some buddy dont know about the code but still is an expert , can help you. I dont think its related with $_request[wap] in first kind as it works when some body use wap in url, i think all the work is done by if (strpos($_SERVER
['HTTP_USER_AGENT'],
'DoCoMo/') !== false ||
strpos($_SERVER
['HTTP_USER_AGENT'],
'portalmmm/') !==
false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
so if we change $_REQUEST['wap'] to $_REQUEST['wap2'] in the second code then it might work.
One thing you should do is to create a copy of index.php with some other name and do all experiments there, as no body is perfect and some time a very simple code can cause huge problems for you. So if some thing gets wrong , your site will still be safe
Ok problem solved..
I have replaced
Quoteif (isset($_REQUEST['nowap']))
$_SESSION['nowap'] = true;
elseif (!isset($_SESSION['nowap']))
{
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
$_REQUEST['wap2'] = 1;
elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
{
if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
}
}
with
Quote
if (isset($_REQUEST['nowap']))
$_SESSION['nowap'] = true;
elseif (!isset($_SESSION['nowap']))
{
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
$_REQUEST['wap2'] = 1;
elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
{
if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
}
elseif(preg_match('/Opera Mini/i',$_SERVER['HTTP_USER_AGENT']))
$_REQUEST['wap2'] = 1;
}
Now ucweb is automatically detecting wap2 mode..
thanks all
Thanks God. Your simple but yet complicated problem got solved