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>
<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.
38 Responses to “Phpld deeplinks mod”
Leave a Reply
You must be logged in to post a comment.

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/
July 1st, 2007 at 2:46 pm
hi, I tried your phpld deeplink mod and i have gone over each step to make sure i did not leave anything out, but it does not show in the details pages. I ran the install/index.php, added the tables in phpmyadmin, please suggest a solution, thanks in advance.
July 1st, 2007 at 7:00 pm
Please make sure the fields were created in the PLD_LINK table (in phpmyadmin) and that you edited detail.php accordingly.
July 2nd, 2007 at 11:52 am
How could it work in phpld 2.0
I have installed it in my directory. But nothing is adding in the database. What could be the problem.
July 2nd, 2007 at 10:55 pm
Like I said I already checked, everything is there, but this is all that shows on the detail page “Products/Services:” it is not showing the additional titles or url’s. what now?
July 5th, 2007 at 6:15 am
Dear Admin
When i manually add in the sql table it saves the data.
But when it inserted through submit form only deep links data is not saved what could be the reason for this.
July 5th, 2007 at 12:27 pm
Hi Admin,
Your mod is Excellent, I have recieved many compliments about your mod from my Friends and they suggested me to take a look at it rather than going for a paid one. Well the tutorial is superb but the only thing which wanted to know is that Will it be working with the latest version of phpld that is 3.2 or not. As i have tried but cant find the steps you wrote above. Well can it be possible to have a tutorial for 3.2.
Thanks
Muneeb
July 5th, 2007 at 3:10 pm
@raje, I don’t know about version 2, but make sure the names of the fields in the submit form are the same as those of the PLD_LINK table of the database.
@Muneed, This is for version 3.2! .tpl files are templates files, table.php in under /include/ and detail.php is under root.
August 18th, 2007 at 11:59 pm
Hello. I installed the script on my phpld3.0 directory. Installation is a snap, and it worked at the first try. I have a suggestion. Currently we can not see the deeplinks when reviewing the submission. I feel this can be a problem as some submitters could be including non-related (or spammy) links. It would be great to have this as well. Just the approve_links page showing the deeplinks.
Thanks, great job!
August 19th, 2007 at 2:31 pm
Regarding installing the script on 2.0 (2.1 in my case) it seems to me it can’t be done as there is no details page in this version of phpld.
August 24th, 2007 at 1:26 am
[...] The deep links mod has been installed on our directory. This mod, of course, is a must have for all paid directory owners. So if you have yet to installed this on your directory, PM An0n at DP or use Rakcha’s free phpld deep links mod. [...]
August 27th, 2007 at 4:21 pm
I just installed it on http://www.xtremedirectory.com it is not a paid directory yet. but I am just trying to build up my name!. great mod homie.
September 8th, 2007 at 1:25 pm
When I submit on the submit.php page nothing happens, the same page shows up. It don’t take me to the payment form?
December 23rd, 2007 at 9:32 pm
Hi,
I just setup the deep links on my site, but end-users still entering the deep link in Regular Links and regular link is now allowed the deep links.
I’m not authorizing the deep links with Regular Link, but end-users selecting the Feature Links and entered the deep links and than select again the Regular Links, on that way its saving the deep links with Regular Link, I want to re-initialize the the URLs variables.
is there anybody can help me how to re-initialize the variables, i also did in header file but its not working…
$URL1 = “”;
$URL2 = “”;
$URL3 = “”;
$URL4 = “”;
$URL5 = “”;
any help will be thankful
regards…
ahmer
December 23rd, 2007 at 9:38 pm
use the javascript file from this post,
http://blog.rakcha.com/2007/09/14/phpld-deep-links-mod-easy-1-step-install/
January 5th, 2008 at 10:32 pm
thanks so much,
i follow the script and its working fine for me now
thx. again
http://www.uuStuff.com
February 10th, 2008 at 3:45 pm
does it work with phpld 3.3. or do i need to do any modifications before installing.
thanks
March 23rd, 2008 at 7:57 pm
ekibastos…
ekibastos…