Web log to sparedirectory.com

December 26, 2006

New music category

Filed under: Directory News — links @ 11:05 am

After an old school friend contacted me on myspace who is now in a band, she made me realise that i didnt have a category catering for music yet, so i have just added a new music category with the following sub cats - Artist pages, Band websites, Fan websites, Music software, Musical equipment, Song lyrics, Info websites.

I also put a free link into her band website for giving me the idea.

December 17, 2006

rss feeds

Filed under: Directory mods — links @ 12:52 pm

Origionally the directory had links to each pages xml feed but after installing the new Internet Explorer v7 i realised that the feed button wasnt lighting up.

After doing some research i found out the correct meta tag was missing, here is the code i have used to get the rss button to light up

{if $category.ID eq not 0 and not $p}
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$smarty.const.DOC_ROOT}/rss.php?{if $qu ne ''}q={$qu}{elseif $p}p={$p}{else}c={$category.ID}{/if}" />
{/if}

December 12, 2006

page 2 mod

Filed under: Directory mods — links @ 10:17 pm

Today i changed the amount of links on each page and limited them to 20 per page, instead of having a question mark in the page name for page 2 and 3 etc (?p=2) i have modded it to makes it the second page like this

page2.html

Added following line to .htaccess file

## Pagination Rewrite
RewriteRule page(.*)\.html$ (.*)/?p=$1

Modify /templates/footer.tpl
FROM: {assign var=’url_pattern’ value=’?p=$’}
TO: {assign var=’url_pattern’ value=’page$.html’}

Modify /includes/functions.php
FROM: $qp = strpos($path, ‘?’);
TO: $qp = strpos($path, ‘page’);

December 5, 2006

Top hits mod

Filed under: Directory mods — links @ 1:24 pm

This is a mod i added to make the top hits and latest link pages more search engine friendly, there are 2 methods of doing this i have used, so i will explain them both.
In the top_bar.tpl file change the top links and top hits to what ever you want, php, html etc.
<a href="{$smarty.const.DOC_ROOT}/latest-links.php">Latest Links</a>
<a href="{$smarty.const.DOC_ROOT}/top-hits.php">Top Hits</a>

————————————-
The first method is used if your directory is installed at the top level domain, then simply add the following lines to your .htaccess file to re-write the new pages to the old pages.

RewriteRule latest-links.php index.php?p=d
RewriteRule top-hits.php index.php?p=h

————————————-
method 2, if your directory is stored in a directory or sub folder other than top level then create two PHP files, called top_hits or most-visited etc then add this to each page adjusting as needed.

<?
$dirloc=$_SERVER[’PHP_SELF’];
$dirloc = str_replace("/latest-links.php", "", $dirloc);
include("http://".$_SERVER[’HTTP_HOST’]."$dirloc/index.php?p=d");
?>

December 1, 2006

Hello world!

Filed under: Directory News — links @ 12:46 pm

Today i decided to add this blog to my directory and keep it updated with anything i do to my directory such as improving it or adding further modifications.

sparedirectory

Sparedirectory blog is Powered by WordPress. RSS feed