vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Registration: Passing Source Page Thru Registration Form (https://vborg.vbsupport.ru/showthread.php?t=290213)

I.M.O.G. 11-06-2012 08:06 AM

Registration: Passing Source Page Thru Registration Form
 
When a user completes registration, they are typically greeted with a message that includes a link "Click HERE to return to where you were previously". If vBulletin doesn't actually know where the user came from, that link sends them back to the forum homepage.

If I have an overlay which allows registration on my site without leaving the thread currently being viewed, how do I pass the source page variable through the registration process, so that on the register.php?do=addmember landing page they are given a link back to where they started?

kh99 11-06-2012 12:35 PM

You can set $vbulletin->url to the page you want to go to. You could use a plugin on hook register_addmember_complete, for example.

I think you'd also want a plugin on register_start that looks for a specific parameter and sets a variable to be used in the registration template, and then add a hidden field in the form using that variable as the value. That way when the registration form is submitted (or resubmitted after an error), you will have the source page url available to use in the plug mentioned above.

I no that's probably not a very clear explanation, but I hope it makes some sense.

I.M.O.G. 11-06-2012 02:32 PM

Thank you kh99. I think I get what you are after. :)

Do you know what the variable is that I need to get the current page URL on vb3? On vb4, it looks like its "{vb:raw relpath}"

--------------- Added [DATE]1352216251[/DATE] at [TIME]1352216251[/TIME] ---------------

Maybe "$threadinfo[threadid]" would do it when they access the registration overlay from a showthread.php page.

--------------- Added [DATE]1352218072[/DATE] at [TIME]1352218072[/TIME] ---------------

Sorry, nevermind. On my custom overlay, I had defined the following url variable statically, once I removed that line, the redirect back to the source URL worked normally.


All times are GMT. The time now is 09:23 AM.

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.01074 seconds
  • Memory Usage 1,710KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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