Forum help you to gather info or comment from the users, remember that users have the best suggestion about your services. This tutorial was requested by wapkatutor user some days ago, now I am adding it on his request.
After this tutorial, you will be able to use :forumlist: tags in wapka and also will be able to allow users to read or write comments on your site as like all other forums.. :)
You need to do the following in order to learn the wapka forumlist tag..
- Login to your free wapka account
- Goto Admin Mode
- Add the new forum via ES > Forum
- Write Forum Name: Demo
- Forum Type: Simple
- Item will be visible for: In admin mode
- It should look like this picture..
- Now click the created forum and note down its forum ID, You can find the forum ID at the bottom right of the forum site under the EDIT SITE Link.. like this picture, instead of black marked space you will see the forum ID
- Now goto the main page of your site, and add the following code via ES > WML/xHTML code
In above code change XXXXXX with the noted Forum ID. Add this code and check what it displayed... It will display nothing at this time.. Now to add new messages in our forum we need to add the form to add messages, add the following code via ES > WML/xHTML code
Change ID with the noted forum ID in above code.. After that add new message via the form and immediately you will see the message via code in :forumlist: that we have added above..
- Now if you like you can change the :forumlist:--------:/forumlist: code that we used in step 5. For this purpose you need to understand this tag, lets do it in this step..
- Forumlist code starts with :forumlist: and ends on :/forumlist:
- We seperate the DELIMITERS, LINE_FORMAT and PARAMETERS with the :: i.e. :forumlist:PARAMETERS::LINE_FORMAT::DELIMITERS:/forumlist:
- Now instead of PARAMETERS we can use following values. You can separate two or more values with a comma..
- f=ID ID can be any Forum ID. Like f=12345. You can add two forum by separating with a space, like f=12345 123456
- t=TIME_FORMAT this defines the time format for %time% in LINE_FORMAT.. Like you can use t=-- this will display time as 1 minute ago, two weeks ago etc
- l=1-200 This will define the number of messages in one page. Minimum messages is 1 and maximum messages are 200 per page. You can use l=0 if you like only count of messages.. For example, l=2 this will display the two messages only.
- s=PAGES You can set the target page with this value.. This parameter is useful, if you want to separate list on more sites. For example if you want to display list with first 10 messages set parameter l on 10 and parameter s on 1, if you want to display next 10 messages (11-20) leave parameter l on 10 and parameter s set on 2.
- o=ORDER order parameter can have two values: n (new first) and o (old first).. So if you want to display the old messages first set o=o and set o=n if you wanted to display new messages first.
- Now you can write more parameter by using this code: :forumlist:f=ID,o=n,s=1,l=1::LINE_FORMAT::DELIMITERS:forumlist:
You can see that we have separated values via comma. You can reorder it as you like but always separate it with comma and parameter should be used before the ::.
- For Line format can be used following variables. All variables have different values stored in wapka server. Thats why wapka has lots more than you can imagine.
- %name% User name of the user who added the message. If you will add the message than your username will be administrator
- %tname% User name only text without Icons or colors etc.
- %lname% Adds the link to user profile who has added the message, if its administrator then user will goto the new PM page.
- %time% Time of message
- %text% Text of the message or body of the message
- %ip% IP address of the user who has added the message.
- %ipx% IP address of the user who added the message but last three digits hidden.
- %browser% Browser of the user. i.e. Opera Mini etc
- %flag% Flag of the users country..
- %country1% Full country name.. i.e. Pakistan, India etc
- %country2% Abbreviation of country 2 letters.
- %country3% Abbreviation of country 3 letters.
- %prvar-N% Profile variable from user profile, I will add tutorial on profile variable but not in this tutorial..
- %urlpicture% URL of picture from profile. This variable generate only URL, not whole picture code!!! It means, that must be used with HTML image code. i.e.
- %urlprcom% This varialbe create the link to user profile comments who added the message.. This tag must be used with HTML link/anchor tag.i.e.
- %urlpm% Same like %rcom% but it creates link to the user Private Mwssages if he/she is your reg. member.
- Instead of DELIMITERS you can use any HTML code like line beak. Actually this is the separator adding space.. i.e you can add anthing that you wanna use as separator.. It can be line break, hard line, simple text or any other thing..
- You can do whatever you like in wapka forumlist just follow the rules.. :)
I hope my hard work will be work for you and I want you to be master of :forumlist: after reading this tutorial.. Somehow if you don't understand anything or something write coment and I will be there.
Join our facebook page
Create your own free wapsite in minutes
Request New Tutorials