WSN Knowledge Base
Featuresspacer Showcasespacer Reviewsspacer Demosspacer Purchasespacer Manualspacer Support
Modifying Templates
Modifying Templates

All of the templates in your WSN Software can be modify, not only for appearance, but also for information that you want to be displayed on the finished page. All of your templates are located in the in the templates directory on your host server. You can modify these online, by chmodding all your template files to 666. The online editor is located in your Admin Panel, under Customizations, Templates. If you receive an error message after clicking the Submit Changes button it is because you have did not chmod the files correctly on your server.

All of your templates are basically html. The html is wrapped around things called variables and some other coding to tell the software to repeat a procedure over and over again. As an example this is a block of code to list all members of your site, it is from the memberslist.tpl:

<!-- BEGIN MEMBERS -->
<tr>
<td width="20%"><a href="http://scripts.webmastersite.net/wsnkb/manual/memberlist.php?action=profile&id=0"></a> </td>
<td width="20%"></td>
<td width="20%"></td>
<td width="20%"></td>
<td width="20%"><IF ><img src="http://scripts.webmastersite.net/wsnkb/manual/attachments/" alt=""></IF></td>
</tr>
<!-- END MEMBERS -->

You see the html. All of this information will be entered into a table row, with 5 columns.

Second you see 2 comment tags <!-- BEGIN MEMBERS --> and <!-- END MEMBERS -->. This tells the script to keep repeating this procedure over and over again until all members are listed. You can not remove these tags or the script will not function properly, in none of the information will be displayed on the page.

Last you see the variables. This is the information capitalized between the { } brackets. This tells the software the information you want to display.

Lets break down how this column is constructed:

<td width="20%"><a href="http://scripts.webmastersite.net/wsnkb/manual/memberlist.php?action=profile&id=0"></a> </td>

Your html column tags <td width="20%"> and </td>.

A html anchor tag <a href="http://scripts.webmastersite.net/wsnkb/manual/memberlist.php?action=profile&id=0"> and </a>. (There will be more information later on how and what you are calling with this line of text,memberlist.php?action=profile&id= and how to write out the links to other pages on your site to get the exact information.) 0 this is the unique id assigned to all members when they join your site. In the finished html page if you view source of the page on your site this will display a different number for each member listed.

Next we have , this will display the actual username of the member. Because it is surrounded by your anchor tags it is link text. If you click on it you will go directly to that member's profile.

Last we have , this will display an edit image, that if clicked will take you to the edit members page, where you can change information in the member's profile. This edit image is quite a unique item and will be discussed in detail.

Rating:


4.5/5 based on 4 votes. The median rating is 4.

Submitted: 11/20/03 (Edited 10/08/04)

Description: An introduction to modifying your templates.

Views: 2345 views. Averaging 1 per day.
In the most recent 30 day period, there've been 0 views.

Previous Article | Next Article


Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support