![]() |
|
|||||||
| Register | FAQ | Donate | Members List | Calendar | Arcade | Search | Today's Posts | Mark Forums Read |
| phpLD Directory Modifications phpLinkDirectory script: Modifications and Contributions |
![]() |
|
|
Submit Tools | Thread Tools | Display Modes |
#1
|
||||
|
||||
|
Hello all,
Just finished writing it all up and testing it on 3.2 version of phpld. All instructions in one place please follow carefully otherwise things might go wrong, also not to make backup of the files you try to edit in your directory. Enjoy. Originally taken from " http://blog.rakcha.com/2007/04/23/phpld-deeplinks-mod/ " Please note there are few issue with the codes as seen in above url, the following code includes those fixes. PHPLD 3.2 Free Deeplink Mod. open include/tables.php Find Code:
'ID' => 'I KEY AUTO' ,
'TITLE' => 'C(255) NOTNULL' ,
'DESCRIPTION' => 'X2 NULL' ,
'URL' => 'C(255) NOTNULL' ,
'CATEGORY_ID' => 'I NOTNULL' ,
'RECPR_URL' => 'C(255) NULL' ,
Code:
'ID' => 'I KEY AUTO' ,
'TITLE' => 'C(255) NOTNULL' ,
'DESCRIPTION' => 'X2 NULL' ,
'URL' => 'C(255) NOTNULL' ,
'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' ,
'CATEGORY_ID' => 'I NOTNULL' ,
'RECPR_URL' => 'C(255) NULL' ,
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 ; Open header.tpl Find Code:
{* AJAX category selection library *}
<script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/categ_selection/categ_selection.js"></script>
{/if}
Code:
{* AJAX category selection library *}
<script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/categ_selection/categ_selection.js"></script>
{/if}
{literal}
<script language="text/javascript">
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}
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 regularpaid(){
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 regular(){
setVisibility('field1_title', '');
setVisibility('field1_url', '');
setVisibility('field2_title', '');
setVisibility('field2_url', '');
setVisibility('field3_title', 'none');
setVisibility('field3_url', 'none');
setVisibility('field4_title', 'none');
setVisibility('field4_url', 'none');
setVisibility('field5_title', 'none');
setVisibility('field5_url', 'none');
}
function reciprocal(){
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');
}
</script>
{/literal}
__________________
|Support the New Dmoz Resource Zone Project| Messaging Editors for site review, inclusion, status check or annoying messages is a ban. Editors are volunteers. A1 Web Hosting Solutions| Free Image Hosting |Directory |
| Sponsored Links |
|
Ad-Sharing is Enabled at Dmoz-Resources.com Zone. To enter your google ads, go to >Usercp>Profile> Scroll down to where it says Ad-Sharing Code , and enter your code there. Can be Adbrite,Google Adsense or Banner (non-animated), not greater than 728 (w)x90(h) in Size.
Example :
|
#2
|
||||
|
||||
|
Open submit.tpl
Find Code:
{if $price.featured}
<tr><td><input type="radio" name="LINK_TYPE" value="featured" {if $LINK_TYPE eq 'featured'}checked="true"{/if}>{l}Featured links{/l}</td><td>{$smarty.const.HTML_CURRENCY_CODE}{$price.featured}</td></tr>
{/if}
{if $price.normal gt 0}
<tr><td><input type="radio" name="LINK_TYPE" value="normal" {if $LINK_TYPE eq 'normal'}checked="true"{/if}>{l}Regular links{/l}</td><td>{$smarty.const.HTML_CURRENCY_CODE}{$price.normal}</td></tr>
{elseif $price.normal eq 0}
<tr><td><input type="radio" name="LINK_TYPE" value="normal" {if $LINK_TYPE eq 'normal'}checked="true"{/if}>{l}Regular links{/l}</td><td>{l}free{/l}</td></tr>
{/if}
{if $price.reciprocal gt 0}
<tr><td><input type="radio" name="LINK_TYPE" value="reciprocal" {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if}>{l}Regular links with reciprocal{/l}</td><td>{$smarty.const.HTML_CURRENCY_CODE}{$price.reciprocal}</td></tr>
{elseif $price.reciprocal eq 0}
<tr><td><input type="radio" name="LINK_TYPE" value="reciprocal" {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if}>{l}Regular links with reciprocal{/l}</td><td>{l}free{/l}</td></tr>
{/if}
{if isset($price.free)}
<tr><td><input type="radio" name="LINK_TYPE" value="free" {if $LINK_TYPE eq 'free'}checked="true"{/if}>{l}Links with nofollow attribute{/l}</td><td>free</td></tr>
{/if}
Code:
{if $price.featured}
<tr><td><input type="radio" name="LINK_TYPE" value="featured" {if $LINK_TYPE eq 'featured'}checked="true"{/if} onClick="featured();"; >{l}Featured links{/l}</td><td>{$smarty.const.HTML_CURRENCY_CODE}{$price.featured}</td></tr>
{/if}
{if $price.normal gt 0}
<tr><td><input type="radio" name="LINK_TYPE" value="normal" {if $LINK_TYPE eq 'normal'}checked="true"{/if} onClick="regularpaid();"; >{l}Regular links{/l}</td><td>{$smarty.const.HTML_CURRENCY_CODE}{$price.normal}</td></tr>
{elseif $price.normal eq 0}
<tr><td><input type="radio" name="LINK_TYPE" value="normal" {if $LINK_TYPE eq 'normal'}checked="true"{/if} onClick="regular();"; >{l}Regular links{/l}</td><td>{l}free{/l}</td></tr>
{/if}
{if $price.reciprocal gt 0}
<tr><td><input type="radio" name="LINK_TYPE" value="reciprocal" {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if} onClick="reciprocal();"; >{l}Regular links with reciprocal{/l}</td><td>{$smarty.const.HTML_CURRENCY_CODE}{$price.reciprocal}</td></tr>
{elseif $price.reciprocal eq 0}
<tr><td><input type="radio" name="LINK_TYPE" value="reciprocal" {if $LINK_TYPE eq 'reciprocal'}checked="true"{/if} onClick="reciprocal();"; >{l}Regular links with reciprocal{/l}</td><td>{l}free{/l}</td></tr>
{/if}
{if isset($price.free)}
<tr><td><input type="radio" name="LINK_TYPE" value="free" {if $LINK_TYPE eq 'free'}checked="true"{/if} onClick="regular();"; >{l}Links with nofollow attribute{/l}</td><td>free</td></tr>
{/if}
Find Code:
<tr>
<td class="label">{l}Description{/l}:</td>
<td class="field">
Code:
<tr>
<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="http://{$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="http://{$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="http://{$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>
<tr>
<td class="label">{l}Description{/l}:</td>
<td class="field">
Find Code:
<td class="item-title">{$row.$col|escape|trim}<a href="{$smarty.const.DOC_ROOT}/link_details.php?id={$id}" title="{l}View full info of this item{/l}" id="more-info-{$id}" class="more-info" onclick="return false;"><span>{l}More info{/l}</span></a>
Code:
<td class="item-title">{$row.$col|escape|trim}<a href="{$smarty.const.DOC_ROOT}/link_details.php?id={$id}" title="{l}View full info of this item{/l}" id="more-info-{$id}" class="more-info" onclick="return false;"><span>{l}More info{/l}</span></a>
<p style=" padding-top:2px; padding-bottom:2px; background:#333333; color:#FFFFFF;">Title 1: {$row.TITLE1|escape|trim} <a href="{$row.URL1|escape|trim}" target="_blank" style="color:#99FF33">URL 1 </a> </p>
<p style=" padding-top:2px; padding-bottom:2px; background:#333333; color:#FFFFFF;">Title 2: {$row.TITLE2|escape|trim} <a href="{$row.URL2|escape|trim}" target="_blank" style="color:#99FF33">URL 2 </a> </p>
<p style=" padding-top:2px; padding-bottom:2px; background:#333333; color:#FFFFFF;">Title 3: {$row.TITLE3|escape|trim} <a href="{$row.URL3|escape|trim}" target="_blank" style="color:#99FF33">URL 3 </a> </p>
<p style=" padding-top:2px; padding-bottom:2px; background:#333333; color:#FFFFFF;">Title 4: {$row.TITLE4|escape|trim} <a href="{$row.URL4|escape|trim}" target="_blank" style="color:#99FF33">URL 4 </a> </p>
<p style=" padding-top:2px; padding-bottom:2px; background:#333333; color:#FFFFFF;">Title 5: {$row.TITLE5|escape|trim} <a href="{$row.URL5|escape|trim}" target="_blank" style="color:#99FF33">URL 5 </a> </p>
__________________
|Support the New Dmoz Resource Zone Project| Messaging Editors for site review, inclusion, status check or annoying messages is a ban. Editors are volunteers. A1 Web Hosting Solutions| Free Image Hosting |Directory |
#3
|
||||
|
||||
|
open templates>code>admin>dir_links_edit.tpl
Find Code:
<tr>
<td class="label"><label for="DESCRIPTION">{l}Description{/l}:</label></td>
Code:
<tr>
<td class="label"><label for="TITLE1">
{l}Title1{/l}:</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">
{l}URL1{/l}:</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">
{l}Title2{/l}:</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">
{l}URL2{/l}:</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">
{l}Title3{/l}:</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">
{l}URL3{/l}:</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">
{l}Title4{/l}:</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">
{l}URL4{/l}:</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">
{l}Title5{/l}:</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">
{l}URL5{/l}:</label></td>
<td class="smallDesc">
<input type="text" id="URL5" name="URL5"
value="{$URL5|escape|trim}" class="text"/>
</td>
</tr>
<tr>
<td class="label"><label for="DESCRIPTION">{l}Description{/l}:</label></td>
Find Code:
<tr class="{cycle values="odd,even"}"><td class="label">{l}URL{/l}:</td><td class="smallDesc">{$linkInfo.URL|escape|trim}</td></tr>
Code:
<tr class="{cycle values="odd,even"}"><td class="label">{l}URL{/l}:</td><td class="smallDesc">{$linkInfo.URL|escape|trim}</td></tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}Title1{/l}:</td>
<td class="smallDesc">{$linkInfo.TITLE1|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}URL1{/l}:</td>
<td class="smallDesc">{$linkInfo.URL1|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}Title2{/l}:</td>
<td class="smallDesc">{$linkInfo.TITLE2|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}URL2{/l}:</td>
<td class="smallDesc">{$linkInfo.URL2|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}Title3{/l}:</td>
<td class="smallDesc">{$linkInfo.TITLE3|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}URL3{/l}:</td>
<td class="smallDesc">{$linkInfo.URL3|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}Title4{/l}:</td>
<td class="smallDesc">{$linkInfo.TITLE4|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}URL4{/l}:</td>
<td class="smallDesc">{$linkInfo.URL4|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}Title5{/l}:</td>
<td class="smallDesc">{$linkInfo.TITLE5|escape|trim}
</td>
</tr>
<tr class="{cycle values="odd,even"}">
<td class="label">{l}URL5{/l}:</td>
<td class="smallDesc">{$linkInfo.URL5|escape|trim}
</td>
</tr>
Find Code:
$data['META_KEYWORDS'] = $rdata['META_KEYWORDS'];
$data['META_DESCRIPTION'] = $rdata['META_DESCRIPTION'];
Code:
$data['META_KEYWORDS'] = $rdata['META_KEYWORDS'];
$data['META_DESCRIPTION'] = $rdata['META_DESCRIPTION'];
$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'];
Find Code:
<td valign="top" class="label"><strong>{l}Description{/l}:</strong></td>
<td class="smallDesc" align="left">{$DESCRIPTION|escape|trim}</td>
</tr>
Code:
<td valign="top" class="label"><strong>{l}Description{/l}:</strong></td>
<td class="smallDesc" align="left">{$DESCRIPTION|escape|trim}</td>
</tr>
<tr>
<td valign="top" class="label"><strong> Aditional Resources </strong></td>
<td class="smallDesc" align="left">
<a href="{$URL|escape|trim}" target="_blank">
{$TITLE|escape|trim}</a></br>
<a href="{$URL1|escape|trim}" target="_blank">
{$TITLE1|escape|trim}</a></br>
<a href="{$URL2|escape|trim}" target="_blank">
{$TITLE2|escape|trim}</a></br>
<a href="{$URL3|escape|trim}" target="_blank">
{$TITLE3|escape|trim}</a></br>
<a href="{$URL4|escape|trim}" target="_blank">
{$TITLE4|escape|trim}</a></br>
<a href="{$URL5|escape|trim}" target="_blank">
{$TITLE5|escape|trim}</a></br>
</td>
</tr>
Locate Code:
//Take care of white-space chars $data = filter_white_space($data); Code:
if (! preg_match("/^http:\/\//", $data['URL1'])) { $data['URL1'] = "http://" . $data['URL1']; }
if (! preg_match("/^http:\/\//", $data['URL2'])) { $data['URL2'] = "http://" . $data['URL2']; }
if (! preg_match("/^http:\/\//", $data['URL3'])) { $data['URL3'] = "http://" . $data['URL3']; }
if (! preg_match("/^http:\/\//", $data['URL4'])) { $data['URL4'] = "http://" . $data['URL4']; }
if (! preg_match("/^http:\/\//", $data['URL5'])) { $data['URL5'] = "http://" . $data['URL5']; }
__________________
|Support the New Dmoz Resource Zone Project| Messaging Editors for site review, inclusion, status check or annoying messages is a ban. Editors are volunteers. A1 Web Hosting Solutions| Free Image Hosting |Directory |
#4
|
|||
|
|||
|
Hi Bunny im getting error in installing this mod.. heres the screenshot:
check the deeplinks.. and when i click the both radio buttons.. nothing happens.. Please advice.. |
#5
|
||||
|
||||
|
Its probably something u coded wrong or forgot to remove the old code u added ? EDIT: It was problem with the code posted here , i have fixed the above issue. Attached is the screen shot as posted by user. To fix the width of the current thread.
Just start from scratch from your backed up files you have, I used the same instructions about on www.h-log.com since my memory is poor, i use this very tutorial to install deeplink. cheers
__________________
|Support the New Dmoz Resource Zone Project| Messaging Editors for site review, inclusion, status check or annoying messages is a ban. Editors are volunteers. A1 Web Hosting Solutions| Free Image Hosting |Directory |
#6
|
|||
|
|||
|
Hi i added you at my MSN friend lists.. can you tutor me there? i will give you a free featured listing at my PR6 directory..
Kojak |
#7
|
||||
|
||||
|
Quote:
Cheers
__________________
|Support the New Dmoz Resource Zone Project| Messaging Editors for site review, inclusion, status check or annoying messages is a ban. Editors are volunteers. A1 Web Hosting Solutions| Free Image Hosting |Directory |
#8
|
|||
|
|||
|
I try to reinstall it but still having the same error.
This tutorial of yours for version 2.x http://www.dmoz-resources.com/zone/showthread.php?t=312 works for me. but this tutorial above doesnt work for me. |
#9
|
|||
|
|||
|
I get the EXACT same issue . . .
|
#10
|
||||
|
||||
|
Ok i suppose i will need ftp access from you guys, must be editing wrong files maybe or not executing sql maybe, do not keep executing it all the time its only 1 time thing.
__________________
|Support the New Dmoz Resource Zone Project| Messaging Editors for site review, inclusion, status check or annoying messages is a ban. Editors are volunteers. A1 Web Hosting Solutions| Free Image Hosting |Directory |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
Posting Rules
| Site Sponsors | Resources | Advertisements |
|
Dmoz Free Image Hosting A1 Web Hosting solutions |
Contact us for advertising. |
|
|