Sparedirectory




Just another WordPress weblog
Latest Links | Top Hits | Submit a Link | Contact | Web site log

Web log to sparedirectory.com

Pages
  • About
Recent Posts
  • Roulette links
  • Andersons School Spirit
  • Postcards
  • Car leasing - link 285
  • Business cards - link 284
Archives
  • November 2008
  • March 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
Blogroll
  • Ask jeves blog
  • godaddys blog
  • Google blog
  • Netscape
  • Yahoo blog
Directories
  • agoodirectory
  • Sparedirectory
Other sites
  • Play free games
  • www.afkf.com

Top hits mod

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");
?>

Filed under: Directory mods by links @ 1:24 pm December 5, 2006

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.


Copyright - © www.sparedirectory.com all rights reserved.