The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
password protection
I have searched for the answer to my question, but I could not find it. If it is there, sorry for the repeat post.
Anyways, does anybody know how to password protect a .php file? I have vbHome installed in root directory, but I don't want anybody to see that page untill they are verified. Any suggestions? Thanks, Brett editor@hoosierairnews.com |
#2
|
||||
|
||||
When you say verified, I'm assuming you mean verified to ensure the person is a member of the forum?
If that is the case, then just make sure whatever PHP file the member is accessing has require("global.php"); located in it near the top of the file, and shortly below this line of code add: PHP Code:
|
#3
|
|||
|
|||
Velocd,
Sorry about the confusing question. I have a web site for me and my family members. Right now, I have VB 2.2.9, and vbHome 3.8. On the vbHome page, the latest x-number of newest threads are shown. I do not want anyone to "walk in off the street" and see what my family is talking about. Obviously, some of it may be private and personal at times. I need a way to either only allow members to see the latest threads on the vbHome page, or password protect the vbHome page so my relatives have to enter a username and password before even getting to the site. Make sense? My host tells me that I can't password protect my root directory. I thought about moving vbHome into a password protected directory, and then creating a redirect that points to the vbHome directory. Can't figure out how to do that, though. Thanks, Brett |
#4
|
||||
|
||||
That's a bit different than what you had asked in your first post, but thanks for clarifying.
I don't use the newest vBhome, so this may be a bit difficult for you to understand, but the easiest way to hide the latest threads for only members is to find in the vBhome index.php the whole section where the latest thread code lies, and place it inside an if-statement checking if the person is a member or not. PHP Code:
|
#5
|
|||
|
|||
Well, that didn't work. Seemed logical, though. Any other suggestions? I have nothing else to do today!
Thanks, Brett |
#6
|
||||
|
||||
at the top of the index do what Velocd said only if their id = 0 give them the login info and nothing else on the main page
|
#7
|
|||
|
|||
That did work, guys. However, there is no way for the registered users to log in.
If they are a registered user, but not logged in, they need to have the ability to log in. And, after doing so, they would be re-directed to another web page, like index2.php (i wont make it that easy). Make sense? -Brett |
#8
|
|||
|
|||
Use this insted, it will load a login form.
PHP Code:
|
#9
|
|||
|
|||
I have the log in form loading!!! I am really close here.
Right now, the log in process works, but index.php is not loading after the login process. I working with the templates under the admin interface to see what is going on. Thanks, Brett |
#10
|
|||
|
|||
Got it!!!
Thanks a bunch. You saved me a lot of work. I just had to change the path in the template of member.php to /forum/member.php. That was it. Duh! -Brett |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|