Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2008, 10:21 PM
Mr. Boo Mr. Boo is offline
 
Join Date: May 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 02-27-2008, 07:00 AM
grant.hayman grant.hayman is offline
 
Join Date: Feb 2007
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'));
Reply With Quote
  #3  
Old 02-27-2008, 11:10 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 02-27-2008, 11:36 AM
Mr. Boo Mr. Boo is offline
 
Join Date: May 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by grant.hayman View Post
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 View Post
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
Reply With Quote
  #5  
Old 02-28-2008, 07:47 AM
grant.hayman grant.hayman is offline
 
Join Date: Feb 2007
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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 03:32 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.04136 seconds
  • Memory Usage 2,198KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete