dear SMF expert
i'm using my phone (with operamini) to access my forum, and this home :)
i've edit my wireless.template.php, so i can do simple moderate (quote, edit, remove, stick, lock) and quick reply etc - its fantastic forum software
is it possible (and how) to adding some script that can auto redirect to wap when i'm using phone (and operamini) like vbulletin mobile ? it will be great, no more vb, phpbb, ipb! just SMF :)
regard
tooman
SMF automatically redirects to wap / wap2 or imode depending on the mobile phone it detects. However, when the mobile device can load the full page, it will serve that instead of the mobile version. For example, My Nokia E71 returns the full page so I have to manually add ?wap2 to the end of the URL to load the mobile pages to cut the charges.
-[n3rve]
how about opera mini? it can load full page, but load big page is painful, wap view is better for small screen. how can i edit it?
Lainaus käyttäjältä: Arantor - kesäkuu 30, 2009, 08:59:52 IP
When you first browse to the forum, add ;wap to the end of the URL.
..and you'll have mini pages served throughout that session. If you require additional assistance, let us know :)
-[n3rve]
i mean it should like mobility.mobi (they using vb)
That looks great, let us know if it works for you :)
-[n3rve]
wow, i dont know it available :o
i'll try, thx guys
Updates?
-[n3rve]
where i find it? i dont know :st
./Index.php
Replace:
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
With:
if ((isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) || isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']))
-[n3rve]
wow, im trying than mark this topic as solved, thx guys :x
it work, forces operamini to use wap2, when i click desktop button (in my wap) it still show wap2 :(
one more question, how to solve this (no force to show wap if i click desktop versio)
thx for help me guys
Attach ./Themes/../Wireless.template.php
-[n3rve]
it will be like http://forum.com/display=fullsite
im sorry, im too stupid to do it :(
Attaching the Wireless.template.php would help.
Lainaus käyttäjältä: [n3rve] - heinäkuu 05, 2009, 05:34:04 IP
Attach ./Themes/../Wireless.template.php
-[n3rve]
i'll attach if using my PC
Do you still require assistance?
-[n3rve]
i'm still using my phone mr. n3rv3
i just want my site can redirect to wap2 when using operamini, but not force, i still can view desktop version, with code you give above, i will only view wap2 if using operamini
maybe it will like 'swith to full' in wordpress mobile
I don't get it, when I visit your forum (http://mig33pantura.com/) using Firefox / Opera, it loads the Desktop version.
Not tried with an Opera mini browser, but since you say it works, isn't that what you want? I don't quite get it.
-[n3rve]
i'm tryng on my localhost,
when using operamini > redirect to wap2 automatically > but can't view desktop version :)
I don't see how attaching the file is a problem.
-[n3rve]
n3rve am having a similar issue on my site i want autoRedirect to wap2 for operamini users and not to force operamini to wap2
please do not bump old topics and please use a separate topic for each issue, this topic belongs to someone else.
here is the code to replace in you index.php
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;
}