Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Disclaimer to your web site
20-04-2010, 03:34 PM (This post was last modified: 21-04-2010 10:00 AM by admin.)
Post: #1
Add Disclaimer to your web site
create disclaimer.js file and paste below code in file
upload it to your root directory

then go to your chosen template file in

template/{your-template-name}/index.php
your-template-name = blend, gestured, etc....

add <script language="javascript" src="/disclaimer.js"></script> under <body> tag


you can edit message

var headermessage="ENTER SITE";
var message="Click enter to enter the site";



PHP Code:
var headermessage="ENTER SITE";
var 
message="Click enter to enter the site";

function 
ReadCookie(cookieName) {
    var 
theCookie=""+document.cookie;
    var 
ind=theCookie.indexOf(cookieName);
    if (
ind==-|| cookieName=="") return "";
    var 
ind1=theCookie.indexOf(';',ind);
    if (
ind1==-1ind1=theCookie.length;
    return 
unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function 
SetCookie(cookieName,cookieValue,nHours) {
    var 
today = new Date();
    var 
expire = new Date();
    if (
nHours==null || nHours==0nHours=2;
    
expire.setTime(today.getTime() + 3600000*nHours);
    
document.cookie cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
}

function 
DisplayWarningBox() {

    var 
top 100;
    var 
left screen.width/2-300;
document.write("<div id=\"scontentmain\" style=\"position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: #cccccc; z-index:1000\"><div style=\"position:absolute; top: " top "px; left: " left "px; width: 600px; background: #000000; padding: 20px;border:2px solid #990000; z-index:1001;\"><p align=center><font face=\"Verdana\" size=\"5\" color=\"#990000\"><b>"+headermessage+"</b></font><br><br><font face=\"Verdana\" color=\"#990000\"><b>"+message+"</b></font><br><br><br><input type=\"button\" value=\"Enter\" style=\"width:200px\" name=\"in\" id=\"in\" onclick=\"Agree()\">&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\"Close\" style=\"width:200px\" name=\"out\" id=\"out\" onclick=\"javascript:window.close();\"></p></div></div>");
    
}
function 
DisplayFakeBox() {
    
document.write("<div id=\"scontentmain\" style=\"display:none;\"></div>");
}
function 
Agree() {
    
SetCookie('scontentmain','scontentmain',2);
    
document.getElementById('scontentmain').style.display 'none';
}

function 
WarningScroll() {
    
document.getElementById('scontentmain').style.top window.document.body.scrollTop;
}

if(
ReadCookie('scontentmain')=='') {
    
DisplayWarningBox();
    
window.document.body.onscroll WarningScroll;








var 
dragapproved=false
var zcor,xcor,ycor

function ietruebody(){
return (
document.compatMode && document.compatMode!="BackCompat")? document.documentElement document.body
}

function 
movescontentmain(){
if (
event.button==1&&dragapproved){
zcor.style.pixelLeft=tempvar1+event.clientX-xcor
zcor
.style.pixelTop=tempvar2+event.clientY-ycor
leftpos
=document.all.scontentmain.style.pixelLeft-ietruebody().scrollLeft
toppos
=document.all.scontentmain.style.pixelTop-ietruebody().scrollTop
return false
}
}



var 
w=0//ietruebody().clientWidth
var h=0


////Do not edit pass this line///////////
w+=ietruebody().scrollLeft
h
+=ietruebody().scrollTop

var leftpos=w
var toppos=h
scontentmain
.style.left=w
scontentmain
.style.top=h



function staticize(){
w2=ietruebody().scrollLeft+leftpos
h2
=ietruebody().scrollTop+toppos
scontentmain
.style.left=w2
scontentmain
.style.top=h2
}
window.onscroll=staticize 


Attached File(s)
.zip  disclaimer.zip (Size: 1.25 KB / Downloads: 102)
Find all posts by this user
Quote this message in a reply
21-04-2010, 02:16 AM
Post: #2
RE: Add Disclaimer to your web site
Thanks man.. i really need a disclaimer to put in my website..
Find all posts by this user
Quote this message in a reply
20-05-2010, 08:32 PM
Post: #3
RE: Add Disclaimer to your web site
thanks..

DolSex.Com
Ready For Review Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
11-07-2010, 11:37 AM
Post: #4
RE: Add Disclaimer to your web site
Dear Admin,
This dose not work can you help me. May be you can post a copy of the index.php with the script added. So that we may see what it looks like.
Thank you i love your script.
Find all posts by this user
Quote this message in a reply
14-07-2010, 07:12 PM
Post: #5
RE: Add Disclaimer to your web site
My disclaimer not working properly..
Check this

DolSex.Com
Ready For Review Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
15-07-2010, 10:38 AM
Post: #6
RE: Add Disclaimer to your web site
(14-07-2010 07:12 PM)dodolzlegit Wrote:  My disclaimer not working properly..
Check this
Looks good Smile
Find all posts by this user
Quote this message in a reply
15-07-2010, 09:28 PM
Post: #7
RE: Add Disclaimer to your web site
(15-07-2010 10:38 AM)andriusg Wrote:  
(14-07-2010 07:12 PM)dodolzlegit Wrote:  My disclaimer not working properly..
Check this
Looks good Smile

Thanks bro, but the disclaimer not working properly.Sad
it's can't blocking my index page, can you help me?

DolSex.Com
Ready For Review Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
19-07-2010, 02:24 PM
Post: #8
RE: Add Disclaimer to your web site
it seams normal
may be other javascript codes are blocking script running
please can you try to remove add scripts to understand if the add scripts block it
Find all posts by this user
Quote this message in a reply
03-08-2010, 11:24 PM
Post: #9
RE: Add Disclaimer to your web site
Hey how can i put the site logo on there?
Find all posts by this user
Quote this message in a reply
04-08-2010, 09:48 AM
Post: #10
RE: Add Disclaimer to your web site
(03-08-2010 11:24 PM)joey1 Wrote:  Hey how can i put the site logo on there?

open disclaimer.js
edit first two lines


var headermessage="ENTER SITE";
var message="Click enter to enter the site";

edit bold letter in html
dont use "
use ' instead of "
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: