galstuk,
Ничего не напоминает?
Code:
echo'<style type="text/css">
#josOverlay{
color:"#FFFFFF";
display:none;
position: absolute;
top: 0;
left: 0;
z-index:75;
width: 1px;
height: 1px;
filter:alpha(opacity="75");
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight:bold;
-moz-opacity:75;
opacity:75;
}
#ss{
position: absolute;
top: 0px;
left: 0px;
z-index: 91;
visibility:hidden;
}
</style>';
echo '<div id="josOverlay">www.joomlamz.com</div>
<img src="', $settings['images_url'], '/ss1.gif" id="ss">
<script language="JavaScript">
var josInterval ="750";
var josWait = "5";
var imgWidth = "237";
var imgHeight = "95";
</script>';
echo' <script language="JavaScript">
var run = false;
var objImage;
var objOverlay;
var curpos;
var xRange;
var yRange;
var josDate = new Date();
var josTime2Run = josDate.getTime();
var ars;
obj = findObj("image1");
function findObj(theObj, theDoc)
{
var p, i, foundObj;
if(!theDoc) theDoc = document;
if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
{
theDoc = parent.frames[theObj.substring(p+1)].document;
theObj = theObj.substring(0,p);
}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++)
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
return foundObj;
}
objOverlay = findObj(\'josOverlay\');
objOverlay.style.background="black";
objImage = findObj("ss");
objImage.style.height = imgHeight + "px";
objImage.style.width = imgWidth + "px";
function josShowHide (st) {
var tags = new Array("applet", "iframe", "select");
for (var k = tags.length; k > 0; ) {
var ar = document.getElementsByTagName(tags[--k]);
var cc = null;
for (var i = ar.length; i > 0;) {
cc = ar[--i];
cc.style.visibility = st;
}}}
function getPageScroll(){
var yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
}
arrayPageScroll = new Array(\'\',yScroll)
return arrayPageScroll;}
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
function josStart() {
var ar = getPageSize();
ars = getPageScroll();
if (document.all) {
objOverlay.style.width = ar[0] + "px";
} else {
objOverlay.style.width = "100%";
}
if ((document.all) && ars[1]>10) {
objOverlay.style.height = (ar[1]+25) + "px";
} else {
objOverlay.style.height = ar[1] + "px";
}
xRange = ar[2] - objImage.width;
yRange = ar[3] - objImage.height;
objOverlay.style.display = "block";
objImage.style.visibility ="visible";
run = true;
josStartRandomPosition();
josShowHide("hidden");
}
function josEnd() {
if (run) {
if (document.all) {
if ((curpos == (event.screenX + ":" + event.screenY)) && (event.type=="mousemove")) {
return false;}}
objImage.style.visibility ="hidden";
objImage.style.top = "0px";
objImage.style.left = "0px";
objOverlay.style.display = "none";
objOverlay.style.width = "1px";
objOverlay.style.height = "1px";
josShowHide("visible");
}
run = false;
var dt = new Date();
josTime2Run = dt.getTime();
}
function josStartRandomPosition() {
if (run) {
var x = Math.round(Math.random() * xRange);
var y = Math.round(Math.random() * yRange) + ars[1];
objImage.style.left = x + "px";
objImage.style.top = y + "px";
window.setTimeout("josStartRandomPosition();", josInterval);}}
function josWatcher() {
var dt = new Date();
if ( (run) ) {
window.setTimeout("josWatcher();", 1000);
return true;
}
if ((dt.getTime() - josTime2Run) > 1000*josWait) {
josStart();
}
window.setTimeout("josWatcher();", 1000);
}
document.onclick = josEnd;
objOverlay.onclick = josEnd;
document.onmousemove = function () {
if (document.all) {
if (window.event.srcElement.id != "josOverlay") {
curpos = event.screenX + ":" + event.screenY;}}
josEnd();
};
document.onkeypress = josEnd;
window.onresize = josEnd;
josWatcher();
</script>
';
Найдено здесь: http://www.joomla.co.mz/forum/viewtopic.php?f=284&t=4303&start=0 и это сообщение было опубликовано Sun Nov 16, 2008 11:36 pm
Сравним с тем, что у тебя в файле wss.tpl
Code:
{*Модуль "Хранитель экрана" для Social Engine 2.xx и 3.xx*}
{*Copyright by Galstuk (C) 2010*}
{*www.Mir-Druzey.Ru*}
<link href="modules/mod_wss/css/wss.css" rel="stylesheet" type="text/css" />
{literal}
<style type="text/css">
#josOverlay{
background-color:white;
filter:alpha(opacity=100);
-moz-opacity: 8/10;
opacity: 8/10;
}
#ss{
z-index: 99999;
border: 1px solid black;
}
</style>
{/literal}
<div id="josOverlay"></div>
<img src="modules/mod_wss/images/ss.gif" id="ss">
{literal}
<script language="JavaScript" type="text/javascript">
var josInterval = 3*1000;
var josWait = 10; /* через такое время будет показан хранитель экрана */
var imgWidth = 300; /*ширина появляющегося изображения*/
var imgHeight = 149; /*высота появляющегося изображения*/
var bgcolor = 'white';
var run = false;
var objImage;
var objOverlay;
var curpos;
var xRange;
var yRange;
var josDate = new Date();
var josTime2Run = josDate.getTime();
var ars;
function findObj(theObj, theDoc)
{
var p, i, foundObj;
if(!theDoc) theDoc = document;
if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
{
theDoc = parent.frames[theObj.substring(p+1)].document;
theObj = theObj.substring(0,p);
}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++)
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
return foundObj;
}
objOverlay = findObj('josOverlay');
objOverlay.style.background=bgcolor;
objImage = findObj('ss');
objImage.style.height = imgHeight + 'px';
objImage.style.width = imgWidth + 'px';
function josShowHide (st) {
var tags = new Array("applet", "iframe", "select");
for (var k = tags.length; k > 0; ) {
var ar = document.getElementsByTagName(tags[--k]);
var cc = null;
for (var i = ar.length; i > 0;) {
cc = ar[--i];
cc.style.visibility = st;
}
}
}
function getPageScroll(){
var yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop){
yScroll = document.documentElement.scrollTop;
} else if (document.body) {
yScroll = document.body.scrollTop;
}
arrayPageScroll = new Array('',yScroll)
return arrayPageScroll;
}
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) {
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) {
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
function josStart() {
var ar = getPageSize();
ars = getPageScroll();
if (document.all) {
objOverlay.style.width = ar[0] + "px";
} else {
objOverlay.style.width = "100%";
}
if ((document.all) && ars[1]>10) {
objOverlay.style.height = (ar[1]+25) + "px";
} else {
objOverlay.style.height = ar[1] + "px";
}
xRange = ar[2] - objImage.width;
yRange = ar[3] - objImage.height;
objOverlay.style.display = "block";
objImage.style.visibility ="visible";
run = true;
josStartRandomPosition();
josShowHide("hidden");
}
function josEnd() {
if (run) {
if (document.all) {
if ((curpos == (event.screenX + ":" + event.screenY)) && (event.type=="mousemove")) {
return false;
}
}
objImage.style.visibility ="hidden";
objImage.style.top = "0px";
objImage.style.left = "0px";
objOverlay.style.display = "none";
objOverlay.style.width = "1px";
objOverlay.style.height = "1px";
josShowHide("visible");
}
run = false;
var dt = new Date();
josTime2Run = dt.getTime();
}
function josStartRandomPosition() {
if (run) {
var x = Math.round(Math.random() * xRange);
var y = Math.round(Math.random() * yRange) + ars[1];
objImage.style.left = x + "px";
objImage.style.top = y + "px";
window.setTimeout("josStartRandomPosition();", josInterval);
}
}
function josWatcher() {
var dt = new Date();
if ( (run) ) {
window.setTimeout("josWatcher();", 1000);
return true;
}
if ((dt.getTime() - josTime2Run) > 1000*josWait) {
josStart();
}
window.setTimeout("josWatcher();", 1000);
}
document.onclick = josEnd;
objOverlay.onclick = josEnd;
document.onmousemove = function () {
if (document.all) {
if (window.event.srcElement.id != "josOverlay") {
curpos = event.screenX + ":" + event.screenY;
}
}
josEnd();
};
document.onkeypress = josEnd;
window.onresize = josEnd;
window.onscroll = josEnd;
josWatcher();
</script>
{/literal}
Ну как?
Наверное не очень правильно выдавать чужие идеи, как свои? Тем более с таким пижонством
Или я снова не прав?