Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Joomla Bridge Support => Topic started by: ilwoody on February 25, 2008, 07:57:30 AM

Title: I wrote my own bridge ..
Post by: ilwoody on February 25, 2008, 07:57:30 AM
Hi,

just wondering if I can help the community in a way that wouldnt break the licenses. In the past weeks I wrote my own bridge for joomla1.5 and smf 1.1.4 (Ill do for 2.x when its released) ; since the basically functionality I needed for my community where pretty easy to code (user sync, wrapped forum and modules) I think that I could share my experience without releasing the component/modules itself.
Lets say if I write a WIKI "how to write your own bridge" and put there the informations to code it (but no link to download anything).. would I break any license ? it wouldnt be different from a "tutorial" , is that possibile ? should I ask in the JOOMLA forum too ?

thanks in advance
Title: Re: I wrote my own bridge ..
Post by: H on February 25, 2008, 01:58:07 PM
As long as you are not providing the actual code I don't there should be any issue :)
Title: Re: I wrote my own bridge ..
Post by: dennyr123 on February 25, 2008, 05:15:03 PM
ok, so it's ok to  bridge the two, but illegal to distribute the software. So if someone paid someone else to develope a bridge is that illegal?  :o
Title: Re: I wrote my own bridge ..
Post by: JoeP on February 25, 2008, 06:11:59 PM
Quote from: ilwoody on February 25, 2008, 07:57:30 AM
Hi,

just wondering if I can help the community in a way that wouldnt break the licenses. In the past weeks I wrote my own bridge for joomla1.5 and smf 1.1.4 (Ill do for 2.x when its released) ; since the basically functionality I needed for my community where pretty easy to code (user sync, wrapped forum and modules) I think that I could share my experience without releasing the component/modules itself.
Lets say if I write a WIKI "how to write your own bridge" and put there the informations to code it (but no link to download anything).. would I break any license ? it wouldnt be different from a "tutorial" , is that possibile ? should I ask in the JOOMLA forum too ?

thanks in advance
When you say "wrapped" do you mean in an i-frame? 
I've been trying to decide whether or not to dive into development of a custom J!1.5 SMF component and some related modules.  I want to stay away from I frames.
I realize I couldn't distribute the code, but I really don't want to have to migrate my community over to another forum, and other than the license issue, I really like SMF!
Any advice would be appreciated.
joe
Title: Re: I wrote my own bridge ..
Post by: ilwoody on February 25, 2008, 08:03:04 PM
Quote from: JoeP on February 25, 2008, 06:11:59 PM
Quote from: ilwoody on February 25, 2008, 07:57:30 AM
Hi,

just wondering if I can help the community in a way that wouldnt break the licenses. In the past weeks I wrote my own bridge for joomla1.5 and smf 1.1.4 (Ill do for 2.x when its released) ; since the basically functionality I needed for my community where pretty easy to code (user sync, wrapped forum and modules) I think that I could share my experience without releasing the component/modules itself.
Lets say if I write a WIKI "how to write your own bridge" and put there the informations to code it (but no link to download anything).. would I break any license ? it wouldnt be different from a "tutorial" , is that possibile ? should I ask in the JOOMLA forum too ?

thanks in advance
When you say "wrapped" do you mean in an i-frame? 
I've been trying to decide whether or not to dive into development of a custom J!1.5 SMF component and some related modules.  I want to stay away from I frames.
I realize I couldn't distribute the code, but I really don't want to have to migrate my community over to another forum, and other than the license issue, I really like SMF!
Any advice would be appreciated.
joe

no I dont use iframe, my main bridge component grabs and rewrites the urls generated by including smf/index.php

The code looks something like

joomla component

ob_start();
require("../smf/index.php");
$buffer = ob_get_contents();
ob_end_clean();

$buffer = preg_replace(smf_url, joomla_url, $buffer);

echo $buffer;


the preg_replace will replace the urls in the form of

http://www.myhost.com/smf/index.php?

with

http://www.myhost.com/jooma/index.php?option=com_smf&

and more RE remove duplicate html/body tags and cleanup the output a little bit.
Of course its a little more complicated but not that much.. this code will fail just once "smf fatal_error" is called for whatever reason and it will make the output buffer chain to fail.
But there is a nice fix for it, if its ok for you to mod Sources/Subs.php too..

About the modules I found _very easy_ to wrap the SSI.php functions in joomla, this is almost what you need to get posts/topics/login/whois/etc in a module

joomla module

require_once('../smf/SSI.php');

ob_start();
switch($index)
{
case 0: ssi_login();
break;

case 1: ssi_topTopicsReplies();
break;

#and so on...
}

$buffer = ob_get_contents();
ob_end_clean();

#preg_replace the urls again..

echo $buffer;


For example, this is a dev site, where you can actually have a look

http://ilwoody.selfip.org/main15

Its not supposed to stay online much longer since Im working on it, but for the next hours it will be online.

The main idea comes from the great (and discontinued sigh) Orstio bridge but the "tutorial" I may write is based on a brand new implementation.

Title: Re: I wrote my own bridge ..
Post by: ilwoody on February 25, 2008, 08:14:54 PM
Quote from: H on February 25, 2008, 01:58:07 PM
As long as you are not providing the actual code I don't there should be any issue :)

cool :) I think it would be something like the previous post .. with more informations and details but not actual code to download.
Title: Re: I wrote my own bridge ..
Post by: AbBh on February 26, 2008, 07:02:28 AM
I didn't write my own bridge but I made edits to Oristo's bridge and got it working in Joomla 1.5. The license is quite complicated. As I understand it, using the bridge for personal use wont be illegal, telling people how to do so would be illegal but doing it for someone who hires me for it would be legal?
Title: Re: I wrote my own bridge ..
Post by: JoeP on February 26, 2008, 08:38:42 AM
Thank you so much ilwoody!  I am stoked (motivated)!
I think I'll try your approach combined with the approach described in the article given below to remove all the header and footer stuff.
I was also thinking that I'd have to use the smf api function calls inside an authentication and user plugin for J! in order to handle the registration, log in, log out and related functions.  Again, resulting in a functional but not distributable bridge.

http://www.simplemachines.org/community/index.php?topic=19638.0
joe
Title: Re: I wrote my own bridge ..
Post by: 青山 素子 on February 26, 2008, 09:59:33 PM
Quote from: dennyr123 on February 25, 2008, 05:15:03 PM
ok, so it's ok to  bridge the two, but illegal to distribute the software. So if someone paid someone else to develope a bridge is that illegal?  :o

If it is work-for-hire, no distribution takes place and the GPL license doesn't take effect. Of course, if they used the old SMF bridge and provide an updated copy to you where you didn't have it originally, it might run into issues.


Quote from: AbBh on February 26, 2008, 07:02:28 AMI didn't write my own bridge but I made edits to Oristo's bridge and got it working in Joomla 1.5. The license is quite complicated. As I understand it, using the bridge for personal use wont be illegal, telling people how to do so would be illegal but doing it for someone who hires me for it would be legal?

You could explain how to make the edits and that would be legal by the SMF license.

You could also be paid by someone to update the bridge and that wouldn't be a problem, but ONLY if the person hiring you had the old bridge to start with, I believe (otherwise you'd be distributing code).


Of course, the whole "work for hire" thing is a bit tricky. If you want to be safe, consult a lawyer.
Title: Re: I wrote my own bridge ..
Post by: JoeP on February 27, 2008, 08:37:30 AM
ilwoody,
Is the edit to subs.php you mention just commenting out 'exit;'?
thanks,
joe

Quote from: ilwoody on February 25, 2008, 08:03:04 PM
Quote from: JoeP on February 25, 2008, 06:11:59 PM
Quote from: ilwoody on February 25, 2008, 07:57:30 AM
Hi,

just wondering if I can help the community in a way that wouldnt break the licenses. In the past weeks I wrote my own bridge for joomla1.5 and smf 1.1.4 (Ill do for 2.x when its released) ; since the basically functionality I needed for my community where pretty easy to code (user sync, wrapped forum and modules) I think that I could share my experience without releasing the component/modules itself.
Lets say if I write a WIKI "how to write your own bridge" and put there the informations to code it (but no link to download anything).. would I break any license ? it wouldnt be different from a "tutorial" , is that possibile ? should I ask in the JOOMLA forum too ?

thanks in advance
When you say "wrapped" do you mean in an i-frame? 
I've been trying to decide whether or not to dive into development of a custom J!1.5 SMF component and some related modules.  I want to stay away from I frames.
I realize I couldn't distribute the code, but I really don't want to have to migrate my community over to another forum, and other than the license issue, I really like SMF!
Any advice would be appreciated.
joe

no I dont use iframe, my main bridge component grabs and rewrites the urls generated by including smf/index.php

The code looks something like

joomla component

ob_start();
require("../smf/index.php");
$buffer = ob_get_contents();
ob_end_clean();

$buffer = preg_replace(smf_url, joomla_url, $buffer);

echo $buffer;


the preg_replace will replace the urls in the form of

http://www.myhost.com/smf/index.php?

with

http://www.myhost.com/jooma/index.php?option=com_smf&

and more RE remove duplicate html/body tags and cleanup the output a little bit.
Of course its a little more complicated but not that much.. this code will fail just once "smf fatal_error" is called for whatever reason and it will make the output buffer chain to fail.
But there is a nice fix for it, if its ok for you to mod Sources/Subs.php too..

About the modules I found _very easy_ to wrap the SSI.php functions in joomla, this is almost what you need to get posts/topics/login/whois/etc in a module

joomla module

require_once('../smf/SSI.php');

ob_start();
switch($index)
{
case 0: ssi_login();
break;

case 1: ssi_topTopicsReplies();
break;

#and so on...
}

$buffer = ob_get_contents();
ob_end_clean();

#preg_replace the urls again..

echo $buffer;


For example, this is a dev site, where you can actually have a look

http://ilwoody.selfip.org/main15

Its not supposed to stay online much longer since Im working on it, but for the next hours it will be online.

The main idea comes from the great (and discontinued sigh) Orstio bridge but the "tutorial" I may write is based on a brand new implementation.


Title: Re: I wrote my own bridge ..
Post by: dennyr123 on February 27, 2008, 12:57:25 PM
Quote from: AbBh on February 26, 2008, 07:02:28 AM
I didn't write my own bridge but I made edits to Oristo's bridge and got it working in Joomla 1.5. The license is quite complicated. As I understand it, using the bridge for personal use wont be illegal, telling people how to do so would be illegal but doing it for someone who hires me for it would be legal?
LOL I'll pay 50 cents for the how to  :) (of course you'd only accept 50 cents if your attitude was just about "sticking it to the man")  Other than that I think vbulletin has its own working bridge and a working mod for wow itemstats using wowhead. Of course vbulletin is not free and it's a little pricey in my opinion, and SMF is just as powerful and runs just as if not better. As a convenience factor a bridge would be nice, but not necessary there are other things more important - as in - working code, and mods that work correctly and are well maintained. Over all SMF is the best option and the bridge idea is just a convenience. A convenience I'd like to have no doubt, but still a convenience.
Title: Re: I wrote my own bridge ..
Post by: ilwoody on February 28, 2008, 08:07:17 PM
atm I throw an exception .. and I catch it on my joomla component

Quote from: JoeP on February 27, 2008, 08:37:30 AM
ilwoody,
Is the edit to subs.php you mention just commenting out 'exit;'?
thanks,
joe
Title: Re: I wrote my own bridge ..
Post by: Apllicmz on March 03, 2008, 03:36:01 AM
Can tell me step by step how can do that bridge
Title: Re: I wrote my own bridge ..
Post by: ilwoody on March 05, 2008, 05:49:26 AM
Quote from: joomlamz on March 03, 2008, 03:36:01 AM
Can tell me step by step how can do that bridge


I need a little more time, I'll start writing the wiki pages by the end of next week, at the moment Im busy testing it on a real scenario ( http://ilwoody.selfip.org/main15 ). Of course, I repeat, it wont be a generic bridge, it will be what I need for my community.

So far the features are:

1- smf 1.1.4 wrapped in joomla 1.5 not inside an iframe, smf urls are rewrited to point to joomla.
2- automatic html headers tidyup to keep the css/xhtml validation (if possible).
3- users syncronization (but no groups syncronization). The smf users are created in joomla at the moment of login. SMF passwords are not properly copied in joomla, so you wont be able to login in joomla through the standar `mod_login` form. You need the proper login module (see below) because SMF is the main entry point.
4- email/username profile sync.
5- SSI single module wrapper to get everything you can get from SSI inside a module (login, logout,whois, recent topics/messages/events and so on)
6- login/out will login/out on both joomla/smf at the same time.
7- joomla/smf db can be on the same host/database or separated. Of course smf/joomla sources must be on the same server.
8- a short guide to properly convert your smf db from latin1 to utf8.

as you can note many important features are out like SEF support, groups sync, mod_login login, unwrapped foum.

Title: Re: I wrote my own bridge ..
Post by: baijianpeng on March 06, 2008, 07:09:42 PM
Hope the author will publish the whole story of how to  write your own bridge, I am looking for a new bridge to integrate Joomla! 1.5.x and SMF.

Thanks.
Title: Re: I wrote my own bridge ..
Post by: baijianpeng on May 24, 2008, 03:24:14 AM
hi, ilwoody ,

Have you finished the bridge ? Can I have a taste of this new component? Maybe I can test it and give you some feedback to improve it.  :-)

Thank you very much !
Title: Re: I wrote my own bridge ..
Post by: MPT. on June 03, 2008, 04:47:49 AM
I need it too, thank you!
Title: Re: I wrote my own bridge ..
Post by: H on June 03, 2008, 03:34:38 PM
Orstio mentioned that this (http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,4472/Itemid,35/) bridge was ok although I don't know if it is what you're looking for. Requires MySQLi which maybe an issue. Please remember we do not provide support for this here! :)
Title: Re: I wrote my own bridge ..
Post by: Orstio on June 03, 2008, 06:47:12 PM
Quote from: H on June 03, 2008, 03:34:38 PM
Orstio mentioned that this (http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,4472/Itemid,35/) bridge was ok although I don't know if it is what you're looking for. Requires MySQLi which maybe an issue. Please remember we do not provide support for this here! :)

Woah!  Let's clarify this.  I said that the code looks clean, but the licensing environment is precarious.  What I said was in no way an endorsement of that bridge.
Title: Re: I wrote my own bridge ..
Post by: ilwoody on June 05, 2008, 12:06:07 PM
Quote from: baijianpeng on May 24, 2008, 03:24:14 AM
hi, ilwoody ,

Have you finished the bridge ? Can I have a taste of this new component? Maybe I can test it and give you some feedback to improve it.  :-)

Thank you very much !

Just released the first public version, its under development and it may cause problems .. test at your own risk.

http://code.google.com/p/sjsb/

:)
Title: Re: I wrote my own bridge ..
Post by: H on June 05, 2008, 12:22:16 PM
QuoteI said that the code looks clean, but the licensing environment is precarious.

Sorry. I meant ok feature / code wise rather than legally :)
Title: Re: I wrote my own bridge ..
Post by: Orstio on June 05, 2008, 07:15:52 PM
Nice code.  It should be noted that the exception will only work in PHP 5. ;)
Title: Re: I wrote my own bridge ..
Post by: baijianpeng on June 05, 2008, 09:08:19 PM
Great !

I will test this bridge as soon as possible and give you my feedback and suggestions.

Thank you very much,  ilwoody !
Title: Re: I wrote my own bridge ..
Post by: MPT. on June 09, 2008, 01:31:53 PM
I'll test it.
Title: Re: I wrote my own bridge ..
Post by: klra on July 03, 2008, 07:10:08 AM
Status on this bridge?

Thanks-
Title: Re: I wrote my own bridge ..
Post by: baijianpeng on July 03, 2008, 07:28:22 AM
hi, klra , you can download this bridge at http://code.google.com/p/sjsb/downloads/list (http://code.google.com/p/sjsb/downloads/list) and test it.

And please post feedback for this bridge at : http://groups.google.com/group/sjsb (http://groups.google.com/group/sjsb)
Title: Re: I wrote my own bridge ..
Post by: ilwoody on July 03, 2008, 01:54:21 PM
Quote from: klra on July 03, 2008, 07:10:08 AM
Status on this bridge?

Thanks-

talking in "versions way", its still in alpha
Title: Re: I wrote my own bridge ..
Post by: klra on July 04, 2008, 02:19:36 PM
I am very interested in this, as I really need to bridge 1.1.15 with Joomla CB -

Is the alpha release still being devoloped?
Title: Re: I wrote my own bridge ..
Post by: ilwoody on July 06, 2008, 06:45:27 AM
Quote from: klra on July 04, 2008, 02:19:36 PM
I am very interested in this, as I really need to bridge 1.1.15 with Joomla CB -

Is the alpha release still being devoloped?

yes, working on it few days a week at the moment. Last month I tested SJSB 1.0.4 with SMF 1.1.14 and it was working fine (of course with all the limits of the bridge), but I stopped working on compatibility with 1.1.x when SMF 2.0 Beta was released, so do not expect any more work on that direction. Also, at the moment there is no plan to make it compatible with CB ; for this kind of complex and multiple integrations you should look at JFusion (http://www.jfusion.org/) which is a lot more ambitious then SJSB (where S means SIMPLE) :)

Title: Re: I wrote my own bridge ..
Post by: MalstroM on July 10, 2008, 01:27:44 PM
Can i test this bridge code with SMF 1.1.5 and Joomla 1.0.15 without CB ?
Title: Re: I wrote my own bridge ..
Post by: ilwoody on July 11, 2008, 11:44:28 AM
Quote from: MalstroM on July 10, 2008, 01:27:44 PM
Can i test this bridge code with SMF 1.1.5 and Joomla 1.0.15 without CB ?

sure! and please don't forget to share your results on the support forum (see my sign)

thanks!
Title: Re: I wrote my own bridge ..
Post by: Apllicmz on July 24, 2008, 01:23:58 AM
hello
i install joomla 1.5.4...
i try to install that file to bridge to smf 2.0 b1 i see that error

failed to open stream: No such file or directory in /home/apllic/public_html/joomlasmf/libraries/joomla/filesystem/file.php on line 240

see that picture

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi276.photobucket.com%2Falbums%2Fkk39%2Fapllic%2Fsshot-6-4.png&hash=1b9ed951f8e2570b21dbbdcfcc2b29580d0a3e31)
Title: Re: I wrote my own bridge ..
Post by: 青山 素子 on July 24, 2008, 02:58:42 AM
I suggest discussing that issue on the proper support area for the tool. It's at http://groups.google.com/group/sjsb
Title: Re: I wrote my own bridge ..
Post by: Apllicmz on July 24, 2008, 02:53:29 PM
thank i will try to puty there
Title: Re: I wrote my own bridge ..
Post by: NeLLIsania on September 04, 2008, 09:40:01 PM
how about integrate Joomla 1.0.15 + CB 1.1.0 and SMF 2.0 b3 ? or this bridge only for J 1.5 ?
Title: Re: I wrote my own bridge ..
Post by: 青山 素子 on September 04, 2008, 11:53:44 PM
It isn't our program, we don't know how it works, we can't support it. Try asking in the correct place for that tool.