How to Remove Details Pages From PHPLD
I had a friend that I had networked with via Google+ . He had recently bought the famed Web Directory platform called PHP Link Directory or PHPLD for short. He e-mailed me to inquire how to remove a specific function from his listing pages. I am not an expert in the area of PHP. Nor did I know much about PHPLD. I do however have a decent grasp on navigating PHP and code in general and modifying it. So I thought I would lend a hand and learn a thing or two
It makes sense in why he wanted to remove the details pages that were linked to every submitted link listed in his web directory. If your not trying to build a flashy full feature link directory then there is no sense in giving away your precious crawler time, allowing the cralwer bot to crawl and possibly index pages such as this. Web direcotries can become fairly large if you get the right traffic. Not to mention if you had interest to mimic the world largest and most complete web directory http://dmoz.org , they present a minimal and clean cut, to the point design.
My Search Engine Optimization rant shall conclude,moving forward.
- In your admin page point your browser to > System
- > Template Manager
- Point to the current template you are using
- You should find > link.tpl
- (Be sure to back up link.tpl)
- Find this section of code and remove the red highlighted section (in Notepad++ it was lines 22 -35 may vary i assume)
<p>
{$link.DESCRIPTION|trim} - [<a href="{if !$smarty.const.ENABLE_REWRITE}
{$smarty.const.DOC_ROOT}/detail.php?id={$link.ID}
{else}
{$smarty.const.DOC_ROOT}/detail/link-{$link.ID}.html{/if}" title="{l}Read more about{/l}: {$link.TITLE|escape|trim}">{l}Read more{/l}</a>
{if ($smarty.const.REQUIRE_REGISTERED_USER == 1 || $smarty.const.REQUIRE_REGISTERED_USER_ARTICLE == 1) and !empty ($regular_user_details) and ($regular_user_details.ID == $link.OWNER_ID)}
, <a href="{$smarty.const.DOC_ROOT}/submit.php?linkid={$link.ID}" title="{l}Edit or Remove your link{/l}">{l}Review{/l}</a>
{/if}
]
</p>
As you can see I left intact:
<p>
{$link.DESCRIPTION|trim}
</p>
Now I assume he will be asking me how to remove the detail pages from the sitemap.xml !
Comments
Thank you for sharing! It gave me inspiration. Hope you have with the good work!
The pleasure is all mine. Glad to hear that you gained some inspiration!