This is the deep links mod for phpld 3.3.
The changes needed for the template files are applied to the default template “Professional”. If you use another template you will have to modify your template files (submit.tpl, detail.tpl and header.tpl).
UPGRADE: If you have already installed the mod for 3.2 all you have to do is overwrite the files and apply the required modifications for your template files.
FRESH INSTALL: you need to upload and overwrite the files in the package and then rerun the install script for the directory (/install/index.php, if already deleted, reupload it again and then delete it after installation). Don’t forget to apply the required changes to your template files.

Download phpld 3.3 Deeplinks mods - easy install Version 1.0

Downloaded a total of 4008 times

If you prefer not to rerun the phpld install script, you can create a php file in the admin folder with the following lines:

<?php 
require_once 'init.php';

$db->Execute("ALTER TABLE `PLD_LINK` ADD `TITLE1` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `TITLE2` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `TITLE3` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `TITLE4` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `TITLE5` VARCHAR( 255 ) NULL ;");


$db->Execute("ALTER TABLE `PLD_LINK` ADD `URL1` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `URL2` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `URL3` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `URL4` VARCHAR( 255 ) NULL ;");
$db->Execute("ALTER TABLE `PLD_LINK` ADD `URL5` VARCHAR( 255 ) NULL ;");

echo "done";
?>

save it as db_deeplinks.php in /admin/ and open it in your browser http://www.yourdirectory/admin/db_deeplinks.php

This will add the required fields to the database.

This is a one step install of the deep links mod. It is assumed that the defaut template is used. If you use another template you can still use this easy install and then modify just 3 template files (submit.tpl, header.tpl and detail.tpl)

This MOD will add 2 payment options Featured+ with 5 deep links and Regular+ with 3 deep links. The Featured and Regular will have no deep links. demo

To install the deep links mod, all you have to do is unzip the content of zip file below in the folder where your directory is installed (usually public_html). Overwrite all existing files and then run the installer by pointing to yourdirectory/install/index.php
You are done!

Download Deep Links MOD

Downloaded a total of 4125 times

If you use a template that is not the default one, you still have some work to do. You will have to edit 3 files.
More details can be found here.

Important: This is for version 3.2

After installing the 1 step deep links mod, you need to modify the following template files:
/templates/yourtemplate/submit.tpl
/templates/yourtemplate/detail.tpl
/templates/yourtemplate/header.tpl

Template coders can apply these changes to their templates and offer deep links ready templates.

1. edit header.tpl
Right before </head>, add

{* Deep Links by rakCha http://blog.rakcha.com *}
<script type="text/javascript" 
src="{$smarty.const.DOC_ROOT}/javascripts/deeplinks.js"></script>

2. edit.submit.tpl
FIND

{if $price.featured}

ABOVE that, ADD

{if $price.featured_adv}
<tr><td><input type="radio" name="LINK_TYPE" value="featured_adv"
{if $LINK_TYPE eq 'featured_adv'}checked="true"{/if} 
 onclick="featured();"; >
Featured links +
</td>
<td>{$smarty.const.HTML_CURRENCY_CODE}{$price.featured_adv}
</td>
</tr>
{/if}

FIND

{if $price.normal gt 0}

ABOVE that, ADD

{if $price.normal_adv gt 0}
<tr>
<td><input type="radio" name="LINK_TYPE" value="normal_adv"
{if $LINK_TYPE eq 'normal_adv'}checked="true"{/if} onclick="regular();"; >
{l}Regular links +{/l}
</td>
<td>{$smarty.const.HTML_CURRENCY_CODE}{$price.normal_adv}
</td>
</tr>
{/if}

FIND:

<input type="radio" name="LINK_TYPE" value="featured"
 {if $LINK_TYPE eq 'featured'}checked="true"{/if}>

REPLACE BY:

<input type="radio" name="LINK_TYPE" value="featured"
 {if $LINK_TYPE eq 'featured'}checked="true"{/if}
  onclick="no_deeplinks();"; >

FIND:

<input type="radio" name="LINK_TYPE" value="normal"
 {if $LINK_TYPE eq 'normal'}checked="true"{/if}>

REPLACE BY:

<input type="radio" name="LINK_TYPE" value="normal"
 {if $LINK_TYPE eq 'normal'}checked="true"{/if}
 onclick="no_deeplinks();"; >

There are 2 Instances of this, for free and paid regular links.

FIND:

<input type="radio" name="LINK_TYPE" value="reciprocal"
 {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if}>

REPLACE BY:

<input type="radio" name="LINK_TYPE" value="reciprocal"
 {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if}
 onclick="no_deeplinks();"; >

FIND:

<tr>
   <td class="label">{l}Description{/l}:</td>

ABOVE it, ADD:

<tr id="field1_title" style="display:none">
<td class="label">TITLE 1</td>
<td class="field"><input type="text"  id="TITLE1"  
name="TITLE1" value="{$TITLE1|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field1_url" style="display:none">
<td class="label">URL 1</td>
<td class="field"><input type="text"  id="URL1" 
name="URL1" value="{$URL1|escape|trim}"
size="40" maxlength="255" class="text"/>
</td>
</tr> 
<tr id="field2_title" style="display:none">
<td class="label">TITLE 2</td>
<td class="field"><input type="text" id="TITLE2" 
name="TITLE2" value="{$TITLE2|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field2_url" style="display:none">
<td class="label">URL 2</td>
<td class="field"><input type="text"  id="URL2"  
name="URL2" value="{$URL2|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr> 
<tr id="field3_title" style="display:none">
<td class="label">TITLE 3</td>
<td class="field"><input type="text"  id="TITLE3"  
name="TITLE3" value="{$TITLE3|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field3_url" style="display:none">
<td class="label">URL 3</td>
<td class="field"><input type="text"  id="URL3"  
name="URL3" value="{$URL3|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr> 
<tr id="field4_title" style="display:none">
<td class="label">TITLE 4</td>
<td class="field"><input type="text"  id="TITLE4"  
name="TITLE4" value="{$TITLE4|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field4_url" style="display:none">
<td class="label">URL 4</td>
<td class="field"><input type="text"  id="URL4"  
name="URL4" value="{$URL4|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr> 
<tr id="field5_title" style="display:none">
<td class="label">TITLE 5</td>
<td class="field"><input type="text"  id="TITLE5"  
name="TITLE5" value="{$TITLE5|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field5_url" style="display:none">
<td class="label">URL 5</td>
<td class="field"><input type="text"  id="URL5"  
name="URL5" value="{$URL5|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>

3. in detail.tpl
FIND:

<tr>
<td class="label">{l}Description{/l}:</td>
<td class="smallDesc" align="left">
{$DESCRIPTION|escape|trim}</td>
</tr>

BELOW, ADD:

{if $TITLE1}   
<tr>
<td class="label">{l}Quick Links:{/l}</td>
<td class="smallDesc" align="left">
<a href="{$URL1|escape|trim}">
{$TITLE1|escape|trim}</a>&nbsp;
<a href="{$URL2|escape|trim}">
{$TITLE2|escape|trim}</a>&nbsp;
<a href="{$URL3|escape|trim}">
{$TITLE3|escape|trim}</a>&nbsp;
<a href="{$URL4|escape|trim}">
{$TITLE4|escape|trim}</a>&nbsp;
<a href="{$URL5|escape|trim}">
{$TITLE5|escape|trim}</a>&nbsp;
</td>
</tr>   
{/if}

Install the phpld deeplinks mod before applying the modification below.

To validate the additional deeplinks you will have to add the following:

First in submit.php
AFTER:

SmartyValidate :: register_validator('v_URL',
'URL','isURL', false, false, 'trim', 'submit_link');

ADD:

SmartyValidate :: register_validator('v_URL1',
 'URL1','isURL',true,false,'trim','submit_link');
SmartyValidate :: register_validator('v_URL1_ONLINE',
 'URL1','isURLOnline',true,false,null,'submit_link');

FINALLY in submit.tpl
AFTER:

<input type="text" name="URL1"
value="{$URL1|escape|trim}" size="40"
 maxlength="255" class="text"/>

ADD:

{validate form="submit_link" id="v_URL1"
 message=$smarty.capture.invalid_url}
{validate form="submit_link" id="v_URL1_ONLINE"
 message=$smarty.capture.url_not_online}

This will allow to validate the URL1 field when it is not empty. You should do the same for all URLs that you want to validate (straightforward).

Before applying this modification, please install first the deep links mod for phpld

This MOD is updating to allow the 5 deep links for featured listings, 3 deep links for regular and none for reciprocal. A question that has been asked many times.

First add the javascript code in header.tpl
RIGHT BEFORE </head>
ADD:

{literal}
<script language="JavaScript">
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
style="display:none"
}
function featured(){
setVisibility('field1_title', '');
setVisibility('field1_url', '');
setVisibility('field2_title', '');
setVisibility('field2_url', '');
setVisibility('field3_title', '');
setVisibility('field3_url', '');
setVisibility('field4_title', '');
setVisibility('field4_url', '');
setVisibility('field5_title', '');
setVisibility('field5_url', '');
}
function regular(){
setVisibility('field1_title', '');
setVisibility('field1_url', '');
setVisibility('field2_title', '');
setVisibility('field2_url', '');
setVisibility('field3_title', '');
setVisibility('field3_url', '');
setVisibility('field4_title', 'none');
setVisibility('field4_url', 'none');
setVisibility('field5_title', 'none');
setVisibility('field5_url', 'none');
}
function reciprocal(){
setVisibility('field1_title', 'none');
setVisibility('field1_url', 'none');
setVisibility('field2_title', 'none');
setVisibility('field2_url', 'none');
setVisibility('field3_title', 'none');
setVisibility('field3_url', 'none');
setVisibility('field4_title', 'none');
setVisibility('field4_url', 'none');
setVisibility('field5_title', 'none');
setVisibility('field5_url', 'none');
}
</script>{/literal}

SECOND open submit.tpl
FIND:

<input type="radio" name="LINK_TYPE" value="featured"
 {if $LINK_TYPE eq 'featured'}checked="true"{/if}>

REPLACE BY:

<input type="radio" name="LINK_TYPE" value="featured"
 {if $LINK_TYPE eq 'featured'}checked="true"{/if}
  onclick="featured();"; >

FIND:

<input type="radio" name="LINK_TYPE" value="normal"
 {if $LINK_TYPE eq 'normal'}checked="true"{/if}>

REPLACE BY:

<input type="radio" name="LINK_TYPE" value="normal"
 {if $LINK_TYPE eq 'normal'}checked="true"{/if}
 onclick="regular();"; >

There are 2 Instances of this, for free and paid regular links.

FIND:

<input type="radio" name="LINK_TYPE" value="reciprocal"
 {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if}>

REPLACE BY:

<input type="radio" name="LINK_TYPE" value="reciprocal"
 {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if}
 onclick="reciprocal();"; >

Finally, in submit.tpl

FIND:

<tr>
    <td class="label">TITLE 1</td>
    <td class="field"><input type="text"
 name="TITLE1" value="{$TITLE1|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
    <tr>
    <td class="label">URL 1</td>
    <td class="field"><input type="text"
 name="URL1" value="http://{$URL1|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">TITLE 2</td>
    <td class="field"><input type="text"
 name="TITLE2" value="{$TITLE2|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
    <tr>
    <td class="label">URL 2</td>
    <td class="field"><input type="text"
 name="URL2" value="http://{$URL2|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">TITLE 3</td>
    <td class="field"><input type="text"
 name="TITLE3" value="{$TITLE3|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
    <tr>
    <td class="label">URL 3</td>
    <td class="field"><input type="text"
 name="URL3" value="http://{$URL3|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">TITLE 4</td>
    <td class="field"><input type="text"
 name="TITLE4" value="{$TITLE4|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">URL 4</td>
    <td class="field"><input type="text"
 name="URL4" value="http://{$URL4|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>  
  <tr>
    <td class="label">TITLE 5</td>
    <td class="field"><input type="text"
 name="TITLE5" value="{$TITLE5|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
    <tr>
    <td class="label">URL 5</td>
    <td class="field"><input type="text"
 name="URL5" value="http://{$URL5|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>

REPLACE BY:

<tr id="field1_title" style="display:none">
<td class="label">TITLE 1</td>
<td class="field"><input type="text"
name="TITLE1" value="{$TITLE1|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field1_url" style="display:none">
<td class="label">URL 1</td>
<td class="field"><input type="text" 
name="URL1" value="{$URL1|escape|trim}"
size="40" maxlength="255" class="text"/>
</td>
</tr> 
<tr id="field2_title" style="display:none">
<td class="label">TITLE 2</td>
<td class="field"><input type="text"
name="TITLE2" value="{$TITLE2|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field2_url" style="display:none">
<td class="label">URL 2</td>
<td class="field"><input type="text"
name="URL2" value="{$URL2|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr> 
<tr id="field3_title" style="display:none">
<td class="label">TITLE 3</td>
<td class="field"><input type="text"
name="TITLE3" value="{$TITLE3|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field3_url" style="display:none">
<td class="label">URL 3</td>
<td class="field"><input type="text"
name="URL3" value="{$URL3|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr> 
<tr id="field4_title" style="display:none">
<td class="label">TITLE 4</td>
<td class="field"><input type="text"
name="TITLE4" value="{$TITLE4|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field4_url" style="display:none">
<td class="label">URL 4</td>
<td class="field"><input type="text"
name="URL4" value="http://{$URL4|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr> 
<tr id="field5_title" style="display:none">
<td class="label">TITLE 5</td>
<td class="field"><input type="text"
name="TITLE5" value="{$TITLE5|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>
<tr id="field5_url" style="display:none">
<td class="label">URL 5</td>
<td class="field"><input type="text"
name="URL5" value="http://{$URL5|escape|trim}"
size="40" maxlength="255" class="text"/></td>
</tr>

Please apply the phpld deeplinks mod before adding this feature.

This will give you the ability to show and edit the additional fields in the admin panel. 3 Files will be edited so I recommend that you back them up before applying the modifications.
Files to edit:
admin/dir_approve_links.php,
templates/Core/admin/link_details.tpl,
templates/Core/admin/dir_links_edit.tpl.

First in admin/dir_approve_links.php
FIND:

$columns = array ('TITLE' => _L('Title'),
'URL' => _L('URL'),
'DESCRIPTION' => _L('Description'),
'CATEGORY' => _L('Category'),
'RECPR_URL' => _L('Recpr. Link URL'),
'PAGERANK' => _L('Pagerank'),
'DATE_ADDED' => _L('Date Added'));

REPLACE BY:

$columns = array ('TITLE' => _L('Title') ,
'URL' => _L('URL'), 'TITLE1' => _L('Title1'),
'URL1' => _L('URL1') , 'TITLE2' => _L('Title2'),
'URL2' => _L('URL2') , 'TITLE3' => _L('Title3'),
'URL3' => _L('URL3') , 'TITLE4' => _L('Title4'),
'URL4' => _L('URL4') , 'TITLE5' => _L('Title5'),
'URL5' => _L('URL5'),
'DESCRIPTION' => _L('Description'),
'CATEGORY' => _L('Category'),
'RECPR_URL' => _L('Recpr. Link URL'),
'PAGERANK' => _L('Pagerank'),
'DATE_ADDED' => _L('Date Added'));

Second, in templates/admin/link_details.tpl
FIND:

<tr class="{cycle values="odd,even"}">
<td class="label">URL:</td>
<td class="smallDesc">{$linkInfo.URL|escape|trim}
</td>
</tr>

BELOW it, ADD:

<tr class="{cycle values="odd,even"}">
<td class="label">Title1:</td>
<td class="smallDesc">{$linkInfo.TITLE1|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">URL1:</td>
<td class="smallDesc">{$linkInfo.URL1|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">Title2:</td>
<td class="smallDesc">{$linkInfo.TITLE2|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">URL2:</td>
<td class="smallDesc">{$linkInfo.URL2|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">Title3:</td>
<td class="smallDesc">{$linkInfo.TITLE3|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">URL3:</td>
<td class="smallDesc">{$linkInfo.URL3|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">Title4:</td>
<td class="smallDesc">{$linkInfo.TITLE4|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">URL4:</td>
<td class="smallDesc">{$linkInfo.URL4|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">Title5:</td>
<td class="smallDesc">{$linkInfo.TITLE5|escape|trim}
</td>
</tr>

<tr class="{cycle values="odd,even"}">
<td class="label">URL5:</td>
<td class="smallDesc">{$linkInfo.URL5|escape|trim}
</td>
</tr>

FINALLY in templates/admin/dir_links_edit.tpl
FIND

<tr>
<td class="label required">
<label for="URL">URL:</label></td>
<td class="smallDesc">
<input type="text" id="URL" name="URL"
 value="{$URL|escape|trim}" class="text"/>
{validate form="dir_links_edit" id="v_URL"
 message=$smarty.capture.invalid_url}
{validate form="dir_links_edit" id="v_URL_U"
 message=$smarty.capture.url_not_unique}
</td>
</tr>

BELOW it , ADD

<tr>
<td class="label"><label for="TITLE1">
Title1:</label></td>
<td class="smallDesc">
<input type="text" id="TITLE1" name="TITLE1"
 value="{$TITLE1|escape|trim}" class="text" />           
</td>
</tr>
<tr>
<td class="label"><label for="URL1">
URL1:</label></td>
<td class="smallDesc">
<input type="text" id="URL1" name="URL1"
 value="{$URL1|escape|trim}" class="text"/>
</td>
</tr>
      
<tr>
<td class="label"><label for="TITLE2">
Title2:</label></td>
<td class="smallDesc">
<input type="text" id="TITLE2" name="TITLE2"
 value="{$TITLE2|escape|trim}" class="text" />           
</td>
</tr>
<tr>
<td class="label"><label for="URL2">
URL2:</label></td>
<td class="smallDesc">
<input type="text" id="URL2" name="URL2"
 value="{$URL2|escape|trim}" class="text"/>
</td>
</tr>
      
<tr>
<td class="label"><label for="TITLE3">
Title3:</label></td>
<td class="smallDesc">
<input type="text" id="TITLE3" name="TITLE3"
 value="{$TITLE3|escape|trim}" class="text" />           
</td>
</tr>
<tr>
<td class="label"><label for="URL">
URL3:</label></td>
<td class="smallDesc">
<input type="text" id="URL3" name="URL3"
 value="{$URL3|escape|trim}" class="text"/>
</td>
</tr>
      
<tr>
<td class="label"><label for="TITLE4">
Title4:</label></td>
<td class="smallDesc">
<input type="text" id="TITLE4" name="TITLE4"
 value="{$TITLE4|escape|trim}" class="text" />           
</td>
</tr>
<tr>
<td class="label"><label for="URL4">
URL4:</label></td>
<td class="smallDesc">
<input type="text" id="URL4" name="URL4"
 value="{$URL4|escape|trim}" class="text"/>
</td>
</tr>
      
<tr>
<td class="label"><label for="TITLE5">
Title5:</label></td>
<td class="smallDesc">
<input type="text" id="TITLE5" name="TITLE5"
 value="{$TITLE5|escape|trim}" class="text" />           
</td>
</tr>
<tr>
<td class="label"><label for="URL5">
URL5:</label></td>
<td class="smallDesc">
<input type="text" id="URL5" name="URL5"
 value="{$URL5|escape|trim}" class="text"/>
</td>
</tr>

The second step will show the additional fields when hovering over the link title in admin panel when approving links or viewing links.

The third step will show them when editing the listing in the admin panel.

Many thanks to Bobby from the forums of phpld for all the help he gives to the members there.

April 23rd, 2007Phpld deeplinks mod

This modification allows to offer deeplinks in your directory. What are deeplinks you may ask? Well, information about this topic is certainly hard to find. Even blogs about various subjects may not contain such information. Read on and you may find something useful from this post. It is a safe modification but you are better off backing up the database and the following files:
include/tables.php
/detail.php
submit.tpl
detail.tpl
You might as well test it in your test directory first. I tested it on version 3.2 and it works great.

First: we have to add additional fields in the PLD_LINK table:

1. Open include/tables.php
FIND:

'RECPR_EXPIRED' => 'L NOTNULL DEFAULT 0'

REPLACE BY:

'RECPR_EXPIRED' => 'L NOTNULL DEFAULT 0' ,
'TITLE1' => 'C(255) NULL' ,
'URL1' => 'C(255) NULL' ,
'TITLE2' => 'C(255) NULL' ,
'URL2' => 'C(255) NULL' ,
'TITLE3' => 'C(255) NULL' ,
'URL3' => 'C(255) NULL' ,
'TITLE4' => 'C(255) NULL' ,
'URL4' => 'C(255) NULL' ,
'TITLE5' => 'C(255) NULL' ,
'URL5' => 'C(255) NULL'

2. NOW rerun the install script by pointing to install/index.php, this will update the table structure.

Second: Modify the submit form:

in submit.tpl
FIND:

<tr>
   <td class="label">Description:</td>

ABOVE it, ADD:

<tr>
    <td class="label">TITLE 1</td>
    <td class="field"><input type="text"
 name="TITLE1" value="{$TITLE1|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">URL 1</td>
    <td class="field"><input type="text"
 name="URL1" value="{$URL1|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>  
  <tr>
    <td class="label">TITLE 2</td>
    <td class="field"><input type="text"
 name="TITLE2" value="{$TITLE2|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">URL 2</td>
    <td class="field"><input type="text"
 name="URL2" value="{$URL2|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>  
  <tr>
    <td class="label">TITLE 3</td>
    <td class="field"><input type="text"
 name="TITLE3" value="{$TITLE3|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">URL 3</td>
    <td class="field"><input type="text"
 name="URL3" value="{$URL3|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>  
  <tr>
    <td class="label">TITLE 4</td>
    <td class="field"><input type="text"
 name="TITLE4" value="{$TITLE4|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
  <tr>
    <td class="label">URL 4</td>
    <td class="field"><input type="text"
 name="URL4" value="{$URL4|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>  
  <tr>
    <td class="label">TITLE 5</td>
    <td class="field"><input type="text"
 name="TITLE5" value="{$TITLE5|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>
    <tr>
    <td class="label">URL 5</td>
    <td class="field"><input type="text"
 name="URL5" value="{$URL5|escape|trim}"
 size="40" maxlength="255" class="text"/></td>
  </tr>

Finally Show the additional links in the details page.
To do so, we have to modify detail.php and detail.tpl

1. in detail.tpl
FIND:

<tr>
<td class="label">Description:</td>
<td class="smallDesc" align="left">
{$DESCRIPTION|escape|trim}</td>
</tr>

BELOW, ADD:

<tr>
<td class="label">Products/Services:</td>
<td class="smallDesc" align="left">
<a href="{$URL1|escape|trim}">
{$TITLE1|escape|trim}</a>&nbsp;
<a href="{$URL2|escape|trim}">
{$TITLE2|escape|trim}</a>&nbsp;
<a href="{$URL3|escape|trim}">
{$TITLE3|escape|trim}</a>&nbsp;
<a href="{$URL4|escape|trim}">
{$TITLE4|escape|trim}</a>&nbsp;
<a href="{$URL5|escape|trim}">
{$TITLE5|escape|trim}</a>&nbsp;
</td>
</tr>

2. in detail.php
FIND:

$data['META_DESCRIPTION'] = $rdata['META_DESCRIPTION'];

BELOW it, ADD:

$data['TITLE1']    = $rdata['TITLE1']; 
$data['URL1']    = $rdata['URL1']; 
$data['TITLE2']    = $rdata['TITLE2']; 
$data['URL2']    = $rdata['URL2']; 
$data['TITLE3']    = $rdata['TITLE3']; 
$data['URL3']    = $rdata['URL3']; 
$data['TITLE4']    = $rdata['TITLE4']; 
$data['URL4']    = $rdata['URL4']; 
$data['TITLE5']    = $rdata['TITLE5']; 
$data['URL5']    = $rdata['URL5'];

 You are done, now all plans (regular and featured will have the optional 5 additional links.
To modify the number of additional links the code above should be modified accordingly (straightforward).

To allow a lower number of additional links for regular listings a simple javascript code can be added to the radio buttons of payment to hide some of the fields when “regular” is selected. Otherwise you can juste allow the same number of links for all plans.

Another additional feature could be to check if the deeplinks come from the same domain. Use your imagination.
I think this modification can be used for all versions of phpld but I only tested it on 3.2. These steps can be done everytime you upgrade the script, so you might bookmark this page or copy its content.
Feel free to improve this mod.


© 2007 rakCha resources | Powered by Wordpress | rakCha web directory