![]() |
Custom page for guests
Hey guys,
Is there a way to display a custom template to all guests, no matter what pages on the site they try to visit? I want to display a login form (nothing else) to all guests. If they aren't logged in, they won't be able to see anything except the login form. I tried creating a plugin and the hook I used was global_start, rest was the simple stuff, just code for the display of a custom template wrapped in the usergroup conditional.. But it didn't work. P.S. Forum and attachment permissions aren't the problem (I'd set them to 'no' for guests after I finish this), I just don't want to show the login form within the forum's style. I have the custom login form finished as well... Thanks... :) |
Post the plugin code you wrote that didn't work so we can try it ourselves and see what the issue was.
|
global_start hook...
PHP Code:
|
Why not just:
PHP Code:
PHP Code:
|
Lol... Thanks a bunch Lynne! :D The second code works as a charm...
|
The "eval" makes me think this is a 3.x solution.
My attempt at a 4.x update: (Template names have been changed to protect the idiotic) Code:
if ($vbulletin->userinfo['usergroupid'] == 1) I have a full-page template called my_custom_login. |
So my attempt works in that non-logged in users are shown that template.
But I have two issues: 1) Logged in users aren't getting any stylesheets. 2) I haven't figured out how to pass name/password to login from the custom template. |
All times are GMT. The time now is 05:18 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|