Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Password protect non vb pages (e.g. for admin pages) Details »
Password protect non vb pages (e.g. for admin pages)
Mod Version: 1.00, by Rafe (Member) Rafe is offline
Developer Last Online: Mar 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 24
Released: 09 May 2004 Last Update: Never Downloads: 94
Not Supported Is in Beta Stage  

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

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 09 May 2004, 19:38
!!!cyr0n_k0r !!!cyr0n_k0r is offline
 
Join Date: Apr 2002
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?
Reply With Quote
  #3  
Old 09 May 2004, 22:15
Rafe Rafe is offline
 
Join Date: Jul 2003
Originally Posted by !!!cyr0n_k0r
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 it wouldn't prevent that. This really only protects individual pages.
Reply With Quote
  #4  
Old 10 May 2004, 03:08
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
thank you ! Great idea to make static pages w/ content seen by usergroups.

:banana:

/me Installs ..
__________________
http://www.szone.us |

Facebook | My:Hacks @ vBulletin.org
Reply With Quote
  #5  
Old 10 May 2004, 14:15
dcevoclub dcevoclub is offline
 
Join Date: Jul 2003
i'm using it for this now... if i could only integrate all this stuff into vb

http://video.dcevoclub.com
Reply With Quote
  #6  
Old 13 May 2004, 04:32
maximux1's Avatar
maximux1 maximux1 is offline
 
Join Date: Mar 2002
Thumbs up Painless & Seamless

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!
Reply With Quote
  #7  
Old 16 May 2004, 12:49
The Watcher The Watcher is offline
 
Join Date: Oct 2003
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?
Reply With Quote
  #8  
Old 20 May 2004, 02:13
!!!cyr0n_k0r !!!cyr0n_k0r is offline
 
Join Date: Apr 2002
Originally Posted by dcevoclub
i'm using it for this now... if i could only integrate all this stuff into vb

http://video.dcevoclub.com
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?
Reply With Quote
  #9  
Old 20 May 2004, 02:38
!!!cyr0n_k0r !!!cyr0n_k0r is offline
 
Join Date: Apr 2002
rafe, Im not a php guru.. give some better instructions on how to install this hack.
Reply With Quote
  #10  
Old 20 May 2004, 11:08
evilTone evilTone is offline
 
Join Date: Apr 2004

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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
Reply With Quote
  #11  
Old 26 May 2004, 02:00
Oldfart Oldfart is offline
 
Join Date: Jun 2002
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.' );

Last edited by Oldfart; 26 May 2004 at 02:08.
Reply With Quote
  #12  
Old 26 May 2004, 02:56
maximux1's Avatar
maximux1 maximux1 is offline
 
Join Date: Mar 2002
Originally Posted by Oldfart
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? It looks like you have the server set to "u" when more likely you want to set it to localhost.

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.' );
Whats the hostname of your mySQL server? Looks like it is currently set to "u" when you more likely want this to be "localhost".

Last edited by maximux1; 26 May 2004 at 02:58.
Reply With Quote
  #13  
Old 26 May 2004, 03:27
Oldfart Oldfart is offline
 
Join Date: Jun 2002
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.
Reply With Quote
  #14  
Old 26 May 2004, 20:03
Oldfart Oldfart is offline
 
Join Date: Jun 2002
anyone have any ideas... I would like to get this to work on my site. ANy help would be appreciated.
Reply With Quote
  #15  
Old 26 May 2004, 21:22
Rafe Rafe is offline
 
Join Date: Jul 2003
Originally Posted by evilTone
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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
I'll look into this for the next version (sorry a bit busy right now), but I haven't forgotten this.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:44.

Layout Options | Width: Wide Color: