The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
How would I redirect those STANDARD_ERROR pages with login forms on them to a custom login URL easily? I am just using a 3rd party login script instead (that sets all the necessary vB cookies).
Is there a way through the Plugin Manager or something, tying some sort of an action to vB and redirecting it all to a custom URL? Anyone have a clue what/where/how? Thanks! |
#2
|
|||
|
|||
![]()
You could try something like this: create a new plugin using hook location error_nopermission and code like this:
Code:
if ($vbulletin->userinfo['userid'] == 0) { $vbulletin->url = login url; print_standard_redirect('nopermission_loggedin'); } Obviously you want to put in your actual URL. Also, nopermission_loggedin is a phrase that kind of says what you want. You can create a phrase that says exactly what you want, but the print_standard_redirect() function will normally use a redirect so that users won't see that message. If you want to force users to see the message (the function will use a different method of redirect that will show the message for a few seconds beforehand) then you can change the parameters of print_standard_redirect(), like: Code:
print_standard_redirect('nopermission_loggedin', true, true); Another approach might be to find the phrase that includes the login fields (the phrase varname is "not_logged_in_fill_in_form"), and change it to have a message like "click on this link to go to the login page" (and put in a link, of course). |
#3
|
|||
|
|||
![]()
nice! that worked! thanks.
now, how would you (if possible at all) add the current URL you're on into that redirect url? so, for example, the user is trying to leave a reply on /forum/showthread.php?10-ABC and I want that $vbulletin->url to point to "/login?redirect=/forum/showthread.php?10-ABC" ?? just so they get back to the same URL they came to the login form from? possible? |
#4
|
|||
|
|||
![]()
You could try:
Code:
$vbulletin->url = '/login?redirect=' . urlencode($vbulletin->url); |
#5
|
|||
|
|||
![]()
awesome!
that's exactly it. thank you so much. bookmarking this thread for future reference. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|