32
« on: December 05, 2008, 06:28:17 PM »
You have to build a separate template for each toplist you want to use, a .tpl (or .src) and a .html.
My main_toplist template looks like this:
<center>
<table cellpadding="0" cellspacing="2" border="0" bordercolor="000000" align="center">
<tr><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN1%%"><img src="%%THUMB1-1-1%%" width="240" height="180" /><br>%%NAME1%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN2%%"><img src="%%THUMB2-1-1%%" width="240" height="180" /><br>%%NAME2%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN3%%"><img src="%%THUMB3-1-1%%" width="240" height="180" /><br>%%NAME3%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN4%%"><img src="%%THUMB4-1-1%%" width="240" height="180" /><br>%%NAME4%%</a></font></td></tr>
<tr><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN5%%"><img src="%%THUMB5-1-1%%" width="240" height="180" /><br>%%NAME5%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN6%%"><img src="%%THUMB6-1-1%%" width="240" height="180" /><br>%%NAME6%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN7%%"><img src="%%THUMB7-1-1%%" width="240" height="180" /><br>%%NAME7%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN8%%"><img src="%%THUMB8-1-1%%" width="240" height="180" /><br>%%NAME8%%</a></font></td></tr>
<tr><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN9%%"><img src="%%THUMB9-1-1%%" width="240" height="180" /><br>%%NAME9%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN10%%"><img src="%%THUMB10-1-1%%" width="240" height="180" /><br>%%NAME10%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN11%%"><img src="%%THUMB11-1-1%%" width="240" height="180" /><br>%%NAME11%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN12%%"><img src="%%THUMB12-1-1%%" width="240" height="180" /><br>%%NAME12%%</a></font></td></tr>
<tr><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN13%%"><img src="%%THUMB13-1-1%%" width="240" height="180" /><br>%%NAME13%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN14%%"><img src="%%THUMB14-1-1%%" width="240" height="180" /><br>%%NAME14%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN15%%"><img src="%%THUMB15-1-1%%" width="240" height="180" /><br>%%NAME15%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN16%%"><img src="%%THUMB16-1-1%%" width="240" height="180" /><br>%%NAME16%%</a></font></td></tr>
<tr><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN17%%"><img src="%%THUMB17-1-1%%" width="240" height="180" /><br>%%NAME17%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN18%%"><img src="%%THUMB18-1-1%%" width="240" height="180" /><br>%%NAME18%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN19%%"><img src="%%THUMB19-1-1%%" width="240" height="180" /><br>%%NAME19%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN20%%"><img src="%%THUMB20-1-1%%" width="240" height="180" /><br>%%NAME20%%</a></font></td></tr>
</table>
</center>
For the main i use 20 thumbs, 5 rows of four thumbs.
My input in tp toplist section is:
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/main_toplist.tpl
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/main_toplist.html
This goes on my page where i want it to appear:
since i use an index.php - <?php include "./tp_toplist/main_toplist.html"; ?>
I was toying with using a row of four and it's done the exact same way, except you have 4 four sets of templates:
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist1.tpl
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist1.html
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist2.tpl
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist2.html
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist3.tpl
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist3.html
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist4.tpl
/usr/local/apache/sites/MY_USERNAME/MY_DOMAIN.com/htdocs/tp_toplist/row_toplist4.html
The template i made and put in the form box:
<center>
<table cellpadding="0" cellspacing="2" border="0" bordercolor="000000" align="center">
<tr><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN1%%"><img src="%%THUMB1-1-1%%" width="240" height="180" /><br>%%NAME1%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN2%%"><img src="%%THUMB2-1-1%%" width="240" height="180" /><br>%%NAME2%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN3%%"><img src="%%THUMB3-1-1%%" width="240" height="180" /><br>%%NAME3%%</a></font></td><td><font face="Arial" size="+1"><a href="/tp/out.php?link=toplist&to=%%DOMAIN4%%"><img src="%%THUMB4-1-1%%" width="240" height="180" /><br>%%NAME4%%</a></font>
</td></tr>
</table>
copy/paste each section from the main_toplist template to make each row (instead of making each template row by hand over-and-over again).
This goes on my page between each block:
since i use an index.php - <?php include "./tp_toplist/row_toplist1.html"; ?>
<?php include "./tp_toplist/row_toplist2.html"; ?>
<?php include "./tp_toplist/row_toplist3.html"; ?>
<?php include "./tp_toplist/row_toplist4.html"; ?>
Hope it's not too confusing but once you understand how to do this it's a breeze for every site you build afterwards.
Hope this helps.