The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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...
|
|
#2
|
||||
|
||||
|
Post the plugin code you wrote that didn't work so we can try it ourselves and see what the issue was.
|
|
#3
|
|||
|
|||
|
global_start hook...
PHP Code:
|
|
#4
|
||||
|
||||
|
Why not just:
PHP Code:
PHP Code:
|
| Благодарность от: | ||
| Frosty | ||
|
#5
|
|||
|
|||
|
Lol... Thanks a bunch Lynne!
The second code works as a charm...
|
|
#6
|
|||
|
|||
|
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)
{
$templater = vB_Template::create('my_custom_login');
print_output( $templater->render());
}
I have a full-page template called my_custom_login. |
|
#7
|
|||
|
|||
|
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. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|