April 24th, 2007Phpld deeplinks mod - Hide fields
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>
15 Responses to “Phpld deeplinks mod - Hide fields”
Leave a Reply
You must be logged in to post a comment.


June 9th, 2007 at 5:26 pm
To hide the links when reciprocal is selected, you should create a new function
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’);
}
ADD onclick=”reciprocal();”; to the reciprocal radio button as was done for the other buttons.
ADD style=”display:none”
to all the deeplinks fields in submit.tpl as it was done for 4 and 5.
etc…
Now all fields are hidden when the page is loaded.
Enjoy!
June 15th, 2007 at 6:00 pm
Works beautifully… just installed it along with the Deep link option. Thanks for the info.
July 5th, 2007 at 9:17 pm
But where to add that function. Please let me know the details.
Thanks
July 6th, 2007 at 2:09 am
You should add it to the javascript code above, in the header. Then call the function in the radio button for which you want to hide the fields.
July 6th, 2007 at 7:25 am
Well, I have the deep links mod added, and this modification.
I don’t understand what I add to what with this “ADD onclick=”reciprocal();”; to the reciprocal radio button as was done for the other buttons.”
?
Do I add something to the java script in the first edit ?
Thanks for the cool mod
-Brandon
July 6th, 2007 at 7:43 am
In submit.tpl, FIND
REPLACE BY
Replace the javascript in the header by:
July 6th, 2007 at 10:26 am
Well sir I m facing a seriouse problem now. It seems that all the things are not working now Please sir take a look at it.
http://www.LinksRevo.com
Thanks
July 6th, 2007 at 3:08 pm
now in submit.tpl
replace
<tr><td class="label">TITLE 1</td>by
<tr id="field1_title" style="display:none"><td class="label">TITLE 1</td>do the same for 2 and 3. You should look a little bit deeper in the code, it is really easy to customize.
July 6th, 2007 at 4:18 pm
I updated this step, to allow 5 deeplinks for featured, 3 for regular and 0 for reciprocal. This will solve your problem Muneeb.
July 8th, 2007 at 12:10 am
Thank you Admin
July 9th, 2007 at 5:01 pm
Sorry sir but i still got a problem. I dont know where i m confusing.
It looks like the mod working good but when i click for regular link it dosent show me the 3 links .. Please help me regarding this ..
Thanks
linksrevo.com (Please take a look)
July 11th, 2007 at 5:12 pm
I have just installed the hide fields mod and it works ok. Except on my submit page clicking featured link button only shows 4 deep link option fields when it should be 5.
Any idea why this would happen??
July 11th, 2007 at 5:24 pm
I’m sorry ignore my last post i figured out the problem.
November 25th, 2007 at 2:29 am
[...] deep links mod to the site Here is the "how to" if you want to add it to your phpld dir rakCha resources Blog Archive Phpld deeplinks mod - Hide fields It’s pretty nice actually, and Free __________________ Brandon Sheley / vBSetup Staff Have [...]
December 8th, 2007 at 9:16 am
I tried to install it. I got a problem thought. When I click on the “Featured links” the 5 deeplinks come as it should be. But when I click on regular links or reciprocal links I still see the 5 deeplinks. I want it to chance so when you choose “regular links” it should apear 3 deeplinks and on reciprocal it should apear 5 deeplinks. What have I done wrong?