vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Redirecting the redirect to login (https://vborg.vbsupport.ru/showthread.php?t=281476)

tmatrix 04-12-2012 05:20 PM

Redirecting the redirect to login
 
Hi,

I've been looking for a solution for the following;

when a user who is not logged into vBulletin clicks a link when followed requires the user to login to view the content, they get redirected to a the login page. - this is the standard vBulletin behavior.

What we need is to instead redirect them to an entirely different page.

So far I have found what might be a couple of solutions for vBulletin 3.x, but not 4.x. These solutions are global_setup_complete hook and init_startup. Might these still do what I need them to do in vBulletin 4.x, or would I need to "hack core". Or maybe even something more creative, like a redirect in the .htaccess, or a js redirect.

any thoughts and inputs highly appreciated.

Thanx
Murias

firebrand media 04-18-2012 01:40 PM

Have you made any progress on this?
I have exactly the same need.

tmatrix 04-18-2012 03:26 PM

Yeah, we did have "progress".

Let me give you a bit of our setup first, this I feel is important. We have vB within an iframe inside of a Drupal page. In our Drupal install we have a module which shares login information and account creation between the two databases, keeping them in sync beautifully. Drupal needs to be in charge of this process though. So when ever the login page would show for vB, we needed instead the Drupal login page.

Our solution, which we thought was pretty slick.
1) setup .htaccess to have apache redirect any http call to the vB login url, to the Drupal login url.
2) wrote a js solely for the Drupal login page to detect if it were inside a parent frame. If so, the js would then reload the parent with the login page and no iframe.

There ya have it. ;)

Your own mileage may vary.

Hope this helps.

Cheers Murias

firebrand media 05-29-2012 03:13 PM

That's a clever solution.
Won't work in our case since we're handling the odd stuff with a couple custom pages and living mostly within vBulletin.
But glad to hear you got it working.


All times are GMT. The time now is 11:08 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.00897 seconds
  • Memory Usage 1,708KB
  • 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
  • (4)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