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
  #2  
Old 05-28-2009, 10:19 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved
Reply With Quote
  #3  
Old 05-28-2009, 11:04 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Removed, thanks for correcting

(I jumped the gun, sorry )

S-MAN
Reply With Quote
  #4  
Old 05-28-2009, 11:13 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am sorry but I past the text as I had inserted in my admincp.

Now it is correct with credits.

Thank you.

Edit: No problem
Reply With Quote
  #5  
Old 05-29-2009, 07:23 PM
binaryg's Avatar
binaryg binaryg is offline
 
Join Date: Mar 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much, just installed. I'm checking it out. Quick tips though, change "Wellcome" to 'Welcome' and I went ahead and added rel="nofollow" in the link for good measure to prevent sending any bots to the registration page.

I also noticed that if you are using Google AdSense, the pop-up is displayed under the advertisements. To fix this, I modified

PHP Code:
#sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;} 
to

PHP Code:
#sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0; z-index: 3;} 
Note, since I am already using a z-index of 2 in the navigation under my header image I chose to make it 3 so you may want to change it to 2 though leaving it as is probably shouldn't hurt.
Reply With Quote
  #6  
Old 05-30-2009, 08:50 AM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for this tips.
Reply With Quote
  #7  
Old 06-01-2009, 08:06 AM
sdfaheem's Avatar
sdfaheem sdfaheem is offline
 
Join Date: Dec 2006
Location: AIMIM.in
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can we make the pop-up align to the left?
Reply With Quote
  #8  
Old 06-01-2009, 10:21 AM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can try to change this

Code:
<table width="445px" height="345px" bgcolor="#F0FFF0"><tr><td align="center" valign="middle">
with this

Code:
<table width="445px" height="345px" bgcolor="#F0FFF0"><tr><td align="center" valign="left">
Reply With Quote
  #9  
Old 06-01-2009, 12:01 PM
sdfaheem's Avatar
sdfaheem sdfaheem is offline
 
Join Date: Dec 2006
Location: AIMIM.in
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cionfs View Post
You can try to change this

Code:
<table width="445px" height="345px" bgcolor="#F0FFF0"><tr><td align="center" valign="middle">
with this

Code:
<table width="445px" height="345px" bgcolor="#F0FFF0"><tr><td align="center" valign="left">
Its still not aligning, the page is getting extended to the right.
Reply With Quote
  #10  
Old 06-02-2009, 09:45 PM
aliali aliali is offline
 
Join Date: May 2009
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much
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 12:09 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.06214 seconds
  • Memory Usage 2,341KB
  • Queries Executed 24 (?)
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
  • (8)bbcode_code
  • (2)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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