March 30th, 2007eSyndicat deeplinks mod - hide fields
If you have different sponsored plans in your eSyndicat directory and want to hide the fields for the extra deeplinks for a certain plan, with id 3 for example and show it for another plan with id 5, you should use this modification after installing the eSyndicat deep links mod.
In this example I assume that you are offering 3 deeplinks for featured listings (id 5) and none for regular ones (id 3). And that the names of the fields for deep links are (title1,url1),(title2,url2),(title3,url3).
Make a copy of header.tpl in the same template folder and call it header-suggest.tpl.
Now edit header-suggest.tpl:
1. Before </head> ADD:
{literal}
<script language="JavaScript">
function setVisibility(id, visibility) {
document.getElementById(id).style.display = visibility;
}
function p3(){
setVisibility('title1', 'none');
setVisibility('url1', 'none');
setVisibility('title2', 'none');
setVisibility('url2', 'none');
setVisibility('title3', 'none');
setVisibility('url3', 'none');
}
function p5(){
setVisibility('title1', '');
setVisibility('url1', '');
setVisibility('title2', '');
setVisibility('url2', '');
setVisibility('title3', '');
setVisibility('url3', '');
}
</script>
{/literal}
2. FIND
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
REPLACE BY
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"
onload="p3()">
in suggest-link.tpl
1. FIND
{include file="header.tpl"}
REPLACE BY
{include file="header-suggest.tpl"}
2. FIND
<input type="radio" name="plan" value="{$plan.id}" id="p{$plan.id}"
{if $smarty.foreach.plans_dsp.iteration eq 1} checked{/if}/>
REPLACE BY
<input type="radio" name="plan" value="{$plan.id}" id="p{$plan.id}"
{if $smarty.foreach.plans_dsp.iteration eq 1} checked{/if}
{if $plan.id==3} onclick="p3();";
{elseif $plan.id==5} onclick="p5();";{/if}/>
This MOD was not tested but should work just fine. Please report any problems.

