Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Suggestions and Feature Requests

Notices

Reply
 
Thread Tools Display Modes
  #31  
Old 10-24-2009, 02:53 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 11,475
BMR777 is on a distinguished road
Default RE: MyBB intergration

This might help. I just remembered that I sent an email to someone a long time ago on how to integrate the script possibly with PunBB, however a lot of the advise applies to MyBB as well:

Quote:
As far as login integration goes, it is possible. What you can probably do is just disable registrations through the adoptables script and have all the registrations handled by PunBB by removing register.php. Now the adoptables script uses its own cookies for storing user data, so you can probably very easily change the login system to instead read from PunBB's database tables and write to the cookies rather than reading from the Adoptables database tables and write to the cookies.

In functions.php, look at the logincheck() function, which basically checks the cookie values against the database to see if a user is logged in. Rather then querying the adopts_users table for the username / password, just query through PunBB's database tables for this info.

Also, you'll want to look at login.php and change the database portions to read from the PunBB tables and not the adopts_ tables.

You'll also have to make some adjustments to the usergroups. In functions.php the cancp function handles if a user can access the site's Admin CP and the cando function determines what users can do, such as adopt pets, or which portions of the ACP they can access if they are admins. Basically for the usergroups what you need to do is edit the getgroup() function in functions.php to make it select the user's usergroup from PunBB's database tables. Then you need to make sure the numerical IDs of the adopts_groups table data MATCH the ones from PunBB, so in my script Root Admins are group 1, so if say in PunBB root admins are group 4, you need to change the root admins group on the adoptables script from group 1 to group 4.

Lastly, you'll need to edit the profile.php page to read the user's profile data from PunBB rather than from the adopts_users table.

That should be basically what you need to do for login integration. This way the forums handle all registrations of new and existing members and users just log in to the adoptables script with the same username / password as on the forums and it all should work fine. :)
Also, this code may help. It's some code I wrote for a custom CMS script to allow for MyBB integration. If you replace the logincheck() function in inc > functions.php with the following code this will help with MyBB integration.

PHP Code:
function logincheck(){

include(
"forum/inc/functions_user.php");

if (isset(
$_COOKIE['ourusername']) and isset($_COOKIE['ourpass'])){

$username $_COOKIE['ourusername'];
$password $_COOKIE['ourpass'];

$username secure($username);
$password secure($password);

/*
//Don't check the salt of the password as we did this when we logged in...

//First we select the salt from the database where we have a username match...

$query = "SELECT * FROM mybb_users WHERE username = '$username'";
$result = mysql_query($query);
$num = mysql_numrows($result);

//Loop out code
$i=0;
while ($i < 1) {

$salt=@mysql_result($result,$i,"salt");

$i++;
}

//Now we salt the password...

$saltedpw = salt_password($password, $salt);

*/

//Run login operation
$query "SELECT * FROM mybb_users WHERE username = '$username'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$luser=@mysql_result($result,$i,"username");
$lpass=@mysql_result($result,$i,"password");

$i++;
}

    if(
$username == $luser and $password == $lpass){
        
$isloggedin "yes";
    }
    else{
    if (isset(
$_COOKIE['ourusername'])){
    
$past time() - 10
    
setcookie("ourusername",$username,$past);
    }

    if (isset(
$_COOKIE['ourpass'])){
    
$past time() - 10
    
setcookie("ourpass",$password,$past);
    }
    
$isloggedin "no";
    }

}
else
{
//User is not logged in
$isloggedin "no";



//Return our user data
$userdata[loginstatus] = $isloggedin;
$userdata[username] = $username;

return 
$userdata;


Then you may have to edit login.php and logout.php, but I am not sure. Then just make sure that the usergroups match up in the Adoptables Admin CP with the ones in MyBB and you are all set. :)

Whatever username users register for on the forums should be the one their adoptables are saved under. :)

I hope this helps,
Brandon
Reply With Quote
  #32  
Old 10-24-2009, 02:58 PM
exdiogene exdiogene is offline
Member
 
Join Date: Oct 2009
Posts: 84
Credits: 8,486
exdiogene
Default RE: MyBB intergration

Thnaks brandon, ill get into this tommorrow, for now i am going on my games sevrer :D see ya guys
Reply With Quote
  #33  
Old 10-24-2009, 03:04 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,955
Arianna will become famous soon enough
Default RE: MyBB intergration

Thanks, Brandon. I have to go to bed (Europe. xP) but I'll also look at it tomorrow.
Reply With Quote
  #34  
Old 10-25-2009, 01:23 PM
exdiogene exdiogene is offline
Member
 
Join Date: Oct 2009
Posts: 84
Credits: 8,486
exdiogene
Default RE: MyBB intergration

hey brandon when i add that code it says it cant reefine logincheck function... :(
Reply With Quote
  #35  
Old 10-25-2009, 01:24 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 11,475
BMR777 is on a distinguished road
Default RE: MyBB intergration

Did you replace the existing one with that one? :)
Reply With Quote
  #36  
Old 10-25-2009, 01:47 PM
exdiogene exdiogene is offline
Member
 
Join Date: Oct 2009
Posts: 84
Credits: 8,486
exdiogene
Default RE: MyBB intergration

yes, then it gave php errors, causing me to reupload my adoptables script wich caused me all that hassle today with the DB lol XD
Reply With Quote
  #37  
Old 10-25-2009, 01:49 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,955
Arianna will become famous soon enough
Default RE: MyBB intergration

That's not good. :/
Reply With Quote
  #38  
Old 10-30-2009, 01:07 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,955
Arianna will become famous soon enough
Default RE: MyBB intergration

Have we forgotten about this? I'd still really like to implement this.
How about, in the mybb table, creating the columns:
Code:
uid (have they got something like this already?), email, usergroup, newmessagenotify, membersince, isbanned, website, profilepic, aim, yahoo, msn
And then what we do, is in mybb file member.php, in the action 'register' (on line 315 it starts with the 'register' action, ends at line 721), we change... I can't find where it actually INSERTS the thing into the table. Any help here?

The 1000+ lines in this php file are somewhat daunting.
Reply With Quote
  #39  
Old 02-23-2010, 01:43 AM
kamrinjacobs kamrinjacobs is offline
Member
 
Join Date: Feb 2010
Posts: 3
Credits: 529
kamrinjacobs
Default RE: MyBB intergration

Hello..
You say right that You can intergrate MyBB with Joomla using JFusion & it is also possible to combine PHPAdoptables with Joomla using JFusion.I have been tried to integrate mybb with joomla using jfusion It was integrate.thanks jfusion is best for integrate.
Reply With Quote
  #40  
Old 02-24-2010, 12:04 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,955
Arianna will become famous soon enough
Default RE: MyBB intergration

There is a mod for this in the premium members section.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Install MyBB Aasixx Tutorials and Tips 18 03-25-2016 05:59 PM
What does mybb intergration mean? Rovick Questions and Supports 3 06-18-2014 04:41 AM
Paypal ipn intergration? Skulldog Suggestions and Feature Requests 3 09-26-2010 10:26 PM
JOOMLA Intergration Seapyramid Mys v1.1.x Mods 32 07-24-2010 07:51 PM
Forum intergration, exdiogene Questions and Supports 6 10-08-2009 10:56 AM


All times are GMT -5. The time now is 06:58 AM.

Currently Active Users: 888 (0 members and 888 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636