vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Pop up Register prompt if user has not been registered (https://vborg.vbsupport.ru/showthread.php?t=34817)

voogru 02-04-2002 10:00 PM

Very simple hack, just like the one requested here

but its not a stripped down version of the register, it will open the sign up form in another window.

so it works like this:

Unregisterd user visits your forum

User will get prompt to register, they can either click OK or Cancel

if they click ok a new window will pop-up with the sign up form. of course mine puts the forum rules first. the way it should be.

even if its not a express reg the user will most likly be annoyed with the pop-up message everytime he goes to the forum, so he will sign up :D

this is my first hack (sorta). go easy on me :D

thanks to FireFly some of the code he posted in a thread (the part that goes in global.php i simply modded it) what i would like is if they click cancel or add another button (if possible) to allow them to login. how would i go about doing this?

enjoy :D

Demo: http://forums.voogru.com

Dade 02-05-2002 06:35 PM

Thanks man :)

Excellent hack :D

Floris 02-05-2002 07:49 PM

Sorry ;)
If I visit a place, and they annoy me with registration popups, my natural instinct tells me to get the hell outtah there. :D Sorry!

MarkB 02-05-2002 08:01 PM

Would it be possible to delay it for perhaps 5 or 10 minutes, then pop-up - if they cancel, it sets a cookie so it won't display again for 7 days or something?

(I know, that's asking a lot, but I'm just thinking...;))

voogru 02-05-2002 08:05 PM

thats what i really wanted to do but i dont know how to set a cookie, basicly what i wanted to do is whe nthe user firs goes to the forum they get the message, if the click cancel with wont show for another 60 mins.

fonzerelli_79 02-05-2002 09:39 PM

voogru
just visited your site - nice, and good hack too
but i do have to agree with xiphoid , the pop up is very annoying

voogru 02-05-2002 09:44 PM

thats kinda the point, new feature when you sign up:

No more sign up "nag" pop-ups! ;)

XiXora 02-05-2002 09:47 PM

setcookie(); <- php to set a cookie
www.webmonkey.com and search javascript cookie to try get the js way :D

voogru 02-05-2002 10:03 PM

this is prolly all wrong but heres my try:

Code:

<script language="javascript">
{
        if document.cookie = useralreadycanceled;
    }
        } else {
        input_box=confirm("You have not registered on the forums, or are not logged in. Click OK to register, or cancel to hide this prompt.");
        if (input_box==true) { // Output when OK is clicked
                second_box=confirm("Open in new window?\n\n(Press cancel to open in the current window.)");
                if (second_box==true) {
                        window.open('register.php?s=$session[sessionhash]','register','width=750,height=500,menubar=no,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes,top=50,left=50');
                } else {
                        window.location="register.php?s=$session[sessionhash]";
                }
        } else {
        }
}
function setCookie()
{
    var timeout=60*60*24;
        document.cookie = useralreadycanceled;

}
-->
</script>

what im trying to do is create a cookie, make the cookie expire in 24 hours. if the user comes back 24 hours later it will show him the message. so basicly it looks like this

User clicks cancel
cookie gets written
if the cookie exists it doesnt execute the pop-up code
user comes back 24 hours later he gets the pop-up again

Destee 02-06-2002 02:56 AM

I went to your site but didn't get the popup :(

voogru 02-06-2002 03:41 AM

i removed it for now, for a demo it looks just like the PM popup, only with differnet text

Destee 02-06-2002 04:21 AM

okay ... :)

rawnet 02-07-2002 03:50 PM

Hello Mr.Voogru,

This is a great hack, but I was wondering what code you used to do the mouseover effect on the homepage - when I roll over the forum, the background changes colour. How does one do that?

Ross

Tim Wheatley 02-13-2002 12:33 PM

Did anyone ever get a working cookie for this? I'd like to use it and have the popup come on after a week.

wooolF[RM] 02-13-2002 12:58 PM

]Try on this site: http://linguaxpress.com/mpc/forum
They have popups. No cookies...
This reply message is to all who wants to see the demo... not more.

Lionel 02-15-2002 02:39 PM

How would I pop another page instead of register. I'd like to popup a banner but want to get rid of the prompt. I''l simply put in "Register to stop the popup banner" under the banner.

voogru 02-15-2002 02:54 PM

Quote:

Originally posted by wooolF[RM]
Try on this site: http://linguaxpress.com/mpc/forum
They have popups. No cookies...
This reply message is to all who wants to see the demo... not more.

boo cheaters!!!

voogru 02-15-2002 02:55 PM

uh oh, they removed the vBulletin copyright as well! :surprised

Tim Wheatley 02-15-2002 04:40 PM

Any idea what the error is IE is trying to tell me about?

http://forum.racesimcentral.com/


All times are GMT. The time now is 03:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01124 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete