Pengiklanan Dinamik - Joomla! Forum - community, help and support
ada sesiapa yang telah mengunakan pengiklanan dinamik - scrolling advertisement dihalaman joomla? setahu saya tidak ada lagi komponen sebegini - kiranya kalian menguna skrip dinamik/ajax, sila beritahu kami disini
tk
tk
maksud saya sebegini yang nyata didalam code yang tercatit dibawah. ada komponen atau module yang membolehkan administrator joomla untuk menukar ganti pengiklanan tersebut tanpa mengodek-godek di index.html?
code: select all
[b]step 1: add following script <head> section of page:[/b]
<style type="text/css">
<!--
#sponsoraddiv {position:absolute; height:1; width:1px; top:0; left:0;}
-->
</style>
<script type="text/javascript">
adtime=5; // seconds ad reminder shown
chancead=1; // ad shown 1 in x times (put 1 everytime)
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getelementbyid && !ie);
var calunit=ns? "" : "px"
adcount=0;
function initad(){
if(!ns && !ie && !w3) return;
if(ie) addiv=eval('document.all.sponsoraddiv.style');
else if(ns) addiv=eval('document.layers["sponsoraddiv"]');
else if(w3) addiv=eval('document.getelementbyid("sponsoraddiv").style');
randad=math.ceil(math.random()*chancead);
if (ie||w3)
addiv.visibility="visible";
else
addiv.visibility ="show";
if(randad==1) showad();
}
function showad(){
if(adcount<adtime*10){adcount+=1;
if (ie){documentwidth =truebody().offsetwidth/2+truebody().scrollleft-20;
documentheight =truebody().offsetheight/2+truebody().scrolltop-20;}
else if (ns){documentwidth=window.innerwidth/2+window.pagexoffset-20;
documentheight=window.innerheight/2+window.pageyoffset-20;}
else if (w3){documentwidth=self.innerwidth/2+window.pagexoffset-20;
documentheight=self.innerheight/2+window.pageyoffset-20;}
addiv.left=documentwidth-200+calunit;addiv.top =documentheight-200+calunit;
settimeout("showad()",100);}else closead();
}
function closead(){
if (ie||w3)
addiv.display="none";
else
addiv.visibility ="hide";
}
function truebody(){
return (document.compatmode && document.compatmode!="backcompat")? document.documentelement : document.body
}
onload=initad;
//end-->
</script>
[b]insert below html code bottom of page, right above </body> tag itself[/b]:
<div id="sponsoraddiv" style="visibility:hidden">
<table width="450px" height="350px" bgcolor="#008000"><tr><td>
<table width="445px" height="345px" bgcolor="#f0fff0"><tr><td align="center" valign="middle">
<!--*****edit message*****-->
<a href="http://www.amazon.com/exec/obidos/redirect-home/wa0c?tag-id=wa0c&placement=home-btn-100x70.gif&site=amazon">
<img src="http://www.associmg.com/assoc/us/home-btn-100x70.gif?tag-id=wa0c"></a><p><b>please take time show support<br>
for site visiting one<br>
of our sponsors during this<br> brief intermission.</b>
</p>
<p><a href="http://www.amazon.com/exec/obidos/redirect-home/wa0c?tag-id=wa0c&placement=home-logo-130x60b.gif&site=amazon">
<img src="http://www.associmg.com/assoc/us/home-logo-130x60b.gif?tag-id=wa0c"></a></p>
<p>(this announcement close shortly)
<br>
<!--*****edit above message*****-->
</td></tr></table></td></tr></table>
</div>
[b]configure ads placing appropriate html/content inside code of step 2 specified[/b].
Comments
Post a Comment