Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Auto Redirect to wap, wap2, or imode When Using Mobilephone

Aloittaja tooman, kesäkuu 29, 2009, 08:04:17 IP

« edellinen - seuraava »

tooman

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

N3RVE

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]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman

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?

N3RVE

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]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman


N3RVE

That looks great, let us know if it works for you :)

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman


N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman


N3RVE

./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]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman

wow, im trying than mark this topic as solved, thx guys :x

tooman

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

N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman


Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

tooman


N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman

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

N3RVE

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]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Lainaa"Somewhere, something incredible is waiting to be known." - Carl Sagan

tooman

i'm tryng on my localhost,

when using operamini > redirect to wap2 automatically > but can't view desktop version :)

Advertisement: