Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Improve registration with popup window Details »»
Improve registration with popup window
Version: 1.00, by cionfs cionfs is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.2 Rating:
Released: 05-28-2009 Last Update: Never Installs: 53
Template Edits
Re-useable Code Translations  
No support by the author.

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 -->
To change the time, in this example set to 20 seconds, change this

Code:
adTime=20;
and put in its place the seconds that must remain active popup.

To change the message in the popup to change what is between

Code:
<!-- here your message -->
and

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

File Type: jpg improve_registration.jpg (107.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
sunrainme

Comments
  #52  
Old 01-17-2010, 05:43 PM
captkirk captkirk is offline
 
Join Date: Dec 2009
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfect, a big thanks
Reply With Quote
  #53  
Old 11-12-2010, 04:51 PM
Eplexx Eplexx is offline
 
Join Date: Nov 2010
Location: Toronto
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked great thanks!
Reply With Quote
  #54  
Old 11-23-2010, 09:29 PM
SouthEastSxS SouthEastSxS is offline
 
Join Date: Jul 2010
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know if this works in 4x or if there is anything like this for 4x
Reply With Quote
  #55  
Old 11-24-2010, 06:59 AM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works in vB4.
Reply With Quote
  #56  
Old 01-10-2011, 11:32 AM
Ivelios Ivelios is offline
 
Join Date: Jul 2009
Location: Poland
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx for mod.
Reply With Quote
  #57  
Old 03-17-2011, 02:13 PM
Joe Gronlund Joe Gronlund is offline
 
Join Date: Jun 2005
Location: Toronto, Ontario, Canada
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it works on 4.1.2 ?
i tried but no works any help ?
Reply With Quote
  #58  
Old 06-10-2011, 06:04 PM
englndpatriots englndpatriots is offline
 
Join Date: Jul 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Reply With Quote
  #59  
Old 06-14-2011, 09:10 PM
dizzynation's Avatar
dizzynation dizzynation is offline
 
Join Date: Jun 2011
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sdfaheem View Post
Its still not aligning, the page is getting extended to the right.
Still having this problem too.

And coinfs, if you can quote peoples post it would be much easier to read your instruction and who you are talking to.
Reply With Quote
  #60  
Old 06-15-2011, 03:47 PM
dizzynation's Avatar
dizzynation dizzynation is offline
 
Join Date: Jun 2011
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the message, your default message, i just want to add "FREE" before services, can anyone explain how to do that? Thanks
Reply With Quote
  #61  
Old 06-20-2011, 01:03 PM
ChatHut ChatHut is offline
 
Join Date: Jun 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dizzynation View Post
in the message, your default message, i just want to add "FREE" before services, can anyone explain how to do that? Thanks
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 -->
Just find this and edit the message as you wish. I've taken the liberty of adding the word free in red for you, but you can edit the entire message as you see it.





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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05171 seconds
  • Memory Usage 2,349KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete