Take Advantage of old rates before 31 December 2011, submit your website to Dir.vc Web Directory Now!
RSS Feed Directory Blog Articles Submit Site Popular Sites Contact Us
Web Directory » Blog
|__ phpLD – Listing featured links above normal links in your top pages!

phpLD – Listing featured links above normal links in your top pages!

  - July 14th, 2007 by Web Directory | Posted in phpLD Hacks & tweeks!   No Comments »
Email this  Email  |   Print This Post Print This Post     

phpLD – This mod will list Featured Links above other links in New Listings, Popular Listings, and Top Rated Listings.
(http://phplinkdirectory.com/forum/showthread.php?t=1536)

I found this intersting mod listed here, wrks gr8 for one. just made a quick hack to seperate the two!

Open index.php, and change:
Code:

case 'd':
	$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
	$path[] = array ('ID' => '0', 'TITLE' => _L('New Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
	break;
case 'h':
	$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
	$path[] = array ('ID' => '0', 'TITLE' => _L('Popular Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
	break;

To:


case 'd':
	if (FTR_ENABLE) {
		$feat_links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
		$tpl->assign('feat_links', $feat_links);

		$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);

	} else {

		$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
	}
	$path[] = array ('ID' => '0', 'TITLE' => _L('Top ' . LINKS_TOP . ' New Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
	break;

case 'h':
default :
	if (FTR_ENABLE) {
		$feat_links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
		$tpl->assign('feat_links', $feat_links);

		$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
	} else {
		$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
	}
	$path[] = array ('ID' => '0', 'TITLE' => _L('Top ' . LINKS_TOP . ' Popular Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
	break;

Hope this helps someone!

M.

Leave a Reply

Captcha
Enter the letters you see above.



Entries (RSS) and Comments (RSS) Blog – Dir.vc :: Web Directory is proudly powered by WordPress - Site By : M-Solutions India