![]() |
| |||||||
| Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Supporter Moderator Join Date: Sep 2005 Location: Vancouver, BC, Canada Posts: 1,180 | This mod will list Featured Links above other links in New Listings, Popular Listings, and Top Rated Listings. 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;
case 'r':
$links = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 $expire_where ORDER BY rate desc limit 0, ".LINKS_TOP);
$path[] = array ('ID' => '0', 'TITLE' => _L('Top Rated'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break; Code: case 'd':
$links1 = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
$links2 = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY DATE_ADDED desc limit 0, ".LINKS_TOP);
$links = array_merge($links1, $links2);
$path[] = array ('ID' => '0', 'TITLE' => _L('Top ' . LINKS_TOP . ' New Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break;
case 'h':
$links1 = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
$links2 = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY hits desc limit 0, ".LINKS_TOP);
$links = array_merge($links1, $links2);
$path[] = array ('ID' => '0', 'TITLE' => _L('Top ' . LINKS_TOP . ' Popular Listings'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break;
case 'r':
$links1 = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=1 $expire_where ORDER BY rate desc limit 0, ".LINKS_TOP);
$links2 = $db->GetAll("SELECT * FROM {$tables['link']['name']} WHERE STATUS=2 AND FEATURED=0 $expire_where ORDER BY rate desc limit 0, ".LINKS_TOP);
$links = array_merge($links1, $links2);
$path[] = array ('ID' => '0', 'TITLE' => _L('Top' . LINKS_TOP . ' Top Rated'), 'TITLE_URL' => '', 'DESCRIPTION' => '');
break; 1. Yours may look at little different as my index.php is modified. 2. Ignore case 'r' block if you are not using the Rating mod. __________________ Dan █ Unlock the Vault Contest :: Over $350 Prizes! █ phpLD Mods :: phpLD_Vault █ Webmaster Resources Directory █ phpLD_Vault Support IMPORTANT NOTE: phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions! |
| |
| | #2 |
| Mentor Join Date: Aug 2005 Location: New Jersey Posts: 334 | Hey Dan, you have a demo up? Thanks |
| |
| | #3 |
| Supporter Moderator Join Date: Sep 2005 Location: Vancouver, BC, Canada Posts: 1,180 | You bet - you can go here to see it in action: http://www.monster-submit.com/directory/ New Listings | Popular Listings | Top Rated ...any one of these will show that Featured Listings display first ahead of others. Not for everyone, but I wanted Featured Listings to show up first across the board. __________________ Dan █ Unlock the Vault Contest :: Over $350 Prizes! █ phpLD Mods :: phpLD_Vault █ Webmaster Resources Directory █ phpLD_Vault Support IMPORTANT NOTE: phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions! |
| |
| | #4 |
| Supporter Join Date: May 2006 Posts: 1,178 | This feature works only showing the featured link on the category you choose it to be on. Is there a way to get the featured link to show up on ALL of the pages, including the main page? Thanks |
| |
| | #5 |
| Supporter Join Date: May 2006 Posts: 1,178 | Do we have a mod for this on 3.05? I want to get the featured links on the main page like this: http://www.alivedirectory.com/ <--- look at the bottom. |
| |
| | #6 |
| Join Date: Aug 2006 Posts: 118 | Ya id like to get it working for 3.06 so the featured links are showing in the top rated, top hits etc...say with a maximum of 5 random featured links. Im gonna have sponsored links on the frontpage which will be dealt with differantly |
| |
| | #7 |
| Great mod, now my top sites and latest link pages, show the featured sites first, brilliant | |
| |
| | #8 |
| great mod but how show 5 random feature links in top of latest, top ... tks | |
| |
| | #9 | |
| Supporter | Quote:
ORDER BY hits desc to ORDER BY RAND() __________________ DirectoryDump Web Directory | Link Directory | Full of Search Web Directory | Free phpLD Templates | |
| |
| | #10 |
| Supporter Join Date: Dec 2006 Posts: 89 | Is it valid for v2.1 ? |
| |
| | #11 |
| Mentor Supporter Moderator Join Date: Dec 2006 Location: Indiana Posts: 5,077 | yes it works on versions 2.x __________________ The Help Line :: The Best Place To Get Free Link Building, Traffic & PR Wesece :: General Free Directory Offering Detailed Website Statistics & Advanced SEO & Directory Tools phpLD & Webmasters Resource Forum Foamiki :: Foamy The Squirrel Wiki & Directory |
| |
| | #12 | |
| How about featured by pr for instace on this page http://www.ahealthylifestyle4u.net/d.../index.php?p=d I have featured but I want to show feature by pr also how can I get just feature to show thumbnails Quote:
__________________ JoDee $10-5 & $5-3 deep links JoDeesWebDirectory.com HealthDirectory To succeed in Life its not always what you know but who you know Last edited by jminscoe; 02-27-2007 at 01:46 AM. Reason: added to description | ||
| |
| | #13 |
| Join Date: Jan 2007 Posts: 40 | I was able to get this to work for 3.1. Question: The featured listings are blended in with the regular listings. Example: http://www.seo-sources.com/index.php?list=latest Anyone have a suggestion on how I can get the featured links in the "Latest links" and "Top links" to display like this: http://www.seo-sources.com/Shopping/ on top of the other regular links? This will make the advantages of having a featured link more visible to visitors and potential advertisers. __________________ Last edited by tldir.com; 03-06-2007 at 11:10 PM. |
| |
| | #14 |
| Join Date: Jan 2007 Posts: 40 | Anyone know how to accomplish this? __________________ |
| |
| | #15 |
| Supporter Join Date: Oct 2005 Posts: 548 | nice mod. thanks. __________________ many thanks. thompson. |
| |
| | #16 | |
| Join Date: Sep 2006 Posts: 180 | How to get this work with v3.1 ?? I cant find the following code ... Quote:
__________________ BEST Web Directory Permanent Regular links with 3 Deep Links for $14.95 Only Free Blog Directory ~ PHPLD_Vault Rocks | |
| |
| | #17 |
| Do I add it where I have this case 'latest': $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('Latest Links'), 'TITLE_URL' => '', 'DESCRIPTION' => ''); break; case 'top': $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('Top Hits'), 'TITLE_URL' => '', 'DESCRIPTION' => ''); break; __________________ JoDee $10-5 & $5-3 deep links JoDeesWebDirectory.com HealthDirectory To succeed in Life its not always what you know but who you know | |
| |
| | #18 |
| Join Date: Jan 2007 Posts: 27 | You are right jminscoe. |
| |
| | #19 | |
| Supporter Join Date: Jun 2007 Posts: 131 | Quote:
Showing featured as a seperate list above normal listing: hi, i have used the following code to show featured links as a seperate list in New Listings, Popular Listings, and Top Rated Listings. Demo : http://www.dir.vc Tested on phpLD 2.1.2 requesting feedback on other versions, Code:
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; Regards M. | |
| |
| | #20 |
| Mentor Supporter Moderator Join Date: Dec 2006 Location: Indiana Posts: 5,077 | thanks msolution dan why isn't the rate part of it working? eh i'll get off my lazy butt and scan your forum here in a bit __________________ The Help Line :: The Best Place To Get Free Link Building, Traffic & PR Wesece :: General Free Directory Offering Detailed Website Statistics & Advanced SEO & Directory Tools phpLD & Webmasters Resource Forum Foamiki :: Foamy The Squirrel Wiki & Directory |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|