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. 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.

If you have different sponsored plans in your eSyndicat directory and want to hide the fields for the extra deeplinks for a certain plan, with id 3 for example and show it for another plan with id 5, you should use this modification after installing the eSyndicat deep links mod.

In this example I assume that you are offering 3 deeplinks for featured listings (id 5) and none for regular ones (id 3). And that the names of the fields for deep links are (title1,url1),(title2,url2),(title3,url3).

Make a copy of header.tpl in the same template folder and call it header-suggest.tpl.
Now edit header-suggest.tpl:
1. Before </head> ADD:

{literal}
<script language="JavaScript">
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}
function p3(){
setVisibility('title1', 'none');
setVisibility('url1', 'none');
setVisibility('title2', 'none');
setVisibility('url2', 'none');
setVisibility('title3', 'none');
setVisibility('url3', 'none');
}
function p5(){
setVisibility('title1', '');
setVisibility('url1', '');
setVisibility('title2', '');
setVisibility('url2', '');
setVisibility('title3', '');
setVisibility('url3', '');
}
</script> 
{/literal}

2. FIND

<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

REPLACE BY

<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"
 onload="p3()">

in suggest-link.tpl

1. FIND

{include file="header.tpl"}

REPLACE BY

{include file="header-suggest.tpl"}

2. FIND

<input type="radio" name="plan" value="{$plan.id}" id="p{$plan.id}" 
{if $smarty.foreach.plans_dsp.iteration eq 1} checked{/if}/>

REPLACE BY

<input type="radio" name="plan" value="{$plan.id}" id="p{$plan.id}" 
{if $smarty.foreach.plans_dsp.iteration eq 1} checked{/if}
{if $plan.id==3} onclick="p3();";
{elseif $plan.id==5} onclick="p5();";{/if}/>

This MOD was not tested but should work just fine. Please report any problems.

March 29th, 2007eSyndicat deeplinks mod

Allowing additional deeplinks in esyndicat is done easily from the admin panel and a small edit of 1 file:

For each additional listing you want to add, do the following:

In “Manage Listing Fields” add two custom fields with the following attributes.

Field1
**************************

Name: title1 
English Title: TITLE 1
Show On Pages: (checked) Suggest Listing
                       (unchecked) Listing Details 
Required Field: No 
Visible for admin only: No 
Field Type: Text
Field Length: 150
Field Default Value:

Field2
**************************

Name: url1 
English Title: URL 1
Show On Pages: (checked) Suggest Listing 
                       (unchecked) Listing Details 
Required Field: No 
Visible for admin only: No 
Field Type: Text
Field Length: 150
Field Default Value:

Edit Template:
******************
To display the additional link in the details page open view-link.tpl

Right after

{foreach from=$fields item=field}
other code .........
{/foreach}

Add the following

{if $link.title1}
<tr>
<td>&nbsp;</td><td><a href="{$link.url1}">
{$link.title1}</a></td>
</tr>
{/if}

That’s it!
Of course you can do the same to add more additional links.

All this applies to the PRO version, I don’t know about the free one.

To see a demo, rakCha web directory

March 24th, 2007iKon Wordpress theme

This theme was designed by JustSkins and was made free by rakcha web directory:

http://www.rakcha.com/wp-templates/IKON-1.jpg

Download
Test run

March 23rd, 2007Moderno Wordpress Theme

This theme was designed by Allied websites and made free by rakCha directory.

Download
Test run


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