vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Log-out, return to same page -- vs -- return to forumhome (https://vborg.vbsupport.ru/showthread.php?t=23700)

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

Quote:

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/showt...ighlight=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

Code:

$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:

Code:

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:

Code:

<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

Quote:

Originally posted by Martz
You can probably change most of this in the templates.
I'm still looking for a solution. Thank you.


All times are GMT. The time now is 10:00 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.01503 seconds
  • Memory Usage 1,730KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (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