Go Back   phpLD hacks, phpLD Mods, phpLD Templates php link directory discussions > PHP Link Directory > phpLD Mods and contributions
Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2007, 06:28 PM
Tim_Myth Tim_Myth is offline
Junior Member

Join Date: Jan 2007
Location: Polar Regions
Posts: 4
Hack Detail:
Compatibility: N/A Hack Version: 1.0
Release Date: 01-13-2007 Installs 2
Last Update: Never Hack Rating: N/A
Hack Options
Install This Hack
Report This Hack
View All Hack of This Author
Hack Downloads N/A
Hack Info




Co-author:

Default Show the last five links added with a link to their category

In index.php find:
Code:
// Assign template variables
$tpl->assign('category'       , $path[count ($path) - 1]);
$tpl->assign('path'           , $path);
and BEFORE it add:
Code:
$last5 = array();
$last5 = $db->GetAll("SELECT * FROM `{$tables['link']['name']}` WHERE `STATUS` = '2' ORDER BY `ID` DESC LIMIT 0,5");
$last5=addCategPathToLinks($last5);
$tpl->assign('last_5',$last5);
Now open up main.tpl (or whatever template you intend to include this in) and add:
Code:
{section name=last_link loop=$last_5}
  <div>
    <a href="{$last_5[last_link].URL}">{$last_5[last_link].TITLE}</a>
    <br />
    {$last_5[last_link].DESCRIPTION}
    <br />
    <span class="url">{$last_5[last_link].URL}</span>
    <br />
    Category: <a href="{$last_5[last_link].CATEGORY_URL}">{$last_5[last_link].CATEGORY_TITLE}</a>
  </div><br /><br />
{/section}
__________________
Lifetime link in 4 SEO friendly directories (each on seperate IP's) for $5. Deep linking encouraged!
---------------------------------------------------------------------------------------------
Free PHP Link Directory Templates -|- PHPLD Tutorials
Reply With Quote
  #2  
Old 01-15-2007, 03:14 PM
jitender jitender is offline
Administrator
 
Join Date: Dec 2006
Posts: 113
Default

Hi there,

Good mod

Show new listing in particular category
__________________
WebmastersHome.com - Revenue Sharing Forum
PHP Scripts - Programming Scripts Collection
Reply With Quote
  #3  
Old 01-15-2007, 09:58 PM
Tim_Myth Tim_Myth is offline
Junior Member
 
Join Date: Jan 2007
Location: Polar Regions
Posts: 4
Default

Thanks. I must admit that it is not all original code. I have several more to post, but I keep running out of time or being pulled into other projects.
__________________
Lifetime link in 4 SEO friendly directories (each on seperate IP's) for $5. Deep linking encouraged!
---------------------------------------------------------------------------------------------
Free PHP Link Directory Templates -|- PHPLD Tutorials
Reply With Quote
  #4  
Old 02-15-2007, 09:09 AM
jerryg jerryg is offline
Junior Member
 
Join Date: Feb 2007
Posts: 4
Default

Nice mod. Is there any demo for this mod? Thanks.
Reply With Quote
  #5  
Old 02-16-2007, 06:11 AM
jitender jitender is offline
Administrator
 
Join Date: Dec 2006
Posts: 113
Default

Hi there,

no there is no any demo here... but can try it on your own directroy and add as demo

__________________
WebmastersHome.com - Revenue Sharing Forum
PHP Scripts - Programming Scripts Collection
Reply With Quote
  #6  
Old 02-28-2007, 07:40 AM
hitechinfosoft hitechinfosoft is offline
Junior Member
 
Join Date: Feb 2007
Posts: 6
Default

very nice mode quit intreasting mod
Reply With Quote
  #7  
Old 12-19-2007, 06:57 PM
ahmershuja ahmershuja is offline
Junior Member
 
Join Date: Nov 2007
Posts: 20
Default

does it work with v2.1.3
Reply With Quote
  #8  
Old 12-19-2007, 07:03 PM
ahmershuja ahmershuja is offline
Junior Member
 
Join Date: Nov 2007
Posts: 20
Default

does it works with v2.1.3
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT. The time now is 10:11 AM.



Design By: Miner Skinz.com
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
We are in no way affiliated with the phpLD Owners.