Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Modshack Modshack is offline
Developer Last Online: May 2002 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-31-2002 Last Update: Never Installs: 59
Is in Beta Stage  
No support by the author.

This works on ALL VB version

This was created by an Admin (CyberGaf) on my site for the simple reason we wanted to make non vbull pages passworded and available only to members.

The full install details are in the zip file and TBH if you cant get this up and running its time to give up.

This can also be used on html pages I am told but have not tried it.

You can even set which user groups are allowed to view the page.

# Vbulletin GROUP ID's
# default setting = Admin & Super Moderators
#
# 1 Unregistered / Not Logged In
# 2 Registered
# 3 Users Awaiting Email Confirmation
# 4 (COPPA) Users Awaiting Moderation
# 5 Super Moderators
# 6 Administrator
# 7 Moderators
# 8 Banned
# 9 Moderated
# 10 Gold Member
# 11 Platinum Member

Please note the above usergroups are for our forums and therefor will not be available on your forum.

Or by changing usergroupid = '5') to userid ='users id') you can set the script to allow only specific users to view the pages.

This is not so much a hack but a handy little addon and it DOES work.

HM

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 02-02-2004, 04:49 PM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any reason why this wouldn't work with vbulletin 3.0? I glanced through the file real quick and the code seems simple enough and shouldn't connect to anything vb2 specific. I'll try to test it out when I get home if no one else does first.
Reply With Quote
  #73  
Old 02-04-2004, 12:18 AM
Timmmmmy Timmmmmy is offline
 
Join Date: Mar 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mine is not working with vb 3.0
Reply With Quote
  #74  
Old 02-05-2004, 08:34 AM
Timmmmmy Timmmmmy is offline
 
Join Date: Mar 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured out the problem, i took out the variable for check pwd instead just changed the sql query

Here is the fix to that file

Code:
    $sql = "SELECT * FROM user WHERE 
            username = '$PHP_AUTH_USER' AND 
            password = 'MD5(CONCAT(MD5('$PHP_AUTH_PW'), salt))' ";
Reply With Quote
  #75  
Old 02-05-2004, 08:44 AM
Timmmmmy Timmmmmy is offline
 
Join Date: Mar 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<?php 
    include("/home/****/public_html/dbConfig.php");


$encryptedpw ="true";

$realm = "This site is private!";

$auth = false; // Assume user is not authenticated 

if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) { 

    // Connect to MySQL 

    mysql_connect( $host, $user, $password ) 
        or die ( 'Unable to connect to server.' ); 



    mysql_select_db( $forum_database ) 
        or die ( 'Unable to select database.' ); 


    $sql = " SELECT * FROM user WHERE 
	username='$PHP_AUTH_USER' AND 
	password = MD5(CONCAT(MD5('$PHP_AUTH_PW'), salt))";
            
    // Execute the query and put results in $result 

    $result = mysql_query( $sql ) 
        or die ( 'Unable to execute query.' ); 

    // Get number of rows in $result. 

    $num = mysql_numrows( $result ); 

    if ( $num != 0 ) { 

    // A matching row was found - the user is authenticated. 

        $auth = true; 

    } 

} 

if ( ! $auth ) { 

    header( "WWW-Authenticate: Basic realm=\"$realm\"" ); 
    header( "HTTP/1.0 401 Unauthorized" ); 
    echo 'Authorization Required - EMPL Owners Only!'; 
    exit; 
} 

?>
Reply With Quote
  #76  
Old 02-08-2004, 06:38 PM
jw791 jw791 is offline
 
Join Date: Jan 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance on posting a full vb3 version? I tried Timmy's hacks but I'm sure that I'm messing something up.

No workie w/vb3
Reply With Quote
  #77  
Old 02-28-2004, 03:46 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jw791
Any chance on posting a full vb3 version? I tried Timmy's hacks but I'm sure that I'm messing something up.

No workie w/vb3
I got it to work on vb3 (watch where he has the ' characters, its different in the two code samples)
Reply With Quote
  #78  
Old 03-22-2004, 03:13 AM
Zaeolos's Avatar
Zaeolos Zaeolos is offline
 
Join Date: Jan 2003
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gopherhockey
I got it to work on vb3 (watch where he has the ' characters, its different in the two code samples)
Ok, give us a better hint on how you got it to work with VB3. I still cannot get it to work.
Reply With Quote
  #79  
Old 03-23-2004, 05:20 PM
blkthndr blkthndr is offline
 
Join Date: Feb 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These are the only lines I changed and it works for me with 3.0.0 Gold:

// Formulate the query
// Get rid of these 4 lines or comment them out:
# if ($encryptedpw)
# $chkpw = md5($PHP_AUTH_PW);
# else
# $chkpw = $PHP_AUTH_PW;
// Keep this line
$sql = "SELECT * FROM user WHERE
// Keep this line
username = '$PHP_AUTH_USER' AND
// get rid of this line
# password = '$chkpw' AND
// add this line
password = MD5(CONCAT(MD5('$PHP_AUTH_PW'), salt)) AND usergroupid = '6'";
Reply With Quote
  #80  
Old 03-24-2004, 03:59 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am unable to get the Page to load. If i goto the url of authvb.php directly it seems to work fine. However when i include this into a PAGE then it does not AUTH me. I have my cookie set to my domain but i dont know what could be wrong.
Reply With Quote
  #81  
Old 03-24-2004, 07:00 PM
blkthndr blkthndr is offline
 
Join Date: Feb 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is how I am including it:

PHP Code:
<?php require('./authvb.php'); ?>
Hope that helps.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04915 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete