Web log to sparedirectory.com

March 7, 2007

Filed under: Directory News — links @ 5:18 pm

Today i have added another article titled An introduction to search directories in my articles section of the website.
——–Appended 7th August———
Removed the whole article section.
—————————————

Added a couple more links today one of which was a reciprocal submission which is fine by me, I believe reciprocal links sould be free but i had to put a small charge it here because it stops the spammers. I still havnt got any links in my general directories section yet.

February 10, 2007

updated articles

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

Today i decided to scrap my old articles section and replace it with a new script i have created this time storing all the entrys into a database instead of individual pages on my server.
The old read articles section was sepperated into categories meaning the pages were 3 levels deep. With my new script all the articles are now rewrote to the .html file extension instead of php and are also all on the same level only 2 deep.

January 14, 2007

Block spam URL’s

Filed under: Directory mods — links @ 2:43 pm

This is a simple php mod i have made in order to block certain websites from submitting to my directory after i started getting a few spam submissions.

Open submit.php and Find
$data['URL'] = "http://".$data['URL'];

Add below
require_once 'spamlist.php';

—————————-
Create a file called “spamlist.php” and insert the following

<?
$bansite[0] = 'aceroot.info';
$bansite[1] = 'orgfree.com';
$bansite[2] = 'ase3dj.info';
// add more above if needed

$count = count($bansite);
for($i = 0; $i <= $count-1; $i++)
{
  if (strpos($data['URL'], $bansite[$i]) == True)
  {
  echo "<h1>The domain $bansite[$i] is banned for spamming</h1>";
  exit;
  }
}

//if [/URL] or http:// is found in description then stop and exit.
if (strpos($data['DESCRIPTION'], "[/URL]") == True){exit;}
if (strpos($data['DESCRIPTION'], "[/url]") == True){exit;}
if (strpos($data['DESCRIPTION'], "http://") == True){exit;}

?>

——— Upload both files

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

« Previous Page

Sparedirectory blog is Powered by WordPress. RSS feed