UPDATE: the mod has been upgraded to work with phpLd 4.0.0, please down here
Hello,
making my last mod and upgrading it to 3.x, i found loads of times various category names being repeating, most common being “Blog”!
One would find Blog as a root category, and yet you have Art Weblogs under Arts, Blog Hosting under Hosting,….etc
Now in phpLD approve section, all i have is which category is the site submitted to!
I thought it would be better if I were to know the whole path in the admin section so i know exactly where the submission has been made
heres the hack!
Works on phpLD 3.1 and phpLD 3.2,
Open /admin/dirdb_admin.php and find:
function getFullLinkInfo($id=0)
in that function find!
$sql = "SELECT {$tables['link']['name']}.*, ".$db->IfNull("{$tables['category']['name']}.TITLE", "'Top'")." AS `CATEGORY` FROM `{$tables['link']['name']}` LEFT JOIN `{$tables['category']['name']}` ON ({$tables['link']['name']}.CATEGORY_ID = {$tables['category']['name']}.ID) WHERE {$tables['link']['name']}.ID = ".$db->qstr($id)." LIMIT 1";
Replace this line to :
$sql = "SELECT {$tables['link']['name']}.*, ".$db->IfNull("{$tables['category']['name']}.TITLE", "'Top'")." AS `CATEGORY`, ".$db->IfNull("{$tables['category']['name']}.CACHE_URL", "'#'")." AS `CACHE_URL` FROM `{$tables['link']['name']}` LEFT JOIN `{$tables['category']['name']}` ON ({$tables['link']['name']}.CATEGORY_ID = {$tables['category']['name']}.ID) WHERE {$tables['link']['name']}.ID = ".$db->qstr($id)." LIMIT 1";
2. Now open up /templates/Core/admin/link_details.tpl and Find:
<tr class="{cycle values="odd,even"}"><td class="label">{l}Category{/l}:</td><td class="smallDesc">{if $row.CATEGORY_ID eq '-1'}<span class="orphan">{l}Orphan{/l}</span>{else}{$linkInfo.CATEGORY|escape|trim}({$linkInfo.CATEGORY_ID}{/if}</td></tr>
Replace this by:
<tr class="{cycle values="odd,even"}"><td class="label">{l}Category{/l}:</td><td class="smallDesc">{if $row.CATEGORY_ID eq '-1'}<span class="orphan">{l}Orphan{/l}</span>{else}{$linkInfo.CATEGORY|escape|trim}({$linkInfo.CATEGORY_ID})<br />[{$linkInfo.CACHE_URL|escape|trim}]{/if}</td></tr>
Older builds of the 3.2 version, or 3.1 may have a different line for this, all that has been added to the category line is:
<br />[{$linkInfo.CACHE_URL|escape|trim}]
Done!
Here’s a Screenshot :

Hope this helps someone!
Regards,
M.