The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Login Hack
Hi,
I'm looking for a hack which will allow to me to have a login box to my forums on a non VB PHP page. I would love it to work the same as this hack: https://vborg.vbsupport.ru/showthrea...threadid=37134 but with just the login box. I've tried to edit that hack to do what I want but I can't get it to work correctly. Can anyone help me out please, it doesn't seem like a huge job and I would be so greatful. Thanks in advance for any help. |
#2
|
|||
|
|||
I have done this today, the page that I have had the login boxes display on is not even php. Only a plain html form is needed.
Insert this into the HTML output of your page PHP Code:
You can have a look at the template "error_nopermission_loggedout" for reference, this has a similar form on it too. Hope this helps! |
#3
|
||||
|
||||
can u then use that somehow to log people into another part of the site? ie use the forum as your membership signup tool and then use the users login details on other parts of the site to access member only content?
|
#4
|
|||
|
|||
If your main site is on the same domain as the forums, you can check for the "bbuserid" cookie. When a user is logged into the forums, this cookie is present and stores the user's id.
So only allow them access if this cookie is present. |
#5
|
||||
|
||||
ahhhh that may be a workaround... have u seen any examples of this or know of any code anywhere?
|
#6
|
|||
|
|||
I have coded it in the last two days, but our main site is in ASP, so that may not be of any help to you.
If you want to see the code i have used, just shout! |
#7
|
||||
|
||||
what im after is a comments field down the bottom of news items that i post. my site is in php. www.xboxworld.com.au
i could go either way 1.when page loads, detects forum cookie and displays comments text box/form at the bottom of the post, if not detected displays nothing. 2.for comments form under news post have username and login fields with the main comment text field. username and login is validated against the forum DB and allows them to make a comment if they are a member. if not it directs them to the signup forum page. |
#8
|
|||
|
|||
The way i would probably do it is..
1a. Check the cookie and see if the user is logged in. If the user is logged in, then the comment fields can go up, no problems there. If the users ISNT logged in: 2a. Display the form that i posted earlier in this thread (with a message saying "login to post a comment" or similar). This form will hand all the authentication duties over to the proper vBulletin scripts (member.php). 2b. Have the login auto-redirect back to the main page, and the user will be back, with the correct cookie, and stage 1a above will occur! Use this hidden field in your form, this is what the member.php script will re-direct the user to if he logs in successfully: PHP Code:
|
#9
|
||||
|
||||
thanks for that ill give it a test out this afternoon!
|
#10
|
|||
|
|||
I needed this exact code for some other project I was working on --- it rocks!! thanks!!!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|