Go Back   Themers Club : Computers , Mobiles and Web Development Themes > Webmaster forum > Scripts and Tools

Scripts and Tools Share your free scripts , tools , icons, fontz, screen savers , etc here.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2008, 09:50 AM
Spiral's Avatar
Spiral Spiral is offline
Super Moderator
 
Join Date: Apr 2008
Posts: 1,451
Rep Power: 19
Spiral is on a distinguished road
Default Deeplinks mod for phpld v 2 for free

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
Code:
'RECPR_EXPIRED' => 'L NOTNULL DEFAULT 0'

REPLACE BY:
Code:
'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:
Code:
<tr>   <td class="label">Description:</td>
ABOVE it, ADD:

Quote:
<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:
Quote:
<tr><td class="label">Description:</td><td class="smallDesc" align="left">{$DESCRIPTION|escape|trim}</td></tr>
BELOW, ADD:

Quote:
<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

Quote:
$data['META_DESCRIPTION'] = $rdata['META_DESCRIPTION'];
BELOW it, ADD:

Quote:
$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.
Reply With Quote
  #2  
Old 04-01-2009, 09:39 AM
lyjy0331 lyjy0331 is offline
Junior Member
 
Join Date: Mar 2009
Posts: 1
Rep Power: 0
lyjy0331 is on a distinguished road
Talking 新加的空白文章19

这是新加的空白文章19,可以在ubb可视化编辑器中,添加和修改文章内容。
Reply With Quote
Reply

Bookmarks

Tags
deep links, links, mod, phpld


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:51 AM.


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.