In the phpLD directory script you have the ability to add links for defined time periods. They can be set standard in the administration panel as unlimited in which the link is permanent and never expires and also for selectable time periods of 30 days, 90 days, 180 days and 1 year. Upon expiration the links are set as inactive.
With the standard setup of php Link Directory, the expiry date is not automatically set, so the site administrator has to manually add the link expiration date in the admin panel when approving the link submission. This can sometimes be forgotten or possibly done with an improper date.With the following expiry date code directory administrators can now automate the process and have the proper expiration date automatically set for them no matter what their link settings are. For instance if you are setting links for a period of 1 year then all links submitted will be stamped with an expiry date of 365 days. If your settings are for unlimited (permanent) links then there will be no expiration date stamped as the link will never expire.
We have provided basic code and instructions for you below so it will be easy for you to modify your directory for the automatic time stamping of links that will automatically add the expiry date in your phpLD administration panel. In the version 3.2 we have added in a featured year setting to give you an example of how to modify the code for additional custom link types if you have any.Please make sure that you use the proper code for the version of phpLD that you are running. We have provided version 3.2 and then below that we provide the standard code for version 3.3.
Feel free to use this code on any directories that you own. If you find the code useful to your directory then of course we would appreciate a link back to our site: http://phplinkdirectorymods.com or if you like, any donations will be much appreciated and could be sent by PayPal and help with the further releasing of other helpful mods for the php Link Directory script.
For donation information please visit our site and use the donation button on our home page.
Version 3.2 Expiry Date Automatic Time stamping Mod
1. Open your submit.php file.
2. Find the following:
$data['LAST_CHECKED'] = gmdate (’Y-m-d H:i:s’);
$data['DATE_ADDED'] = gmdate (’Y-m-d H:i:s’);
$data['DATE_MODIFIED'] = gmdate (’Y-m-d H:i:s’);
3. Below that - Add the following code below and save:
/////////BELOW LINES EXPIRY DATE STAMP by: http://phplinkdirectorymods.com
if (PAY_ENABLE == ‘1′ && FTR_ENABLE == 1 && $_POST['LINK_TYPE'] == ‘featuredyear’)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+31536000);
}
elseif (PAY_ENABLE == ‘1′ && PAY_UM == ‘1′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+2592000);
}
elseif (PAY_ENABLE == ‘1′ && PAY_UM == ‘2′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d H:i:s”,time()+7776000);
}
elseif (PAY_ENABLE == ‘1′ && PAY_UM == ‘3′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+15552000);
}
elseif (PAY_ENABLE == ‘1′ && PAY_UM == ‘4′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+31536000);
}
else $data['EXPIRY_DATE'] = ‘NULL’;
////////////END EXPIRY DATE TIMESTAMP for phpLD v3.2
Version 3.3 Expiry Date Automatic Time stamping Mod
1. Open your submit.php file.
2. Find the following:
$data['LAST_CHECKED'] = gmdate (’Y-m-d H:i:s’);
$data['DATE_ADDED'] = gmdate (’Y-m-d H:i:s’);
$data['DATE_MODIFIED'] = gmdate (’Y-m-d H:i:s’);
3. Below that - Add the following code below and save:
/////////BELOW LINES EXPIRY DATE STAMP by: http://phplinkdirectorymods.com
if (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘featured’ && PAY_UMF == ‘5′)
{
$data['EXPIRY_DATE'] = ‘NULL’;
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘featured’ && PAY_UMF == ‘2′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+7776000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘featured’ && PAY_UMF == ‘3′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+15552000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘featured’ && PAY_UMF == ‘4′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+31536000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘normal’ && PAY_UMN == ‘5′)
{
$data['EXPIRY_DATE'] = ‘NULL’;
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘normal’ && PAY_UMN == ‘2′ )
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+7776000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘normal’ && PAY_UMN == ‘3′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+15552000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘normal’ && PAY_UMN == ‘4′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+31536000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘reciprocal’ && PAY_UMR == ‘5′)
{
$data['EXPIRY_DATE'] = ‘NULL’;
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘reciprocal’ && PAY_UMR == ‘2′ )
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+7776000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘reciprocal’ && PAY_UMR == ‘3′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+15552000);
}
elseif (PAY_ENABLE == ‘1′ && $_POST['LINK_TYPE'] == ‘reciprocal’ && PAY_UMR == ‘4′)
{
$data['EXPIRY_DATE'] = date(”Y-m-d”,time()+31536000);
}
else
$data['EXPIRY_DATE'] = ‘NULL’;
//////////END EXPIRY DATE
Your php Link Directory should now be set to correctly and automatically add the link expiration date if it is suppose to have one.
We release this mod in the hopes that it will be helpful to fellow directory owners and operators of the phpLD directory script.Again if you find this useful and would like to add a link to our website or give a donation it would be appreciated.
The new MiddleEarth template uses the colours of Earth and sea and was created for phpLD 3.2 with only one sponsored link required (no link to the designer required).
Some of the new template features include showing latest featured on the homepage as well as most popular categories and statistics in the left sidebar.
A very nice well validating template with good new features designed for phpLD version 3.2.
Below you can veiw a screenshot of the template.

A live demo with additional mods can be seen at: Jooomla SEO Directory
NOTES:
In order to show the featured links and most popular categories on the homepage of your directory you must replace or edit the init.php with the one provided in the zip. There is also a psd file provided to make it easier for you to modify your site name and design.
You may download this well designed template from here.
Download MiddleEarth Template for phpLD v3.2
Here we are compiling a list of sites that have free icons available for download and also favicon icon generator sites that have free online tools to generate a favicon icon for your website. Some of these sites and tools can provide you with additional resources to help you with the design and development of your phpLD directory website.
Free Favicon Creation Sites - Make your favicon online instantly.
We will now be working on incorporating the new Wordpress version 2.2.1 into our php link directory site. Soon hopefully we will have this done and begin providing information, additional mods, along with tips and tricks about the most popular directory script - php Link Directory.
We have incorporated Wordpress by making some new template pages - header, index, and footer and using some of our template code for the display and then installing the Worpress php code in the proper places and saving the new template pages as Wordpress php files. Then taking the site template css style sheet and adding in some css for the Wordpress display and saving it in the new Wordpress template. As you can see the Wordpress blog now looks just about the same as the home page in the php Link Directory Mods directory giving the blog a nice blended look into the site.
Next we will work on full smarty template integration for Wordpress and then if successful we will tell about it here on our new blog and set up a download for complete instructions. This would probably be the best way to integrate Wordpress into the phpLD directory as it is powered by the smarty template system.
But for now it can be integrated by using the process of making some cloned html pages of your site and adding in the Wordpress php code and and then saving as php pages in your existing Wordpress template. For instance what I did was to take the default Wordpress template and then make a new index and header page using my html code for my site’s template stripping out any smarty code. Then I added in the Wordpress index.php code into my index template clone and then saved it as the new index.php and did the same process to the header but only using the necessary code and then saved that as the new header.php in the Wordpress default template. If you try this process it will work but you will have to have some patience and play around with the new template pages and your css code to get the look you want. You also will need to make a custom sidebar page and add your Wordpress sidebar.php code to that saving the new page as sidebar.php so your sidebar will display to blend in with your site. I will modify this post later with a little more details on the above integration process and hopefully have a smarty version to share soon.
Good luck and happy blogging with your new phpLD integrated with Wordpress.