Wap access to Wiki
Author : Jbuenol
From TechnologicalWiki
Nowadays, a connection from a PC, is the most usual way to access a Wiki. The number people who use their phones to access Internet services is growing. In this way, there are a lot phones which they cannot show the information received from this services due to its web technology. Wap gives the possibility to the phone for accessing these services and it allow showing the output in a clear way.
Contents |
[edit] Posibilities to access using Wap
Several ways have been tested to introduce Wap access in this mediaWiki.
1st. WikiMob App.
2nd. HawHaw access & HawPedia Project.
[edit] WikiMob
WikiMob is a Java client which the user must install in the phone to get access to the Wiki. The user only can access to the Wiki for reading data.
[edit] HAWHAW Platform
HAWHAW stands for HTML and WML hybrid adapted Webserver and is a toolkit to create universal mobile applications.
- The HAWHAW toolkit comprises 4 components:
- hawhaw.inc - The PHP class library
- HAWHAW XML - The markup language
- HAWXY - The HAWHAW proxy for HAWHAW XML documents
- HawTags - The HAWHAW JSP Tag Library
- HAWHAW creates the following markup languages for a wide range of mobile devices:
- HTML
- WML 1.x
- XHTML Mobile Profile (WAP 2.0)
- iMode (cHTML)
- HDML
- MML
- VoiceXML
- HAWHAW supports the following browsers (list is not complete):
- Internet Explorer, Firefox, Opera, Safari, Lynx
- Cellphone browsers (WAP)
- Smartphone browsers (WAP 2.0)
- PDA browsers
- Opera Mini
- AvantGo
- iPhone
- Android
- Minimo
- PIE
- Blackberry
- Nintendo DS
- Further characteristics:
- Built-in device simulator (requires neither Java nor Javascript)
- Barrier-free output
- dot-mobi compliant
- W3C mobileOK compliant
- Open Source
Any application can be implemented either with the HAWHAW class library, with HAWHAW XML or with the HawTags JSP tag lib. The result of all approaches is the same.
[edit] Components
1. hawhaw.inc lib provides methods to create a new translated page depending of the request format of the browser.
2. HAWHAW XML provides of a valid schema to create web applications multi-protocol. These files will be the input of the HAWXY ( proxy translator ) which will send the response translated.
3. HAWXY is a proxy used to translate the XML format from server to a response which can be shown by the browser (WAP,HTML, etc ...).
4. HawTags is a JSP (Java Server Pages) custom tag library according to the Java Servlet Specification. With HawTags Java developers can write HAWHAW-based web applications and deploy them on servlet containers like Resin or Tomcat. The HawTags Java code is a wrapper on top of the hawxy.php software. The HawTags tag library creates a temporary HAWHAW XML document from a JSP page and transforms it to appropriate markup output by means of hawxy.php and hawhaw.inc.
[edit] HAWPEDIA Project
HawPedia provides access to Wikipedia articles on-the-go. Nearly all kind of cellphones (WAP, iMode, XHTML), smartphones and PDA's are supported. HawPedia is designed to supported multiple languages and tries to detect automatically the preferred language. In the settings menu it is possible to switch between languages manually. If you want to start HawPedia with a given language you can click over the following link:
The "Haw" in HawPedia stands for "HTML and WML" or for "hybrid adapted webserver". HawPedia is powered by the HAWHAW library and has been written as reference application for this PHP library.
Now, There is a project based in HawPedia in SVN repository in MediaWiki. You can download it to use in your projects. This Wiki uses this way to access from phones. Download Hawpedia from SVN
[edit] Adapting HAWPEDIA for accesing mediaWiki
When you have downloaded the HawPedia project source to your computer, you will have a directory which will contain the files and directories as shown in Figure 1. This directory must be linked by Web Server.
If you write in the web browser of your phone the url of the index.php file you can see a screen as shown in Figure 2.
If you use this project without do any change, the articles will be catched from the Wikipedia web. To change the articles source from the Wikipedia to other Wiki you have to do some modifications in the source code. At least, you must change the URL to the API of the following files :
hawpedia.php File
In export_wikipedia and search_articles functions , replace :
$url = "http://$lang.wikipedia.org/w/api.php?" .
http_build_query( array( 'action' => 'query',
'prop' => 'revisions',
'titles' => $searchTerm,
'rvprop' => 'content',
'redirects' => 'true',
'format' => 'php' ),
'',
'&'
);
by :
$url = "http://<domain_server_where_your_wiki_is>/w/api.php?" .
http_build_query( array( 'action' => 'query',
'prop' => 'revisions',
'titles' => $searchTerm,
'rvprop' => 'content',
'redirects' => 'true',
'format' => 'php' ),
'',
'&'
);
image.php File
In body, replace :
$url = "http://$lang.wikipedia.org/w/api.php?" . http_build_query($queryProps, '', '&');
by :
$url = "http://<domain_server_where_your_wiki_is>/w/api.php?" . http_build_query($queryProps, '', '&');
Your HawPedia application can read articles from your MediaWiki now. For each article, it will be show all images and the text, including all links to other pages. Visualization of portals is not supported currently.




