Welcome Guest ( Log In | Register)



5 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> How To Make A Very Simple Wap Site, A quick tutorial about WML language
emperor
post Jul 27 2005, 02:54 PM
Post #1


Advanced Member
*******

Group: Members
Posts: 105
Joined: 16-April 05
From: Sala Bolognese
Member No.: 5,757



WAP Site Tutorial : How to Make A Wap site?

Before We begin.. Defination from the Web about Wap.
QUOTE
WAP is an open international standard for applications that use wireless communication. Its principal application is to enable access to the Internet from a mobile phone or PDA .A WAP browser provides all of the basic services of a computer based web browser but simplified to operate within the restrictions of a mobile phone. WAP is now the protocol used for the majority of the world's mobile internet sites, known as WAP sites


Wap site Tutorial -
1- CREATE A WML FILE
To create a WML files you can use any html editors (notepad, too) but I suggest Apoo that you can download http://wap.commandus.com/ .
The first thing to do when you create a WML file is to declare the specification of the wml code.

CODE
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">


Now we can start writing the code that will be placed between the tags <WML> and </WML>
The text will be placed between the tags <CARD> and </CARD>
In a single WML page could be more than CARD. Each card has the attribute "ID" that is the name of it.


Wap site Tutorial - 2- TEXT FORMATTING
The difference between WML and HTML here is very little. Simply at the end of each tag must be placed a slash (/).
For example <p align="left"/> or <br/>
You can place the tag <br/> at the beginning of the line, too
About bold, italic and underlined text the WML is equal to HTML: <b> </b> the first, <i> </i> the second and <u> </u> the third.
With tags <small></small> and <big> </big> you can decrease or increase the size of the text.

Wap site Tutorial - 3 - TABLES
Also here the differences are small.
The tag is always <table> </table> but not exist the tag <tbody>
The attributes of <table> are "title" (the title of the table), "align" (C=center, L=left and R=right) and "columns"(the number of the columns, not supported by all mobiles)
This is an example
CODE
<table align="C" title="label" columns="3">
<tr>
<td>col 1</td>
<td>col 2</td>
<td>col 3</td>
</tr>
</table>


Wap site Tutorial - 4- IMAGES
WML files support only one kind of images: .wbmp. On the web you can find many free software that convert images in this format.
Placing an image is very similar to HTML, this is an example:
CODE
<img alt="talt text" src="http://www.asite.com/logo.wbmp" align="middle" height="100" width="100"/>

You can see that the principal difference is that you must place a slash (/) at the end of the tag <img>.
Attributes of align are middle,top and bottom.
There're also special images that require a different tag: for example emoticons and icons.
To load an emoticon (or a icon) you can use "localsrc" instead of "src". Obviusly each emoticon has a name that you can see here. DEVO METTERE IMMAGINE
This is an example:
CODE
<img alt=":)" localsrc="smileyface" />

Here you can find the complete list LIST

Wap site Tutorial - 4- LINKS
An external link is similar to HTML. The tag is <a href=""> </a>
An attribute of <a> is "title", too. By declaring it, you will obtain a better result in some mobile.

This is for a normal link, but if you want a link controlled by mobile keys (for example when you choose "menu" in a mobile), you need another tags.

link is a link made with <a href>, NEXT is made with next tags.
The first is <do> </do>. This tag has two important attribute: "title" and "type". The first is the title that will appear on the mobile (for example "NEXT").
About the second we suggest to write "accept", this mean the pressure of the key.
Then there is the tag <go/> that will be placed between <do> and </do>. It has the attributes "href" and "method". The first is equal to the "href" of <a>. "Method" is equal to the "method" of forms, now we can leave it empty.
This is an example where there is a link that link to another CARD in the same file:
QUOTE
<CARD>
<do type="accept" title="next">
<go href="#CARD2"/>
</do>
<p>
push the key to go to the next view
</p>
</CARD>
<CARD id="CARD2">
<p>
next view.
</p>
</CARD>
You can see that if you would make a link to another CARD you must place a # before the ID of the CARD.

You can replace the tag <go/> with <prev/>, so by pushing the key you will go to the previous view.

Another way to surf the site is using the numeric keybord.
For this exist the attribute "accesskey", it is an attribute of <a> and it can has any value between 0 and 9 (the keys of the mobile)

Wap site Tutorial - 5- FORMS
The code needed to place a text field is similar to HTML, in fact the tag is <input/>.

A particular attribute of <input/> in WML is "emptyok". If it has value equal to "false" the visitor must fill this field.

Another is "format", if you set it "X" all text will be written in capitol letters. If you want that the visitor write only a limited number of chars (all capitol letters) you can set "format" as place the maximum numer of chars before "X" ("10X", "3X", etc..). By replacing "X" with "x" you will obtain the same result with not capitol letters.
An example:
QUOTE
<input name="city" maxlength="2" emptyok="false" format="10X" value="CA" />


Another attribute is "type". If you set this to "password", you'll obtain a password field.

Another element of forms is the multiple choice. It's made with the tags <select> and <option>. The most inportant attribute of select is "multiple", by setting it to "true" you will obtain a radio button (multiple selection allowed), if "false" a check box(multiple selection not allowed).
An example:
QUOTE
<select multiple="true" name="color">
<option value="1">red</option>
<option value="2">yellow</option>
<option value="3">blue</option>
</select>

Wap site Tutorial - 6- A SPLASH SCREEN
With the function <timer> you can create a splash screen. This tag has the attribute "value", this value is the number of seconds*10 (for example, for 5 seconds you must write 50).
Then you must declare the attribute "ontimer", this is an attribute of <CARD> and it explain what must be view in the splash screen.
An example:
QUOTE
<CARD ontimer="welcome.wml">
<timer value="50"/>
<p>this is the homepage</p>
</CARD>


Wap site Tutorial - 7- ADVANCED FEATURE
QUOTE
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="test" ordered="false">
<do type="ACCEPT">
<go method="post" href="http://www.testw.com/cgi">
<postfield name="name" value="$name"/>
<postfield name="surname" value="$surname"/>
</go>
</do>
<do type="options" label="Clear">
<refresh>
<setvar name="name" value=""/>
<setvar name="surname" value=""/>
</refresh>
</do>
<p> Your name: <input title="name" name="name"/>
Your surname: <input title="surname" name="surname"/>
</p>
</card>
</wml>


This code collect many new function of WML
We will start with the attribute "ordered" of <CARD>, if setted to "true" all action will be performed in order as we have typed them. If set to "false" action will follow a hierarchical order.

Then we added the attribute "method" to <go> choosing "post". This mean that informations placed in <postfield value=$xxxx> will be sent to the HTTP server "http://www.testw.com/cgi". These info will be typed by the visitor in the two text fields.

Then we have the tag <do>, its work is to clear the two text fields.

APPENDIX - CHARS

To display & type &
To display $ type $
To display "" type ""
To display ' type &apos
To display < type <
To disply > type >
Note : THIS IS A VERY SMALL AND QUICK GUIDE TO WML, I HAVE LEFT BACK MANY OTHER FUNCTION (AS <ONEVENT>). ANYWAY WITH THIS TUTORIAL YOU CAN EASILY WRITE A SIMPLE BUT FULL FUNCTIONAL WAP SITE WHEN YOU CAN STORE YOUR JAVA GAMES, RINGTONES OR GIVE ADDITIONAL FEATURES TO VISITORS OF YOUR SITE.
Go to the top of the page
 
+Quote Post
Dragonfly
post Jul 27 2005, 06:22 PM
Post #2


Privileged Member
*********

Group: Members
Posts: 702
Joined: 17-February 05
Member No.: 3,817



Very nice tutorial. I haven't thought of attempting to know about xml, but I must face the reality it's all happening all over. I cannot remain muted and take no actions to the changing web languages. In fact, one should know all these.

Thanks for sharing it here. It must have taken much time for you to write down one by one detailly. However, its worth you get the credits and also you are being helpful to members. biggrin.gif
Go to the top of the page
 
+Quote Post
ameribass
post Jul 28 2005, 03:10 PM
Post #3


Super Member
*********

Group: Members
Posts: 264
Joined: 16-April 05
Member No.: 5,768



Thanks a lot for the tutorial. I will be sure to use some of the knowledge that you shared with us in my future webpages.
Go to the top of the page
 
+Quote Post
Saint_Michael
post Aug 3 2005, 01:55 AM
Post #4


$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3
*********************

Group: [HOSTED]
Posts: 6,564
Joined: 21-September 04
From: 9r33|\| 399$ 4|\|D 5P4/\/\
Member No.: 1,218
T17 GFX Crew



hey no spamming admin have been notified about it

but anyways on the backlash (/0 xhtml uses that too now to make hte coding stricting in a sense, but questions is it for the use of cell phoens to display the info on them?.
Go to the top of the page
 
+Quote Post
Adamrosso
post Aug 8 2005, 09:20 AM
Post #5


Advanced Member
*******

Group: Members
Posts: 128
Joined: 6-August 05
Member No.: 10,402



Great tutorial. This may come in good use in the future. But for now i don't think i will be using xml =(
Go to the top of the page
 
+Quote Post
ghostrider
post Jul 7 2006, 01:26 AM
Post #6


Super Member
*********

Group: Members
Posts: 397
Joined: 9-June 06
From: Wisconsin
Member No.: 24,924



Thank you very much for posting this. I'll use it sometime in my website.
Go to the top of the page
 
+Quote Post
xYcLoNe
post Jul 19 2006, 11:15 AM
Post #7


Newbie
*

Group: Members
Posts: 3
Joined: 12-July 06
Member No.: 26,482



nice.. tenx very much...
Go to the top of the page
 
+Quote Post
masterleous
post Jul 19 2006, 11:27 AM
Post #8


Advanced Member
*******

Group: Members
Posts: 108
Joined: 9-July 06
Member No.: 26,360



very nice and cool tutorial for website making. But you can make your website using webpage making softwares like Frontpage, Dreamweaver, Cute HTML and their are plenty of more softwares available softwares on the net for free..............