Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Details »»

Version: , by odell (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-03-2001 Last Update: Never Installs: 0
 
No support by the author.

It would be great if there were some hack to integrate vbulletin's user database with htaccess...

that would do the following things:[list=1][*]Vbulletin would seamlessly control htaccess as well as vbulletin user databases (for example.. u change password in vbulletin it also changes htaccess pass, or when u reg new user in vbulletin it would also create necessary htaccess user, etc..)[*]When users login with htaccess vbb automatically logs them in using the information that the user inputed for htaccess login[/list=1]

I just came across this script written for phpNuke that checks to see if a user logs in with htaccess and if they login with htaccess it will automatically log them in to phpNuke. I thought that much of this could be reused to work with vbulletin. Its only a portion of what would be required for a full htaccess integration hack but its a start anyway.

Im am just starting to learn php and dont have the necessary time or knowledge to create this hack but Im sure alot of ppl would benefit from it, and would all be very appreciateive if someone would create one.

Here is the source:

PHP Code:
<?PHP

/************************************************************************/
/*  Automatic recognition and connection of a user who connects to a    */
/*  PHPNuke site with a htaccess file.                                  */
/* ==================================================================== */
/*                                                                      */
/* Copyright (c) 2001 by Thomas Rudant (thomas.rudant@grunk.net)        */
/* [url]http://www.grunk.net[/url]                                                 */
/* [url]http://www.securite-internet.org[/url]                                     */
/*                                    */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/


if(!isset($mainfile)) { include("mainfile.php"); }

function 
docookie($setuid$setuname$setpass$setstorynum$setumode$setuorder$setthold$setnoscore$setublockon$settheme$setcommentmax) {
    
$info base64_encode("$setuid:$setuname:$setpass:$setstorynum:$setumode:$setuorder:$setthold:$setnoscore:$setublockon:$settheme:$setcommentmax");
    
setcookie("user","$info",time()+15552000);
    
    global 
$user;
    
$user=$info;
    
}

function 
login($uname$pass) {
    global 
$setinfo,$system;
    
dbconnect();
    
$result mysql_query("select pass, uid, storynum, umode, uorder, thold, noscore, ublockon, theme, commentmax from users where uname='$uname'");
    if(
mysql_num_rows($result)==1) {
        
$setinfo mysql_fetch_array($result);
        
$dbpass=$setinfo[pass];
        
        if(!
$system)
             
$pass=crypt($pass,substr($dbpass,0,2));

        if (
strcmp($dbpass,$pass)) {
                        
Header("Location: user.php?stop=1");
                        return;
                }

        
docookie($setinfo[uid], $uname$pass$setinfo[storynum], $setinfo[umode], $setinfo[uorder], $setinfo[thold], $setinfo[noscore], $setinfo[ublockon], $setinfo[theme], $setinfo[commentmax]);
    }
}

if (
$user)
{
    global 
$cookie;
    
    
cookiedecode($user);
    
$username $cookie[1];

    if (
$PHP_AUTH_USER!=$username)
    {
        
setcookie("user");
        
login ($PHP_AUTH_USER,$PHP_AUTH_PW);
    }
}
else
{
    
login ($PHP_AUTH_USER,$PHP_AUTH_PW);
}

?>

Show Your Support

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

Comments
  #2  
Old 05-05-2001, 07:51 PM
Mitrofan
Guest
 
Posts: n/a
Default

If you need to protect directory with the password and only allow registered users to access it and to compare their ID/password with the info from Vbulletin database this can be done with mod_auth_mysql for apache.

It just uses mySQL database for authentication, you can set it to use forum database and user table.

I have this module installed on one of me servers and it also works together with mod_cookies, so if you have your ID/Pass saved in cookies, it does not even prompt you for password.
Reply With Quote
  #3  
Old 05-07-2001, 12:16 AM
adrianmak adrianmak is offline
 
Join Date: Sep 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

where can I download the mod_auth_mysql ?
Reply With Quote
  #4  
Old 05-07-2001, 12:24 AM
Mitrofan
Guest
 
Posts: n/a
Default

Go to http://modules.apache.org and search for it

There are couple of different mod_auth_mysql modules make sure you use the one that works with your version of Apache.
Reply With Quote
  #5  
Old 06-27-2001, 11:10 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could someone actually write this hack for us ?
Reply With Quote
  #6  
Old 06-28-2001, 12:16 AM
max max is offline
 
Join Date: Oct 2001
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What I'd like to have is a separate control page within VB control panel, that would let you administer your HTACCESS accounts. Without having to telnet or edit those rediculious .htaccess/.htpassword/.htgroup files.
(Not sure if this is possible though..)
Reply With Quote
  #7  
Old 07-04-2001, 05:47 PM
Ruth Ruth is offline
 
Join Date: Oct 2001
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone has this hack?

thanks
Reply With Quote
  #8  
Old 07-06-2001, 01:15 AM
Ruth Ruth is offline
 
Join Date: Oct 2001
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my host doesnt support mod_auth_mysql, is there anyway around the hack?

please i need it badly
Reply With Quote
  #9  
Old 07-06-2001, 07:24 AM
adrianmak adrianmak is offline
 
Join Date: Sep 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have downloaded and compile with DSO
how to enable in apache conf httpd.conf ?
Reply With Quote
  #10  
Old 07-07-2001, 09:19 AM
Polo
Guest
 
Posts: n/a
Default

<a href="http://www.widexl.com/" target="_blank">http://www.widexl.com/</a>

go here and they have a cgi script called members admin. It will let you add, edit and remove members through cgi. So this modifies the ht access and other required files as it goes along. it's very very good.

no, i don't work for them.

Polo
Reply With Quote
Reply

Thread Tools

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 12:44 PM.


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.04963 seconds
  • Memory Usage 2,300KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (6)postbit_onlinestatus
  • (10)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete