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">{l}Description{/l}:</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">{l}Description{/l}:</td>
<td class="smallDesc" align="left">
{$DESCRIPTION|escape|trim}</td>
</tr>
BELOW, ADD:
<tr>
<td class="label">{l}Products/Services:{/l}</td>
<td class="smallDesc" align="left">
<a href="{$URL1|escape|trim}">
{$TITLE1|escape|trim}</a>
<a href="{$URL2|escape|trim}">
{$TITLE2|escape|trim}</a>
<a href="{$URL3|escape|trim}">
{$TITLE3|escape|trim}</a>
<a href="{$URL4|escape|trim}">
{$TITLE4|escape|trim}</a>
<a href="{$URL5|escape|trim}">
{$TITLE5|escape|trim}</a>
</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.
April 23rd, 2007 at 5:58 pm
2. NOW rerun the install script by pointing to install/index.php, this will update the table structure.
Can you give a little more information on this part?
April 23rd, 2007 at 6:24 pm
If you renamed or removed /install/index.php, put it back and point your browser to it. It is like you are reinstalling the script (you won’t lose any data or configuration). Don’t forget to remove that file when done from this step.
Hope that helps.
April 24th, 2007 at 1:31 am
I followed each steps and I see it on the submit forms with 5 additional deeplinks. I have tested it over and over again as I submit deeplinks, but it does show in the admin panel nor will it show after it has been listed and only one link is listed as if the deeplink mod is not even there.
What happens now?
April 24th, 2007 at 10:05 am
Hi John, did you run the install script, that’s very important to add the additional fields (TITLE1, URL1, …) to the PLD_LINK table. If you did and you have access to phpmyadmin, you can check the structure of the table to check if they were added.
Editing detail.php is also very important to rretrieve the data from the table so you can show it in the details page.
April 24th, 2007 at 5:21 pm
If you are uncomfortable running the installation again do this:
save the code below in a file called deeplinks.sql and import it in phpmyadmin.
ALTER TABLE `PLD_LINK` ADD `TITLE1` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `TITLE2` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `TITLE3` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `TITLE4` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `TITLE5` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `URL1` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `URL2` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `URL3` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `URL4` TEXT NULL ;
ALTER TABLE `PLD_LINK` ADD `URL5` TEXT NULL ;
This will add the additional fields to the PLD_LINK table. You can find additional info here
May 1st, 2007 at 1:42 pm
“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.”
I installed the mod but I want to offer deep links with featured link. I think this is the solution you wrote above but couldn’t understand very clearly. Can you explain and show the way hot to do that?
Thanks
May 1st, 2007 at 11:56 pm
wow, thank you
I was wanting to add the deeplinks to my new dir and couldn’t find the instructions anywhere.
I’ll post a link back to your site, I know some other phpld owners that would like this info.
cheers
May 2nd, 2007 at 12:53 am
muskur, to allow deeplinks for featured listings only you will have to use this modification http://blog.rakcha.com/2007/04/24/phpld-deeplinks-mod-hide-fields/
you can use the following javascript instead and modify it to suit your needs.
You should also add style=”display:none” to the 3 first fields as was done for field 4 and 5. This way when you load the page, all fields are hidden and when you click on the featured radio button, they appear.
May 2nd, 2007 at 12:57 am
Thanks Brandon, please feel free to share it and thanks for the link
May 15th, 2007 at 11:43 pm
Hi admin
Its working everything fine for me except for reciprocal links in that i dont want extra deep links,i need only normal like “Title,URL,Description,name, email” i want to remove those extra links so what modifications should i do Please provide me a solution as soon as possible.
anyway thanks for the mod
May 16th, 2007 at 12:56 pm
Rama,
You should add a function in the javascript code called recip() which will set the visibility for all the fields to ‘none’ and call this function from the radio button of reciprocal links.
May 28th, 2007 at 3:20 am
Can you make this one available for php link bid?
May 28th, 2007 at 5:15 am
i cant find the description file in the submit.tpl..also,i no longer have the install file,but i imported the files deeplink.sql and got an error….anyone want to give me a hand installing this please?
May 30th, 2007 at 1:15 pm
Sorry Shutz I don’t have any licence for phplinkbid as I am not interested in that concept.
May 30th, 2007 at 1:19 pm
@Jeff, try to place the code anywhere in the submit.tpl and you will figure out how to correct the placement afterwards.
as for the install.php, you will have to place it back, you can get it from the original copy of the script. the deeplink.sql probably didn’t work because you already have those fields (Title1, URL1,….) in the PLD_LINK table already? you can check in phpmyadmin.
May 31st, 2007 at 1:24 am
You can see it added here for phplinkbid: http://www.thebiddir.com
I had to change the buy page but this doesn’t seems to break anything.
June 11th, 2007 at 5:00 am
Thanks for the mods. It is working you can check it here.
http://urlsdirectory.com
June 15th, 2007 at 5:48 pm
Hey,
Do you know where I can find such a javascript to only allow the Featured Submissions to see the Deep Link options?
Thanks
Nima
June 22nd, 2007 at 2:09 am
What is the sql command to add the additional links on an already existing listing? let’s say for id 500? should be something like insert into pld_links where id=500 title 1 url 1 but don’t know exactly
June 22nd, 2007 at 11:33 am
Hey,
How can I add fields to each link in the admin area so I can edit the deep links?
I appreciate your help.
Nima
June 22nd, 2007 at 11:50 am
This is covered here:
http://blog.rakcha.com/2007/04/24/phpld-deeplinks-mod-additional-features/