![]() |
|
Mod Options |
![]() |
|||||||||||
Password protect non vb pages (e.g. for admin pages)
![]() Developer Last Online: Mar 2011 ![]() ![]() ![]() This modification is in the archives.
This is not really a hack just a handy piece of code. You can use this to password protect individual pages. The username and passwords are taken from the vBulletin database.
Currently this is set to allow only usergroupsid 5 and 6 (admin and super moderators) through [example use as admin area protection]. This could be changed though to allow anyone through if registered, or for specific usergroups etc. The code is in authvb.php An example is give in authtest.php Hope this is of use to some people. If there's some interest I'll tidy it up a bit. Download Now Only licensed members can download files, Click Here for more information. Show Your Support
No members have liked this post.
|
Comments |
#2
|
|||
|
|||
suppose I have a directory of my site with videos in it.
would putting this hack on the page to download the videos prevent people from direct linking to them or downloading them in any other way? No members have liked this post.
|
#3
|
|||
|
|||
Originally Posted by !!!cyr0n_k0r
No it wouldn't prevent that. This really only protects individual pages.
No members have liked this post.
|
#4
|
||||
|
||||
thank you ! Great idea to make static pages w/ content seen by usergroups.
:banana: /me Installs .. No members have liked this post.
|
#5
|
|||
|
|||
i'm using it for this now... if i could only integrate all this stuff into vb
http://video.dcevoclub.com No members have liked this post.
|
#6
|
||||
|
||||
![]()
This is beautiful in its simplicity.
I have integrated your vbauth hack into my Automated vBNews Programming Interface (AvPI) to allow only front page Administrators to be able to access the programmed articles administration page. I was delightfully surprised to find that I was able to populate most of my fields based on the HTTP auth entry. Changed those text fields to hidden fields and greeted the user by name upon entry. Great administrative tool - I can see lots more uses for this! Thanks! No members have liked this post.
|
#7
|
|||
|
|||
Hi there
If a user logs into the HTTP auth protected area, is there a way to make them appear in the Online users list in vb? Perhaps adding a superscript E at the end of their name to signfy that they are logged into an external page/area? No members have liked this post.
|
#8
|
|||
|
|||
Originally Posted by dcevoclub
so it seems you have adapted this to do exactly what I want to.
The only problem is.. what is the people know the exact path on the server? Will the htaccess STILL prevent them from accessing the directory? No members have liked this post.
|
#9
|
|||
|
|||
rafe, Im not a php guru.. give some better instructions on how to install this hack.
No members have liked this post.
|
#10
|
||||
|
||||
anyone have a way to make this check for secondary groups like (membergroupids = '5' or membergroupids ='16') the above seems to work ONLY if the user is in 5 or 16 as their only secondary group, ie, if users secondary groups are = 5,11,13 then it fails No members have liked this post.
|
#11
|
|||
|
|||
Ok I am trying this hack on my site but I seem to be getting a Sql error. The password logon comes up on the screen but when you hit the ok button after putting your logins in I get this Sql error message.
Warning: mysql_connect(): Unknown MySQL Server Host 'u' (1) in /home/xxxxxx/public_html/vwar/includes/classes/class_db.php on line 95 -> Database Error: Link-ID == false, connect failed -> MySQL Error: -> MySQL Error Number: 0 -> Date: 25.05.2004 @ 20:56 -> Script: /vwar/war.php -> Referer: Any help would be appreciated. Are we supposed to run any Sql querries installing this? if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) { mysql_connect( $checkservername, $dbcheckusername, $dbcheckpassword ) or die ( 'Unable to connect to server.' ); mysql_select_db( $dbcheckbase ) or die ( 'Unable to select database.' ); No members have liked this post.
Last edited by Oldfart; 26 May 2004 at 02:08. |
#12
|
||||
|
||||
Originally Posted by Oldfart
Whats the hostname of your mySQL server? Looks like it is currently set to "u" when you more likely want this to be "localhost".
No members have liked this post.
Last edited by maximux1; 26 May 2004 at 02:58. |
#13
|
|||
|
|||
My db is set to "localhost"
I have no idea why this happens. I must be doing something wrong. I put my db settings in the authvb.php and put the require('./authvb.php'); in the page I want to secure but whenever I try and access that page I keep getting the same MySql error. No members have liked this post.
|
#14
|
|||
|
|||
anyone have any ideas... I would like to get this to work on my site. ANy help would be appreciated.
![]() No members have liked this post.
|
#15
|
||||
|
||||
Originally Posted by evilTone
I'll look into this for the next version (sorry a bit busy right now), but I haven't forgotten this.
No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 05:02.