The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Improve registration with popup window Details »» | |||||||||||||||||||||||||||
Here's a script that makes time for X seconds display a popup window to improve users to register.
The message is shown only for guest when they view forumhome. Go to AdminCP>Styles & Templates>Search in Templates and fint "header" template. At the beginning, before all the code, add this code Code:
<style type="text/css"> <!-- #sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;} --> </style> <script type="text/javascript"> /****************************************** * DHTML Ad Box (By Matt Gabbert at http://www.nolag.com) * Visit http://www.dynamicdrive.com/ for full script * This notice must stay intact for use ******************************************/ adTime=20; // seconds ad reminder is shown chanceAd=1; 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> <!-- Inizio script --> <if condition="$show['guest']"> <if condition="THIS_SCRIPT == 'index'"> <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"> <!-- here your message --> <a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a> <p><b>Wellcome to $vboptions[bbtitle]</b><br /> Here you'll find everything you need<br /> To be able to use our services you only need to <a href="$vboptions[bburl]/register.php" title="Register to $vboptions[bbtitle]">register</a>.</b> </p> <br> <!-- /here your message --> </td></tr></table></td></tr></table> </div> </if> </if> <!-- fine script --> Code:
adTime=20; To change the message in the popup to change what is between Code:
<!-- here your message --> Code:
<!-- /here your message --> Example in attachment. PS: sorry for my english Original modification in Italian language available here. Cionfs of Cionfs'Forum CMS Screenshots
Show Your Support
|
Благодарность от: | ||
sunrainme |
Comments |
#52
|
|||
|
|||
Works perfect, a big thanks
|
#53
|
|||
|
|||
It worked great thanks!
|
#54
|
|||
|
|||
anyone know if this works in 4x or if there is anything like this for 4x
|
#55
|
||||
|
||||
It works in vB4.
|
#56
|
|||
|
|||
Thx for mod.
|
#57
|
|||
|
|||
is it works on 4.1.2 ?
i tried but no works any help ? |
#58
|
|||
|
|||
For those that want one W3C Validated I tried but no luck. I managed to kill 2 errors though.
Code:
<style type="text/css"> <!-- #sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;} --> </style> <script type="text/javascript"> /****************************************** * DHTML Ad Box (By Matt Gabbert at http://www.nolag.com) * Visit http://www.dynamicdrive.com/ for full script * This notice must stay intact for use ******************************************/ adTime=20; // seconds ad reminder is shown chanceAd=1; 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> <!-- Inizio script --> <if condition="$show['guest']"> <if condition="THIS_SCRIPT == 'index'"> <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"> <!-- here your message --> <a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a> <p><b>Wellcome to $vboptions[bbtitle]<br /> To be able to use our forum you only need to <a href="$vboptions[bburl]/register.php" title="Register to $vboptions[bbtitle]">register</a>.</b> </p> <br /> <!-- /here your message --> </td></tr></table></td></tr></table> </div> </if> </if> <!-- fine script --> |
#59
|
||||
|
||||
Quote:
And coinfs, if you can quote peoples post it would be much easier to read your instruction and who you are talking to. |
#60
|
||||
|
||||
in the message, your default message, i just want to add "FREE" before services, can anyone explain how to do that? Thanks
|
#61
|
|||
|
|||
Quote:
Code:
<!-- here your message --> <a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a> <p><b>Wellcome to $vboptions[bbtitle]</b><br /> Here you'll find everything you need<br /> To be able to use our FREE services you only need to <a href="$vboptions[bburl]/register.php" title="Register to $vboptions[bbtitle]">register</a>.</b> </p> <br> <!-- /here your message --> Out of interest, and on a separate matter, I want to know if it is possible to pop up with a login box for members, or perhaps 'Choose a username and password', and this brings them to the main registration page with those fields auto-filled in? I know this mod isn't supported any more, but any pointers would be appreciated, thanks. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|