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

Obviously, yes.
Reply With Quote
  #33  
Old 09-15-2009, 01:24 PM
frank42 frank42 is offline
 
Join Date: Apr 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it will work on /forums.php but not index.php any ideas
Reply With Quote
  #34  
Old 09-15-2009, 01:25 PM
frank42 frank42 is offline
 
Join Date: Apr 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in script i have it as

Quote:
<if condition="THIS_SCRIPT == 'index'">
Reply With Quote
  #35  
Old 09-15-2009, 01:37 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

forums.php and index.php? Have you installed ibproarcade?
Reply With Quote
  #36  
Old 09-15-2009, 01:38 PM
frank42 frank42 is offline
 
Join Date: Apr 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes i have, index is my home page and forums is my forums page
Reply With Quote
  #37  
Old 09-15-2009, 01:50 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your "forum index" is forum.php.

Index.php is "arcade index".

Try this

Code:
<if condition="THIS_SCRIPT == 'arcade'">
Reply With Quote
  #38  
Old 09-15-2009, 01:57 PM
frank42 frank42 is offline
 
Join Date: Apr 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope no go, i will play with it, thanks for the help
Reply With Quote
  #39  
Old 09-15-2009, 02:01 PM
frank42 frank42 is offline
 
Join Date: Apr 2009
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heres what i mean

go here which is the main loggin page

then go here

and it works
Reply With Quote
  #40  
Old 09-15-2009, 02:09 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try to change your forum index from vbulletin options.
Reply With Quote
  #41  
Old 09-23-2009, 01:29 AM
Waqas Anwar Waqas Anwar is offline
 
Join Date: Apr 2009
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By default my forum logo display at popup window. I want to show here another image (which is a greeting and welcome image). There must a way to do this. Please guide me how can I do this? 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 08:24 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.04938 seconds
  • Memory Usage 2,335KB
  • 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
  • (5)bbcode_code
  • (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
  • (4)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