| Author |
phpBB WAP Script? Should I try it? |
laffen Joined: Aug 07, 2001 Posts: > 500 From: Oslo, Norway PM |
HTTP_ACCEPT is the magic header to look for:
text/html, application/xml;q=0.9, application/xhtml+xml;image/png, image/jpeg, image/gif, image/x-xbitmap | |
|
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
thank you for you quick reply.
but can you please be more specific about this?
i am a novice php-user, so I am not entirely sure how to use this hint.
thanks. |
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
ok, i've figured out how what does that HTTP_ACCESS variable do. However, how do you know, from what it returns, that my sony ericsson phone is k700i and not T68i for example? you just compare all the possible strings? What is it that gives away the model of the phone?
It's easy to set up the xml / wml use now. Just take a global variable, and use the code that I use now (written below)
Code:
|
global $isxml;
$isxml = 0;
if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ||
stristr($_SERVER["HTTP_USER_AGENT"],"WDG_Validator") ||
stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator") ||
stristr($_SERVER["HTTP_USER_AGENT"],"W3C_CSS_Validator")) {
if(preg_match("/application\/xhtml\+xml;q=0(\.[1-9]+)/i",$_SERVER["HTTP_ACCEPT"],$matches)) {
$xhtml_q = $matches[1];
if(preg_match("/text\/html;q=0(\.[1-9]+)/i",$_SERVER["HTTP_ACCEPT"],$matches)) {
$html_q = $matches[1];
if($xhtml_q >= $html_q) {
$ixml = 1;
}
}
} else {
$isxml = 1;
}
}
// $isxml = = 1 means that we have xML, otherwise we don't have |
|
I can now figure that if the $_SERVER["HTTP_USER_AGENT"] has nokia in it somewhere, the phone must be nokia, so that's how I usually would obtain the brand (there must be a link for the mms settings). But how about the model? :? |
Sentertainment Joined: Jan 04, 2004 Posts: 290 PM, WWW
|
Quote:
|
On 2004-08-24 17:24:01, JohnN4 wrote:
Cool! I am also working on wap forums, but i am basing them on my own system. you can see them at wap.johnex.se.
This message was posted from a Z1010
|
|
Very nice, easy yet fully operational!
Mine goes more in-depth with navigation, plus my new script will be sweet! it'll be called cForums.
I'm tired of telling people about it so just wait til its comes out for more info, all I can say is it's basically run by skins...actually it's run entirely by skins and my skin parsing engine.
----------Sentertainment.net---------- http://www.sentertainment.net/ |
Johnex Joined: Nov 26, 2002 Posts: > 500 From: Stockholm/Sweden PM, WWW
|
Yeah i know what you mean....:-) I was planning on making a wap conversion of the ipb but decided to create a script of my own, adding new functions as feel they are needed. I still have many bugs, but its coming along.
This message was posted from a Z1010 |
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
usually what you want is your web site to be browsable by phone also, not to create something only for phones, when talking about forums.
that is why I think that people should concentrate more on developing stuff for phpBB (or invision, vbulletin for that matter).
|
Sentertainment Joined: Jan 04, 2004 Posts: 290 PM, WWW
|
Quote:
|
On 2004-08-25 12:10:50, Valentiner wrote:
usually what you want is your web site to be browsable by phone also, not to create something only for phones, when talking about forums.
that is why I think that people should concentrate more on developing stuff for phpBB (or invision, vbulletin for that matter).
|
|
Which is what I am doing for my new stuff called cForums!
----------Sentertainment.net---------- http://www.sentertainment.net/ |
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
yes, but you are trying to promote a new type of forum, which will have (as you say) a wap interface also.
what I am saying is that it would be best for the majority to create a phpBB mod, which can be attached to phpBB, easy to config, which would include all this http_access stuff. |
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
ok, so the other key word is http_user_agent, which tells us exactly with what phone are we dealing with :D yey, after 4 days of crawling the web, I have finally managed to obtain this. |
Sentertainment Joined: Jan 04, 2004 Posts: 290 PM, WWW
|
Quote:
|
On 2004-08-26 21:41:20, Valentiner wrote:
yes, but you are trying to promote a new type of forum, which will have (as you say) a wap interface also.
what I am saying is that it would be best for the majority to create a phpBB mod, which can be attached to phpBB, easy to config, which would include all this http_access stuff.
|
|
They are a new type of forums, but they can be used as an add-on...It's more complex than that; it can operate alone or alongside IPB, phpBB, and vBulletin (at least when it's finished it will) or you can just use it as a stand-alone forums!
----------Sentertainment.net---------- http://www.sentertainment.net/ |
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
Too late buddy. I've already developed the phpbbWapGate for full inclusions of phpbb 2.0.x into wap skin.
Features: view posts, bbcode enabled (even on wml 1.1 phones!!), render url links in messages, render active topic links, view / send / delete private messages, edit, reply, quote to posts, auth & cookie permission, detecting of phone (like on esato), and much, much more
You can download it here:
http://www.phpbb.com/phpBB/viewtopic.php?t=224847 |
Sentertainment Joined: Jan 04, 2004 Posts: 290 PM, WWW
|
dude, my wap ipb script wuz an addon! well maybe we could fuse my old script with yours?!
This message was posted from a WAP device |
Valentiner Joined: Aug 23, 2004 Posts: 152 PM |
Quote:
|
On 2004-09-14 05:27:49, Sentertainment wrote:
dude, my wap ipb script wuz an addon! well maybe we could fuse my old script with yours?!
This message was posted from a WAP device
|
| I am still developing. I've added LaTeX render support + a few more config. I have no idea how Invision is written, so I do not know It would be an idea ... |
Sentertainment Joined: Jan 04, 2004 Posts: 290 PM, WWW
|
forgot to say that cForums is new, but wap ipb script was started way before this topic was started...it is way more evolved.
This message was posted from a WAP device |
sergey10 Joined: Nov 01, 2005 Posts: 1 PM |
Hi everyone! I already about month am beaten to has earned script. Russian wap-brousers support wap only in system utf-8. For joint work with wap, I forum itself has too done in utf-8. Skript works, shows all messages. The Problem in here is than...
When do "Quote" or "Edit" then in the form is displayed ready text, which rs with bd, but he is displayed twist;controt. À when writing the new message, he shows here is so:
"0
Posted from a mobile device"
As follows, text becomes encoded, what turned out to be here is so: "html names entities". In several files I have found such pieces:
htmlentities($post_text);
or $post_text = htmlentities($post_text);
But comentaring this, does not help, text don't care remains crooked. Insofar I begin to understand - manages this a file wapheader.php there all and is prescribed, but since I do not know most php, ask to help one, dealt with coding, sql, wap and php.
We Beg pardon for crooked english | |
|
Access the forum with a mobile phone via esato.mobi
|