[ Finishing It All Up ] [ Tips For Success ] [ Sample Templates ] How To Use The HTML TemplateThe template feature will allow you to have your list look EXACTLY how you want it to. All you have to do is make up a sample list, replace some of the HTML with script values, and it will look just like you had it laid out in your HTML editor. The only downfall of this template is that it is somewhat complicated. You need to read this file thoroughly and make sure you understand it all before you attempt to edit the template. If you have any doubts about it, please use the normal list layout as it is much easier to set up. As far as we know, this is the only "Top Sites" script to implement this feature. It may take some getting used to, but once you've got it down it can be an extremely powerful tool to integrate the list into your web site.
The first thing you should do is, in an HTML editor, create a list with one entry exactly how you want your sites to appear. Go ahead and place a banner in (if you are using them), because the number of banners to show is still controlled by the script. So, if you want the list to look like this:
1. Site 1 Title |hits in| |hits out| - Description of site 1 Then you would use the following HTML:
<font size="1">
Now that you've got your layout, you need to replace some of the HTML you created with values that the script can understand. Here are the values the script understands and what they mean:
NOTES:
The #%BANNER%# value ALWAYS has a <br> tag immediatly after it.
This is set by the script and cannot be changed through the template.
So, if you had a <br> tag after the banner in your HTML layout
it can be removed because it is automatically placed there by the script.
Lets start off with the rank value, using the sample HTML list we created above. Here's how it looked above:
1. <a href="http://www.site1.com">Site 1 Title</a> And here's how it looks when we replace the numbered rank with the script value:
#%RANK%#. <a href="http://www.site1.com">Site 1 Title</a> Now we'll stick in the Site's Title, and link it to the outgoing URL.
#%RANK%#. <a href="#%URL%#">#%TITLE%#</a> That's all there is to it. Just look through your HTML, find the script value that matches the HTML, and replace it. Now you just have to go through the remaining HTML and do the replacements. Here's what the HTML will look like when it's finished:
#%RANK%#. <a href="#%URL%#">#%TITLE%#</a> Now, what if you don't want to show the out hits, or the rank? Simple, just remove the #%RANK%# and #%OUT%# and they're gone. So, if you don't want to show something just remove it's script value from the template and it will not appear. To finish everything up, you will need to open up the admin.cgi script in your browser. Log in and choose to edit the HTML for the page you want. In the template box, you will put the HTML code you created above. Make sure you are only entering the HTML for a SINGLE ranking. If you find yourself inserting #%BANNER%#, #%DESC%#, or any of the script values more than once in the template, you are most likely doing something wrong. Now reload the main admin page, and choose to Re-Rank the list. You need to have a few members, or test members in order to check your layout. Then you can visit your html page to see what it looks like. Hopefully you've got it just how you wanted it, but if not just keep playing with it until you do. Here are a few quick tips to help you with your HTML Layout. Using tables with the template feature When you're using tables with the template feature, there are a few things that you need to consider when setting your header/footer files, list breaks, and your HTML template. First of all, each ranked site is most likely going to take one table row, or <tr> HTML tag. So, in order for this to work you will need to have the opening <table> tag in the header file, and the closing </table> tag in the footer file. You will need to have your HTML template begin with a <tr> and end with a </tr>. Next, if you have any list breaks, you will either have to make it a table row with a colspan set to the required number, or close the table and start a new table after the list break. Either one will work. We have included a few samples with the documentation, so if you are struggling, it will help to take a look. They can be found on the samples.html page included with the docs. Test your layout!!
Before you begin promoting your top list, add a few test members, send a few hits through
and then use the Re-Rank function in the admin script to create the page. You can then
point your browser to the top list page to make sure it looks ok.
|