Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Mys v1.1.x Mods (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=20)
-   -   JOOMLA Intergration (http://www.mysidiaadoptables.com/forum/showthread.php?t=1044)

Seapyramid 08-03-2009 05:18 PM

JOOMLA Intergration
 
Hey All,

This is a plugin for the JFusion Component made for Joomla. You must have a Joomla site and the JFusion component installed to use this mod. It will allow you to intergrate PHP Adoptables with Joomla for a single regsitration/login process. Then you can also use the JFusion to add such things as PHPBB3 or MyBB forums as well as other 3 party systems all into one.

[attachment=217]

Please refer to Joomla or Jfusion as help for these systems is not supplied here.

Sea

arlecchina 08-03-2009 05:31 PM

RE: JOOMLA Intergration
 
Thanks for doing this Sea!

Seapyramid 08-03-2009 05:40 PM

RE: JOOMLA Intergration
 
Quote:

Originally Posted by arlecchina
Thanks for doing this Sea!

Welcome :D

Sea

night807 08-04-2009 08:49 AM

RE: JOOMLA Intergration
 
Good job! But personally I dont like Joomla.

Seapyramid 08-04-2009 12:48 PM

RE: JOOMLA Intergration
 
Quote:

Originally Posted by night807
Good job! But personally I dont like Joomla.

Well then I guess you won't be using it. :) I like Joomla and have been using for a few sites I have. The ease of use, numerous components and mods make it simple to create totally different sites that suit the need of the site. The ability to mesh PHPAdoptables with Joomla was requested so that is why it is now offered. :)

Sea

Bloodrun 08-04-2009 06:26 PM

RE: JOOMLA Intergration
 
Nicely done Sea. I know for a fact this took alot of time and patients, lol. =D

BMR777 08-04-2009 06:41 PM

RE: JOOMLA Intergration
 
Thanks for posting this. :)

Blues 08-04-2009 10:29 PM

RE: JOOMLA Intergration
 
where do i have to upload it?

Seapyramid 08-05-2009 12:35 AM

RE: JOOMLA Intergration
 
You have to go to http://www.joomla.org/ ownload & then upload joomla.... then go to http://www.jfusion.org/index.php?option=com_jdownloads&Itemid=122&task=vi ewcategory&catid=1 download & install that & then install the plug in... unles you know joomla & are familuar with PHP i would not recomend this... Itt willl take alot of time & learning.

Blues 08-05-2009 04:26 AM

RE: JOOMLA Intergration
 
I know PHP! And can you tell me where i have to upload grove file?

Seapyramid 08-05-2009 09:41 AM

RE: JOOMLA Intergration
 
Quote:

Originally Posted by Blues
I know PHP! And can you tell me where i have to upload grove file?

As I said, you will have to go to Joomla, set up a Joomla website along with your PHP Adoptables site, then you will have to install the JFusion component for Joomla, then you can install the grove file as a plugin for the JFusion component.

Sea

Blues 08-05-2009 10:58 AM

RE: JOOMLA Intergration
 
Done. Can you explain the settings on grove plugins? My forum is on /public_html/adoptables/forum , my joomla is on /public_html/adoptables/joomla, and my adoptable site is on /public_html/adoptables
what should it fill on it?

Blues 08-06-2009 06:29 AM

RE: JOOMLA Intergration
 
Cookie Domain
Cookie Path
Cookie Expiration Time
Secure
HTTP Only
Over Ride
Leave Alone
Integration Type
Relative Path
Hidden
Buttons
Select what your users need to type in the Joomla login form to identify themselves.
Login Identifier
Login URL
Login Form ID
Input Username ID
Input Password ID
Logout URL

What should i put??

Seapyramid 08-06-2009 09:13 AM

RE: JOOMLA Intergration
 
As I stated in the first post. You will need to get support from JFusion Forum, support for Joomla and JFusion is not supplied here. There are too many variables based on host, server and such.

Sea

loglive 08-27-2009 10:39 AM

RE: JOOMLA Intergration
 
Way to go Sea, I have an idea about what you're saying that your work was requested... Now I've been away for a while, is the free downloadable latest adoptable script full or just a lite alternative of a premium paid version?

Seapyramid 08-27-2009 08:17 PM

RE: JOOMLA Intergration
 
The free version is the full script :) Without all my mods of course :D LOL

Sea

mimimi 09-04-2009 04:52 PM

RE: JOOMLA Intergration
 
This is excellent! I'm not a huge fan of Joomla, either, but there's a lot of possibilities with that CMS and it's available addons a person could use alongside the Adoptables script to make their community really dynamic. I will play with this. Great work!

jthm0138 09-12-2009 01:50 AM

RE: JOOMLA Intergration
 
Ok... So I have been using joomla for about 3 years now, and am relatively familiar with is operation.
I must admit I am new to jFusion, but have gotten PHPbb, vBulletin, and a few others set up correctly so far when playing around with it. However when I setup the grove plugin and try to sync users they all get the following error:

Code:

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 ('', 'username', 'passwordhash','email@url.com','3','1', '2009-09-11', '0','','','','','','0','0')</font>
Now I am semi familiar with PHP and SQL and I am pretty sure this error happens when you have too many or too few fields, but I could not find the error in the code.... any help? Please?

jthm0138 09-15-2009 09:44 PM

RE: JOOMLA Intergration
 
Ok.... Been playing with this more, as it is one of the last things I need to get working.
After examining the database, and the injection routine, I discovered there are an extra 2 injections on the routine. removing ",'0','0'" from the end of the string avoided the original error. I am not sure what they were trying to inject to. After that an error would be generated when logging into joomla that the password on column 'username0' could not be updated, as the field in adopts_user is 'username' again, here just remove the 0 from the end and that error will go away.

Now I all I am having an issue with is the dual user login, its not functioning, and I have to stop and ask at this point, 'Has anyone managed to get this jfusion plugin working?'

jthm0138 09-19-2009 08:56 AM

RE: JOOMLA Intergration
 
I guess I will take the fact noone has said anything as a sign that noone has gotten this to work at all, and I should just scrap this code and make my own.

Seapyramid 09-19-2009 07:45 PM

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

jthm0138 09-19-2009 09:53 PM

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.

Tequila 09-20-2009 07:37 AM

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.

Seapyramid 09-20-2009 10:52 AM

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

loglive 09-20-2009 09:27 PM

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


jthm0138 09-21-2009 02:24 PM

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.

jthm0138 09-23-2009 12:00 PM

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.

jthm0138 09-24-2009 01:25 AM

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

redheadturkey 03-06-2010 09:34 AM

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!

Seapyramid 03-08-2010 11:37 PM

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

redheadturkey 03-09-2010 01:50 PM

RE: JOOMLA Intergration
 
great!!

thanks a lot, I have used Joomla in the past and I am fairly good with it. I should be able to do this, and thanks for all your help! :)

Missy Master 03-09-2010 07:37 PM

RE: JOOMLA Intergration
 
I'll be using my other name here for most things from now on, Redheadturkey was the donator name, and I use this one for the site I am getting going! So I really want to be known under this, I think, since it's my main name for stuff related to all this.

Anyways, something I wanted to mention too about the whole bridging thing, in case others here want to try this when it is re posted, once you have it set up, you really have to be careful if you ever undo it -- or at least it was that way with my Joomla/Coppermine hybrid!

Just be sure you DO want to bridge.

For me, it was a great way to go, and I think this might work well with the Fusion to have the adopts, and possibly my SMF Forum as slaves to the Joomla base!

fadillzzz 07-24-2010 07:51 PM

RE: JOOMLA Intergration
 
anyone care to re-upload the attachment?


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.