View Full Version : Log-out, return to same page -- vs -- return to forumhome
theflow
07-26-2001, 06:12 AM
I'm guessing someone has already done this. Can you point to where? If not, can anyone code this?
On my board, we allow postings by Unregistered users.
All 3 examples probably require the same logic, but anyway:
Case 1: You're at a threadlist, you're logged in, but you decide you want to either post a reply as Unregistered, or you want to log-in under a different screen name. So, log-out, but return to the same threadlist.
Case 2: You're logged in, reading posts, and before you reply, you decide you want to either switch usernames or reply unregistered (or start a new thread as unregistered name). Log-out, and return to the page of posts (showthread).
Case 3: You're logged in, you hit reply, you're at the message-compose screen, you decide you want to post under an unregistered name. Log-out, return to the message-compose screen.
--
Anyone have this code already written? Thank you.
Martz
07-26-2001, 10:07 AM
You can probably change most of this in the templates.
theflow
07-26-2001, 04:24 PM
Originally posted by Martz
You can probably change most of this in the templates.
I am not a coder, yet have immersed myself in vB templates over past 3 weeks. I have been all over them and done all I can. I have searched forums exhaustedly, I have asked questions in both How do I and "Hack Requests" sections. In short, if you know how to do it, by all means please share me some answers. I don't know how to code PHP and will not experiment with my php files -- that is not my strength. That's where I need the help.
Here's my site:
www.theflow.com/forums
Use this testname:
username: test
password: test
-----------------------------------------------------------------
Here are all the code references I have compiled that seem relevant. Ed Sulllivan, Freddie, others...)
-----------------------------------------------------------------
**2** Want to have a login and logout box on every forum. And when a user logs in or out using this login, I want that vB redirects him to that forum, not the list of forums. Can I do this ?
--
Logging in tries to do this.
Logging out will require you to hack the logout function in member.php to redirect dynamically.
-Mike "Ed" Sullivan, mike@vbulletin.com
http://www.vbulletin.com/forum/showthread.php?s=&threadid=21946&highlight=login
-------------------------------------------------------------------
**6** A "login"-button which changes to "logout" if a member is logged in? --
Modify your header template to contain the variable $loginlogout where you want this image and place this in your phpinclude template:
if ($bbuserinfo[userid]) {
$loginlogout = "<a href=(...)><img src="login.gif"(...)>";
} else {
$loginlogout = "<a href=(...)><img src="logout.gif"(...)>";
}
----Freddie Bingham - freddie@vbulletin.com
vBulletin Developer & Support
-------------------------------------------------------------------
**7** Creating a Login template? I created a template for a login page that was basically the same page you get when you try to post something without being logged in (error_nopermission). But I don't know how to call it from anywhere. I tried adding
$loginuser = gettemplate("loginuser",0);
to index.php and then trying index.php?action=loginuser, but that didn't work.
Can anyone tell me how to do this?
--
Ed Sullivan,vBulletin Developer: add this just before an if ($action=="blah") { line:
if ($action=="YOURACTION") {
eval("echo dovars(\"".gettemplate("YOURTEMPLATE")."\");");
}
Then call action=YOURACTION
-------------------------------------------------------------------
**8** I know there is a login option at the bottom right, but would it be possible to get one on a separate page?
---
Kier, vBulletin Developer:
Save the following as something.htm, edit the path/to/forums/ so that it points to the member.php in your forums directory, and upload:
<html>
<head><title>Log in</title></head>
<body>
<form action="path/to/forums/member.php" method="post">
<FONT face="verdana,arial,helvetica" size="1">
Login with username and password:</FONT>
<INPUT TYPE="TEXT" NAME="username" SIZE=7>
<INPUT TYPE="PASSWORD" NAME="password" SIZE=7>
<input type="hidden" name="action" value="login">
<input type="submit" value="Login!">
</form>
</body>
</html>
-------------------------------------------------------------------
**9** How do I get the same details (login option, Birthdate, Private messages, etc) that appear on the index page of the forum to appear on every page?
-- You will have to take the code for those features out of index.php and put them in global.php
theflow
07-31-2001, 04:37 AM
Originally posted by Martz
You can probably change most of this in the templates.
I'm still looking for a solution. Thank you.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.