Exemplu:
În Page with entry full text and its comments căutăm codul:
Code
<?if($FILE_URL$)?><a href="$FILE_URL$"><!--<s5223>-->Download from this server<!--</s>--></a> ($FILE_SIZE$)<?endif?>
şi înlocuim cu codul:
Code
<?if($GROUP_ID$ == '1')?>
<span id="linkPlace"><span class="buttona">Descarcă peste: <span id='timeNumer'>0</span> sec.</span></span>
<script>
var timerFIG = 10;
document.all.timeNumer.innerHTML = timerFIG;
var timer = setInterval("startTimer()",1000);
function startTimer() {
if(timerFIG !== 1) {
timerFIG--;
document.all.timeNumer.innerHTML = timerFIG; } else {
clearInterval(timer);
document.all.linkPlace.innerHTML = "<span class=\"buttonb\" onclick=\"window.open('$FILE_DIRECT_URL$')\">Descarcă</span>"; } }
</script>
<?else?>
<span class="buttonb" onclick="window.open('$FILE_DIRECT_URL$')">Descarcă</span>
<?endif?>
În CSS adăugăm:
Code
.buttona {border: 1px solid #799DC4; background: #ffcece; padding : 5px; text-align: left; color: #0D2938;}
.buttonb {border: 1px solid #799DC4; background: #cccccc; padding : 5px; text-align: left; color: #0D2938;}
Sursă: ucoz-scripts Traducere RO: MaxRom