vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   anyone know how to edit register.php? (https://vborg.vbsupport.ru/showthread.php?t=171526)

Mr. Boo 02-26-2008 10:21 PM

anyone know how to edit register.php?
 
Hi,

I'm trying to figure out how to send the surfer to the page they came from after signing up but can't figure out which line to edit in register.php I have tried a few edits but the user still gets sent to the registration confirmation page. Anyone edited the file before?

grant.hayman 02-27-2008 07:00 AM

I did this (got the code from this forum somwhere I think so cant take credit)

find and comment this block

Code:

eval(standard_error(fetch_error('registration_complete', $username, $vbulletin->session->vars['sessionurl'], $vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php'), '', false));
and add this below

Code:

// Send the User to another page on registration
    $vbulletin->url = "http://yoururl_here". $vbulletin->session->vars['sessionurl'];
       
    eval(print_standard_redirect('registration_complete'));


Opserty 02-27-2008 11:10 AM

Refrain from editing files, they will cause all sorts of things to break if you end up replacing them during an upgrade. Anyway try this out: Redirect after Login

Mr. Boo 02-27-2008 11:36 AM

Quote:

Originally Posted by grant.hayman (Post 1451913)
I did this (got the code from this forum somwhere I think so cant take credit)

find and comment this block

Code:

eval(standard_error(fetch_error('registration_complete', $username, $vbulletin->session->vars['sessionurl'], $vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php'), '', false));
and add this below

Code:

// Send the User to another page on registration
    $vbulletin->url = "http://yoururl_here". $vbulletin->session->vars['sessionurl'];
       
    eval(print_standard_redirect('registration_complete'));


Thank you very much that seems to work fine although its dosnt log you in automatically, but that is fine :)

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

Quote:

Originally Posted by Opserty (Post 1452033)
Refrain from editing files, they will cause all sorts of things to break if you end up replacing them during an upgrade. Anyway try this out: Redirect after Login

Hi thank you for the link, unfortunately its not quite what I was looking for. I am only looking to redirect people who login on a certain page, I built a custom register2.php to handle this page so the rest of the site will still be unaffected :)

Thanks for your help everyone :D

grant.hayman 02-28-2008 07:47 AM

They are logged in when I redirect them to specific thread ... I looked incase there was other code i had missed but could not see any.

I agree about editing scripts but unfortunetly if you want custom stuff to happen thats what you have to do. the problem comes when you upgrade like was mentioned.
So what I have done is evrywhere i have made custom edits I comment the change just above and add a word that will never be used by vbulletin and you can always search templates and files for this word and see what edits you have done.

Never had to do an update yet but hope this will at least help me when I do.

Grant


All times are GMT. The time now is 10:00 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.01014 seconds
  • Memory Usage 1,725KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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