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

Reply
 
Thread Tools
Details »»

Version: , by wajones wajones is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-05-2001 Last Update: Never Installs: 17
 
No support by the author.

Update, script now accomplishes an automatic login to Inlink. The link didn't attach properly so I'll add it in a later post.

This is a hack to allow In-link to be somewhat integrated with vBulletin, what it does is...

1. Creates a new pending Inlink user at the same time as a new user registers for vBulletin.
2. Validate's the Inlink user when the vBulletin user validates by e-mail.
3. For existing vBulletin Users it creates a new inlink user when their vBulletin profile is updated.
4. Updates Inlink user when vBulletin profile is updated.

Your users will still have to log into Inlink, but they will have the same username and password. They will only have to log in to add a link.

If you validate a new user manually, when he updates his profile he will be validated in the Inlink Table or you can manualy validate in the inlink admin if you wish.

This hack is assuming the vBulletin Tables and Inlink Tables are in the same database.

Let me know if you find any bugs or typo's

Show Your Support

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

Comments
  #22  
Old 11-15-2003, 02:03 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, the hack at vbportal.com works with vbulletin V2.3.2 and In-Link V2.3.1 as can be seen in action at http://directory.thebookforum.com

Darren.
Reply With Quote
  #23  
Old 11-15-2003, 05:28 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A nice board you have, I'm hoing to make something like that in my native language as well... registering. Still some things could be changed ...
Reply With Quote
  #24  
Old 11-15-2003, 05:52 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the compliment.

Suggestions are always welcome
Reply With Quote
  #25  
Old 02-22-2004, 06:21 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why have you the idea, is it working for vBulletin 3.0 integration as well,
or is there another hack (I guess) for this new integration?
Reply With Quote
  #26  
Old 09-16-2004, 02:39 PM
pgowder's Avatar
pgowder pgowder is offline
 
Join Date: Nov 2001
Location: West Columbia, SC
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has this been updated for vB 3?
Reply With Quote
  #27  
Old 11-30-2004, 09:28 AM
crocodile crocodile is offline
 
Join Date: Oct 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://support.intechnic.com/forum/viewtopic.php?t=2881
Reply With Quote
  #28  
Old 11-30-2004, 09:31 AM
crocodile crocodile is offline
 
Join Date: Oct 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
In-Link integration with vBulletin hack
=======================================

Works with vbulletin 2.3.2 and InLink 2.3.1

What this hack does is enable's In-Link to use vBulletin user security.
When new members register in vbulletin the info is stored in the In-link table as well.
Also when the vBulletin password is changed it is changed in inlink as well.

Note: This does not work in reverse, the vbulletin user table is too extensive to attempt an inlink update to it.
So if you make a administration username or password change in Inlink it will invalidate the integration on that users.
The next time the user manages his vbulletin user account it will create a new user account in inlink.

I have added hacks to allow user creation, modification and removal in the vBulletin admin user utility.

1. CHANGES TO IN-LINK

1.1 Change to inlinks index.php
#### At the very top of the script after the <? php add the following. The chdir paths should match those of your server.
Some servers require full paths eg /www/mysite.com/forums
PHP Code:
// vBulletin integration
chdir"../forums/");
include(
"global.php");
global 
$bburl$bbuserinfo;
chdir"../inlink");
// End vBulletin integration 
1.2 Change to inlinks includes/init.php
PHP Code:
#### Find the following #####

    //initialize all variables
    
$rs =&$conn->Execute("select name,value from inl_config");
    while (
$rs && !$rs->EOF
    {    
$c_name $rs->fields[0];
        
$c_value $rs->fields[1];
        $
$c_name $c_value;
        
$rs->MoveNext();
    } 
##### insert this after ####
PHP Code:
// Inlink to vBulletin integration hack
global $bbuserinfo,$DB_site;
// If not In-Link Admin
if ($admin != 1){
    
// If user is logged into vBulletin
    
if ($bbuserinfo['userid']!=0) {
         
$bbuserid $bbuserinfo['userid'];
         
$username=$bbuserinfo['username'];
         
$password=$bbuserinfo['password'];
         
$email=$bbuserinfo['email'];
          
          
// If Logged in user has an existing InLink Account
          
if ($inlinkuser=$DB_site->query_first("SELECT user_name,user_pass,user_perm FROM inl_users WHERE user_name='$bbuserinfo[username]'")){
               
               
// Update the In-Link password if different than vBulletin
               
if ($inlinkuser['user_pass']!=$password){
                    
$DB_site->query("UPDATE inl_users SET user_pass='$password' WHERE user_name='$bbuserinfo[username]'");
               }
                
// Set user permissions per vBulletin usergroupid
                
if ($bbuserinfo['usergroupid']==6) {
                    
// Admin
                    
$user_perm=1;
                }elseif (
$bbuserinfo['usergroupid']==or $bbuserinfo['usergroupid']==7) {
                    
// Editor 
                    
$user_perm=5;
                }elseif (
$bbuserinfo['usergroupid']==2) {
                    
// Registered User
                    
$user_perm=3;
                }else{
                    
// All other's Coppa, Waiting Email confirmation, etc...
                    
$user_perm=0;
                }

                
// Auto update user permissions if different than vBulletin usergroupid
                // Comment this section out if you want to handle user permissions manually
                
if ($inlinkuser['user_perm']!=$user_perm){
                    
$DB_site->query("UPDATE inl_users SET user_perm='$user_perm' WHERE user_name='$bbuserinfo[username]'");
                }
                
// End of section to comment out if setting user permissions manually

           // If user does not have In-Link user account, create one.
           
}else{
                
                
// Un-comment out the below line if you want to set user permissions manually
                // $user_perm=3;
                // Then comment out the next 9 lines if you want to set manually
                
if ($bbuserinfo['usergroupid']==6) {
                    
$user_perm=1;
                }elseif (
$bbuserinfo['usergroupid']==or $bbuserinfo['usergroupid']==7) {
                    
$user_perm=5;
                }elseif (
$bbuserinfo['usergroupid']==2) {
                    
$user_perm=3;
                }else{
                    
$user_perm=0;
                }
                
// End of lines to comment out to set user permissions manually
                
                
if ($user_perm!=0){
                    echo 
"Testing Not Found $username"// Comment this out later once everything working OK.
                    
mysql_query("INSERT INTO inl_users (user_name, user_pass, first, last, email, user_perm, user_date, user_status, user_pend, user_cust) values ('$username','$password','".addslashes(htmlspecialchars("vBulletin"))."','".addslashes(htmlspecialchars("User"))."','$email','$user_perm','".time()."','1','0','0')");
                }
         }
    
    }
    
    
// auto log vBulletin User into inlink
    
if ($bbuserinfo['userid']!=0) {
        
$user $bbuserinfo['username'];
        
$pass=$bbuserinfo['password'];
        
login($bbuserinfo['username'],$bbuserinfo['password']);
        
    }
}

// End Inlink to vBulletin integration hack 
1.3 Change to inlinks includes/functions_lib.php
PHP Code:
#### Find the following
$password=md5($password);

#### Replace it with the following

// Inlink to vbBulletin integration hack
global $admin;
 if (
$admin == 1){
     
$password=md5($password);
}
// End Inlink to vbBulletin integration hack 
1.4 Change to inlinks header.tpl template
#### Add this to the top of header.tpl
Remember to change the chdir paths to those of your server.
PHP Code:
<?php
// Inlink to vbBulletin integration hack
chdir"../forums"); 
global 
$bburl$bbuserinfo;
chdir"../inlink");
// End Inlink to vbBulletin integration hack
?>
1.5 Change to inlinks index.tpl template to disable user login and registration.
You want to force registration and login to vbulletin.
#### Find the following and comment out the <%insert_login%> ####
PHP Code:
<TD width="350" valign="top">
          <%
insert_login%>
      <%include:
box_subscribe%>
      <%include:
box_suggest%>
</
TD
#### or just replace the above with this. ####
PHP Code:
<!-- Inlink to vbBulletin integration hack -->
<
TD width="350" valign="top"
        <!--  <%
insert_login%> -->
      <%include:
box_subscribe%>
      <%include:
box_suggest%>
</
TD>
<!-- 
Inlink to vbBulletin integration hack --> 
1.6 You will also want to go through the templates and comment out, remove all the links to the in-link
registration and login or change them to point to the vBulletin registration.
In particular you will need to change the menu_user.tpl template to remove the inlink login/registration/profile links.

################################################## ################################################## ##############
2. THIS NEXT PART HAS BEEN ADDED TO ALLOW UPDATING AND DELETING USERS FROM THE VBULLETIN ADMIN.
This is completely optional as you can use the inlink admin to delete and change inlink users.
Additionally the user oassword will be updated when a user enters inlink if it has been changed.

2.1 Open the vBulletin admin/user.php
#### find the following ####
PHP Code:
$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,styleid,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,customtitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,lastpost,posts,timezoneoffset,emailnotification,receivepm,emailonpm,ipaddress,pmpopup,options,birthday) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashes(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid','".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','$customtitle',$joindate,'$cookieuser','$daysprune',$lastvisit,$lastactivity,$lastpost,'$posts','$timezoneoffset','$emailnotification','$receivepm','$emailonpm','".addslashes($aipaddress)."','$pmpopup','$options','birthday')");
  
$userid=$DB_site->insert_id(); 
##### insert this after ####
PHP Code:
// inlink
$DB_site->query("INSERT INTO inl_users 
(user_name, user_pass, first, last, email, user_perm, user_date, user_cust, user_status, user_pend)
values 
('"
.addslashes(htmlspecialchars($ausername))."','".addslashes(md5($apassword))."','".addslashes(htmlspecialchars("vBulletin"))."','".addslashes(htmlspecialchars("User"))."','".addslashes(htmlspecialchars($email))."','3','".time()."','0','1','0')");
//inlnk 
#### find the following ####
PHP Code:
  $pwinclude="";
  if (
$apassword!="") {
    
$pwdinclude=",password='".addslashes(md5($apassword))."'";
    
  } 
#### replace it with the following ####
PHP Code:
 $pwinclude="";
  if (
$apassword!="") {
    
$pwdinclude=",password='".addslashes(md5($apassword))."'";
    
//Inlink
    
$pwdinclude2 =",user_pass='".addslashes(md5($apassword))."'";
  } 
#### find the following ####
PHP Code:
$DB_site->query("DELETE FROM session WHERE userid='$userid'"); 
##### insert this after ####
PHP Code:
// Inlink to vbBulletin integration hack
  
$DB_site->query("DELETE FROM inl_users WHERE user_name='$user[username]'");
// End Inlink to vbBulletin integration hack 
That's it!
http://support.intechnic.com/forum/viewtopic.php?t=2881
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 11:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07024 seconds
  • Memory Usage 2,362KB
  • Queries Executed 22 (?)
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
  • (13)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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