The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
User Login for non vB pages
Okay, I've searched and found two small hacks for trying to add a user login or welcome panel to non-vB pages. Neither of them suit my purposes. The first was overly simple, just checking the login against the database and returning to the page with no user info. The second was more complicated, but was too much, being the entire welcome panel; additionally I couldn't get it to work with my site directory structure.
All I'm looking for is this. A simple file I can use as an include that will ask a user to login, register, or logout depending on their vB cookie. It'll say [b]'You are logged in as 'username'. logout'[b] if they are logged in, and have the form to login or register if they aren't. That simple. Does anyone have anything this small and simple already? I've seen plenty of sites that use vB database for login, but only those two hacks here. |
#2
|
||||
|
||||
it may not help you getting a welcome panel, but I guess it can help the rest:
https://vborg.vbsupport.ru/showthrea...threadid=36419 Take a look.. |
#3
|
|||
|
|||
Thanks, I looked at that late last night while I was looking for different login solutions. Nice setup, but unfortunately doesn't suit my purposes either. Most of what I'm making is from scratch but I don't have enough knowledge of how vB works to make a stupid simple login.
|
#4
|
||||
|
||||
ok then:
if you add line: PHP Code:
PHP Code:
|
#5
|
|||
|
|||
I also found this instruction in a search but I can't for the life of me figure out what half of it means! lol
"Val> Use the $ logincode Then use the forum home login template to display what you want for when they are logged out. (Keep normal for the login) And use forumhoemlogout for what you want to display when they are logged in. Ala the box with their user info. Just be sure to include a link to logout in the user box. This is what I have always done." |
#6
|
|||
|
|||
Quote:
Hey, this is pretty close to what I need. If I can get it to return the username in that message, and perhaps the userid somewhere so I can use it to check permissions on the admin side, it would pretty much be perfect. |
#7
|
|||
|
|||
I think I may have the template I need. Will this work by itself? Or do I just need to include globals.php?
PHP Code:
|
#8
|
||||
|
||||
to post a template:
create it as a new template inside your admin CP then call it in your code like that: eval("dooutput(\"".gettemplate("NAME_OF_YOUR_TEMPL ATE")."\");"); To refer user's username you can use variable $bbuserinfo[username] in your code (after "require global.php" line) |
#9
|
|||
|
|||
Thanks, I think this may be enough for me to work with for the time being.
|
#10
|
||||
|
||||
If you need any more help, holler! Satan |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|