Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.1.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 09-19-2009, 07:45 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,571
Seapyramid
Default RE: JOOMLA Intergration

The code is working & fully functional on the http://mysticgrove.net site However it was designed to use with that site & it has had MANY mods to the orginal PHPAdoptables sprict. That is probally the reason for the errors you were finding. The script does work & works well but needs to be set for YOUR site.

The reason for my lack of response was NOT because it doesn't work! It was because I recently miscarried twins and have been grieving & healing! RL does happen!!!

Sea
Reply With Quote
  #22  
Old 09-19-2009, 09:53 PM
jthm0138 jthm0138 is offline
Member
 
Join Date: Jun 2009
Posts: 11
Credits: 330
jthm0138
Default RE: JOOMLA Intergration

My statement was not intended to be an attack at you in any way, and I am well aware of the fact that the script works (and works well) on your site. My question as to if anyone else has managed to get it working was to determine if .... well... anyone other than you has managed to get a functional bridge out of this script. I am pretty sure the answer to that is going to be no.

It appears that you have custom database fields to start with (I have fixed this I think), some custom cookie settings, and possibly even some custom encryption routines. As the user tables for your script, and the user tables that everyone else has do not match this script is all but worthless to the community. However there is some light at the end of the tunnel. The fix I mentioned before will correct the table injection errors. There is still a conflict registered on usersync however, and I am not sure what is causing the new one, as no data on the error is given now.

That being said the users do pass to the adoptables database, but the dual login is not functioning. This could be caused by custom encryption on your script (something that I am not going to be able to fix) or it could be caused by custom cookie setting in your script, if so I have yet to find the right cookie settings.

As for real life, I am truly sorry for your loss.
Reply With Quote
  #23  
Old 09-20-2009, 07:37 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,228
Tequila is on a distinguished road
Default RE: JOOMLA Intergration

Quote:
Originally Posted by Seapyramid
The code is working & fully functional on the http://mysticgrove.net site However it was designed to use with that site & it has had MANY mods to the orginal PHPAdoptables sprict. That is probally the reason for the errors you were finding. The script does work & works well but needs to be set for YOUR site.

The reason for my lack of response was NOT because it doesn't work! It was because I recently miscarried twins and have been grieving & healing! RL does happen!!!

Sea
*hug* My condolences and love go out to help you heal.
Reply With Quote
  #24  
Old 09-20-2009, 10:52 AM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,571
Seapyramid
Default RE: JOOMLA Intergration

Thank you :)

Sea[hr]
Quote:
Originally Posted by jthm0138
My statement was not intended to be an attack at you in any way, and I am well aware of the fact that the script works (and works well) on your site. My question as to if anyone else has managed to get it working was to determine if .... well... anyone other than you has managed to get a functional bridge out of this script. I am pretty sure the answer to that is going to be no.

It appears that you have custom database fields to start with (I have fixed this I think), some custom cookie settings, and possibly even some custom encryption routines. As the user tables for your script, and the user tables that everyone else has do not match this script is all but worthless to the community. However there is some light at the end of the tunnel. The fix I mentioned before will correct the table injection errors. There is still a conflict registered on usersync however, and I am not sure what is causing the new one, as no data on the error is given now.

That being said the users do pass to the adoptables database, but the dual login is not functioning. This could be caused by custom encryption on your script (something that I am not going to be able to fix) or it could be caused by custom cookie setting in your script, if so I have yet to find the right cookie settings.

As for real life, I am truly sorry for your loss.
Thank you.

As for the cookie settings, I have found them to be very touchy and server specific. I have the Jfusion Bridge installed on 2 different sites for the PHPBB3 Forum and could not use the same cookie settings on both.

The plugin above was working, but the one thing that bothered me on it is that when you tried to use the JFusion module to see how many people were on line & such it would always show the PHPAdoptables as empty because of the session cookies. This was fixed by adding

PHP Code:
  include("config.php");
  
  
$sess_life 18000;
  
  
  
  
//Connect to the database first
  
  
connect();

 
// ***********************
 // Connect
 // ***********************
 
 
  
  
  //This function simply connects us to the database and is the session open function
  
  
function connect()
  {
      include(
"config.php");
      
      
$conn mysql_connect($dbhost$dbuser$dbpass) or die('Error connecting to MySQL');      
      
mysql_select_db($dbname) or die('Cannot select database');
      
      return 
true;
  }
  
  
  
  
//This function simply disconnects us from the database and is the session close function
  
  
function disconnect()
  {
      include(
"config.php");
      
      
mysql_close();
      
      return 
true;
  }
  
  
  
  
//This function retrieves session values from the database
  
  
function sess_read($sessid)
  {
      include(
"config.php");
      
      
      
      
$sql "SELECT `values` FROM " $prefix "sessions WHERE sid = '$sessid' AND expire>=" time();      
      
$query mysql_query($sql) or die(mysql_error());
      
      if (list(
$value) = mysql_fetch_row($query)) {
          
$expire time() + $sess_life;
          
          
$usql "UPDATE " $prefix "sessions SET expire = $expire WHERE sid = '$sessid'";          
          
$uquery mysql_query($usql) or die(mysql_error());
          
          return 
$value;
      }
      
      return 
"";
  }

  
  
//This function stores session values into the database
  
  
function sess_write($sessid$values)
  {
      include(
"config.php");
      
      
$expire time() + $sess_life;     
      
$value addslashes($values);
      
      
$uidc $cprefix "u";      
      
$uid $_COOKIE[$uidc];
      
      if (
$uid) {
          
$usql "SELECT username FROM " $prefix "users WHERE uid='$uid'";
          
          
$username mysql_query($usql) or die(mysql_error());
      } else {
          
$username "";
      }
      
      
$sql "INSERT INTO " $prefix "sessions VALUES ('$sessid', '$username', $expire, '$value') ON DUPLICATE KEY UPDATE `expire`='$expire', `values`='$value'";     
      
$query mysql_query($sql) or die(mysql_error());
      
      return 
$qid;
  }
  

  
//This function deletes a session from the database
  
  
function sess_destroy($sessid)
  {
      include(
"config.php");
      
      
$qry "DELETE FROM " $prefix "sessions WHERE sid = '$sessid'";     
      
$qid mysql_query($qry) or die(mysql_error());
      
      return 
$qid;
  }

  
//This function is session garbage collection
  
  
function sess_gc($maxlifetime)
  {
      include(
"config.php");
      
      
$qry "DELETE FROM " $prefix "sessions WHERE expire < " time();      
      
$qid mysql_query($qry) or die(mysql_error());
      
      return 
mysql_affected_rows();
  }

  
// This registers the above functions as the handlers for the various operations on session data.
  
  
session_set_save_handler("connect""disconnect""sess_read""sess_write""sess_destroy""sess_gc");

  
//As this file is included in all others, begin the session with no caching.
  
  
session_cache_limiter('nocache');
  
$name $cprefix "sid";
  
  
session_name($name); 
  
session_start(); 
to the beginning of the functions file & then making these changes
PHP Code:
     //Function to determine if user is logged in.
   
      //Set up our login info...      
      
$username "";
      
      
//$password = "";      
      
$cname $cprefix "u";
      
      
//Check for cookie
      
      
if (isset($_COOKIE[$cname])) {
          
$userid $_COOKIE[$cname];
          
          
//$username = $_COOKIE['auser'];          
          //$password = $_COOKIE['apass'];

          //$username = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $username);          
          //$username = secure($username);         
          //$password = secure($password);
 
          //Run login operation          
          //$query = "SELECT * FROM ".$prefix."users WHERE username = '$username'";
          
          
$query "SELECT username FROM " $prefix "users WHERE uid = '$userid'";          
          
$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){
          
          
if ($num 0) {
              
$isloggedin "yes";
              
              
$username mysql_result($result00);
          }
          
          else {
              
              
              
//if (isset($_COOKIE['auser'])){              
              //$past = time() - 10;               
              //setcookie("auser",$username,$past);              
              //}              
              //              
              //if (isset($_COOKIE['apass'])){              
              //$past = time() - 10; 
              //setcookie("apass",$password,$past);
              
              //}
              
              
$isloggedin "no";
          }
      }
      
      else {
          
//User is not logged in
          
          
$isloggedin "no";
      }

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

      return 
$userdata;
  } 
I hope that helps to lead you in the right direction.

Sea
Reply With Quote
  #25  
Old 09-20-2009, 09:27 PM
loglive loglive is offline
Member
 
Join Date: Sep 2008
Posts: 9
Credits: 1,990
loglive
Arrow RE: JOOMLA Intergration

I'm sorry for what happened to you Sea and yes, life's not fair...
I noticed on jfusion forum the time you spent to help us and I really appreciate your efforts.
Now, I am going through the same error when trying to import the users from the master joomla to the slave php adoptables.
I installed phpbb3 as slave for testing purposes and got that working after changing some settings.
Looks like the plugin is in full development so unless someone wants me to try, I won't alter anything. Sea, if you want to take a look at my new installations, let me know. I'll put this project on hold for now, since it's not really working. Even if I get over the initial setup and get the joomla users to log into adoptables, I won't be able to fix the other issues you mentioned as I'm not that good with php scripting. I'm not sure I configured the jfussion grove plugin correctly, especially the curl part of it. If you think you could help, that would be greatly appreciated.

My joomla, adoptables, forum
Code:
Detailed JFusion Error Report
User from Plugin  
joomla_int  


User Info from Usersync List 
username ikonyk 
email my@email.com


User Info from getUser() function 
userid 66 
activation "" 
username ikonyk 
name ikonyk 
password f169f2af41ec9......db9d6102af 
email my@email.com 
block 0 
group_name Registered 
group_id 18 
params " " 
password_salt ITNE............y1MMDN 
language en-GB 



User target Plugin  
grove  



Error Info from updateUser() function 
0 Error while creating the userDB function failed with error number 1136<br /><font color="red">Column count doesn't match value count at row 1 SQL=INSERT INTO adopts_users VALUES ('', 'ikonyk', 'f169f2a.........d46db9d6102af','my@email.com','3','1', '2009-09-21', '0','','','','','','0','0')</font> 



Debug Info from updateUser() function 
0 No user with that identifier has been found. Creating a new user. 



User Info from updateUser() function  
null
Reply With Quote
  #26  
Old 09-21-2009, 02:24 PM
jthm0138 jthm0138 is offline
Member
 
Join Date: Jun 2009
Posts: 11
Credits: 330
jthm0138
Default RE: JOOMLA Intergration

That error is generated due to two extra fields in sea's database.
A fix for that issue is a few posts back.
Right now its the cookie that is causing issues, and I am totally lost at the moment, more information as soon as I have it.
Reply With Quote
  #27  
Old 09-23-2009, 12:00 PM
jthm0138 jthm0138 is offline
Member
 
Join Date: Jun 2009
Posts: 11
Credits: 330
jthm0138
Default RE: JOOMLA Intergration

Ok.. I have been playing around with this more, and have gone over every line of code in the grove bridge. Now I have a few correction, and a few questions.

The questions first....
As there are no descriptions defined in the Admin Panel, The XML for the admin panel, nor the code itself, there are a few fields that I am unsure of. The first being "Over Ride" -> "login[indirect]=no" the next being "Leave Alone" -> "GROVEID_=>" and the last being "Integration Type" -> "1". Anyone have any idea what these fields do (or could you spread some light for us Sea? pretty please :-) )

On to the code :-) in public.php
Code:
<?php

/**
* @package JFusion_Moodle
* @author JFusion development team
* @copyright Copyright (C) 2008 JFusion. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC' ) or die('Restricted access' );
/**
 * JFusion Public Class for Moodle 1.8+
 * For detailed descriptions on these functions please check the model.abstractpublic.php
 * @package JFusion_Moodle
 */
class JFusionPublic_grove extends JFusionPublic{
    function getJname(){
        return 'grove';
    }
    function getRegistrationURL(){
        return 'grove/register.php';
    }
    function getLostPasswordURL(){
        return 'grove/account.php?act=changepass';
    }
    function getLostUsernameURL(){
        return 'grove/account.php?act=changepass';
    }
}

?>
Unless you happened to install the PHP Adoptables Script into a sub-directory named "grove" this code will not work correctly and will return some errors. I am sure there is a way to change that to a variable, but I have been awake for about 4 days trying to get my site finished, and I am not processing information correctly anymore. The simple fix for now is to manually redirect those returns to the proper sub-directory until I can remember the correct variable syntax, or someone else posts it.
Reply With Quote
  #28  
Old 09-24-2009, 01:25 AM
jthm0138 jthm0138 is offline
Member
 
Join Date: Jun 2009
Posts: 11
Credits: 330
jthm0138
Default RE: JOOMLA Intergration

3 people and 20 hours later we have rewritten the plugin from the ground up and it now works.
However due to the nature of the bridge it will have to be custom tailored to every install. I am willing to do this for $50 USD. If anyone would like this done send me an email at contact at trinityintrigue.com
Reply With Quote
  #29  
Old 03-06-2010, 09:34 AM
redheadturkey redheadturkey is offline
Senior Member
 
Join Date: Jan 2010
Posts: 136
Gender: Female
Credits: 10,201
redheadturkey is on a distinguished road
Default RE: JOOMLA Intergration

I'd love to get this to work for Joomla -- I've used that before and just love it, but after reading all this I am totally lost as to whether to even try it or not. I don't want to mess up what I have, but integration with Joomla would be wonderful!!

I just have Joomla installed on a sub directory called Base, and the Adoptables is on the root --- maybe I can try to get this to work, could we possibly have that Grove file re- uploaded again?

Thanks!
Reply With Quote
  #30  
Old 03-08-2010, 11:37 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,571
Seapyramid
Default RE: JOOMLA Intergration

Joomla has to be installed at the root.. adoptables would be a slave. JFusion is needed. I will zip the files & reupload them but I offer NO assistance. After you have the files you will need to go to Joomla & JFusion for techs. I will re-upload tomarrow sometime.

Sea
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
What does mybb intergration mean? Rovick Questions and Supports 3 06-18-2014 04:41 AM
MyBB intergration exdiogene Suggestions and Feature Requests 49 01-04-2011 11:55 AM
Paypal ipn intergration? Skulldog Suggestions and Feature Requests 3 09-26-2010 10:26 PM
Forum intergration, exdiogene Questions and Supports 6 10-08-2009 10:56 AM
Phpadoptables and Joomla integration loglive Suggestions and Feature Requests 13 07-13-2009 10:05 PM


All times are GMT -5. The time now is 04:56 AM.

Currently Active Users: 9716 (0 members and 9716 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