Unstoppable Domains

PHPLD question !?

Spaceship Spaceship
Watch

nmr86

Established Member
Impact
31
Hi,

my question is:

Is there a template for PHP Link Directory v2 that is showing on the frontpage the total number of listed links, and featered links and stuff like that??

I see it on v3 directories.. But can I have it also on my v2 ??

Help is appreciated
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
if not, its a small bit of code to add
 
0
•••
0
•••
This is all possible with mods/add-ons for PHPLD - available for all versions.

But to download all these mods you will require one time $10 registration fee.
 
0
•••
Here's what I use. It includes number of categories, subcategories, featured links, normal links, rejected links, links added today (submitted), links included today (links accepted by admin) and pending links.

Create a php file called stats.php
Code:
<?PHP
$normal_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2 AND `FEATURED` = 0");
$tpl->assign('normal_links', $normal_links);

$feat_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2 AND `FEATURED` = 1");
$tpl->assign('featured_links', $feat_links);
 
$pending_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 1");
$tpl->assign('pending_links', $pending_links);
 
$today_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_ADDED` >= CURRENT_DATE");
$tpl->assign('today_links', $today_links);

$included_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_MODIFIED` >= CURRENT_DATE AND `DATE_ADDED` < DATE_MODIFIED");
$tpl->assign('included_links', $included_links);
 
$categorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` = 0 ");
$tpl->assign('categorys', $categorys);
 
$subcategorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` > 0 ");
$tpl->assign('subcategorys', $subcategorys);

$accepted = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2");
$tpl->assign('accepted', $accepted);

$rejected = $db->GetRow("SELECT * FROM `{$tables['link']['name']}` ORDER BY ID DESC LIMIT 1");
$rejected = $rejected['ID'];
$rejected = $rejected - $accepted - $pending_links;
$tpl->assign('rejected', $rejected);
?>

Add this line to index.php after "// End Paging 4"
Code:
require_once 'stats.php';

and in the template where you want to show the list (leftbar.tpl in my case)
Code:
<h2><img src="{$smarty.const.DOC_ROOT}/images/pushpin.png" alt="" height="21" width="18" border="0" />Stats</h2>
<p>Categories: <b>{$categorys}</b><br />
Sub Categories: <b>{$subcategorys}</b><br /><br />
Featured Links: <b>{$featured_links}</b></a><br />
Normal Links: <b>{$normal_links}</b><br />
Rejected Links: <b>{$rejected}</b><br /><br />
Links Included Today: <b>{$included_links}</b><br />
Links Submitted Today: <b>{$today_links}</b><br />
Links Pending: <b>{$pending_links}</b><br /></p>

Screenshot:
dir.gif

Note: Pending links is hidden on my directory as there's something like 1100 links pending. :laugh:

Uses some code from http://www.phplinkdirectory.com/forum/showthread.php?t=2234, with some quick additions by myself.
 
0
•••
0
•••
yeah

thats what i want

I am gonig to try it out !! thanks alot
 
0
•••
PHPLD version 2

http://www.ruuz.com

If this is what you are looking for then let me know I will send you the code.
 
0
•••
0
•••

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back