Add a “sponsor” to top hits and new links pages
Please note, this mod was update on 6/17/07. As some users reported an error. The changes made to the code in this udpate are in RED.
Hi All,
Here is a simple mod for phpld
I have done it in 3.1 and 3.2, and will be adding this feature in one of the themes I will be releasing soon. So once I do that, I will update here if it works with 3.0.6(it should)
For an example see here: http://www.linksholder.com/index.php?list=top
Before doing this back up your files!
In your templates main.tpl look for:
{* Categories *}(should be around lines 61-67)
just before that add:
{* Show sponsor info*}
{if !empty($list)}{include file="sponsor.tpl"}{/if}
Then CREATE a file in your templates folder called “sponsor.tpl”. In this file put:
{if $list eq ‘top’}
<table border=”0″>
<tr><td>
<p id=”sponso2″> </p><h1>{l}We recommend that you check out{/l} <a href=”http://www.dirarchive.com”>DirArchive Web Directory</a>{l}. It is one of the top web directories{/l}</h1>
</td></tr>
</table>
{/if}
{if $list eq ‘latest’}
<table border=”0″>
<tr><td>
<p id=”sponsor2″> </p><h1>{l}We recommend that you check out{/l} <a href=”http://www.dirarchive.com”>DirArchive Web Directory</a>{l}. It is one of the top web directories{/l}</h1>
</td></tr>
</table>
{/if}
In v 3.2, if you want to add a sponsor to the “latest articles” page, in sponsor.tpl just add:
{if $list eq ‘latestarticles’}
<table border=”0″>
<tr>
<p id=”sponsor2″> </p><h1>{l}We recommend that you check out{/l} <a href=”http://www.dirarchive.com”>DirArchive Web Directory</a>{l}. It is one of the top web directories{/l}</h1>
</tr>
</table>
{/if}
**change the HTML in the sponsor.tpl to match your templates layout
Popularity: 81% [?]
[…] Allows “sponsorship” of the Latest Links and Top Hits pages […]