News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

I wrote my own bridge ..

Started by ilwoody, February 25, 2008, 07:57:30 AM

Previous topic - Next topic

ilwoody

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
Simple Joomla! 1.5.x / SMF 2.x bridge - ver 1.0.14 alpha 26/03/2009
http://code.google.com/p/sjsb/
--
Support: http://groups.google.com/group/sjsb
Bugs:  http://code.google.com/p/sjsb/issues/list
Live: http://www.youpokeme.com/sjsb/

H

As long as you are not providing the actual code I don't there should be any issue :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

dennyr123

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

JoeP

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

ilwoody

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.

Simple Joomla! 1.5.x / SMF 2.x bridge - ver 1.0.14 alpha 26/03/2009
http://code.google.com/p/sjsb/
--
Support: http://groups.google.com/group/sjsb
Bugs:  http://code.google.com/p/sjsb/issues/list
Live: http://www.youpokeme.com/sjsb/

ilwoody

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.
Simple Joomla! 1.5.x / SMF 2.x bridge - ver 1.0.14 alpha 26/03/2009
http://code.google.com/p/sjsb/
--
Support: http://groups.google.com/group/sjsb
Bugs:  http://code.google.com/p/sjsb/issues/list
Live: http://www.youpokeme.com/sjsb/

AbBh

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?
hxxp:www.simplycricket.net [nonactive]

JoeP

#7
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

青山 素子

#8
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.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


JoeP

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.



dennyr123

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.

ilwoody

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
Simple Joomla! 1.5.x / SMF 2.x bridge - ver 1.0.14 alpha 26/03/2009
http://code.google.com/p/sjsb/
--
Support: http://groups.google.com/group/sjsb
Bugs:  http://code.google.com/p/sjsb/issues/list
Live: http://www.youpokeme.com/sjsb/

Apllicmz

Can tell me step by step how can do that bridge



ilwoody

#13
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.

Simple Joomla! 1.5.x / SMF 2.x bridge - ver 1.0.14 alpha 26/03/2009
http://code.google.com/p/sjsb/
--
Support: http://groups.google.com/group/sjsb
Bugs:  http://code.google.com/p/sjsb/issues/list
Live: http://www.youpokeme.com/sjsb/

baijianpeng

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.
JoomlaGate: The way to the World of Joomla!

http://www.joomlagate.com

baijianpeng

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 !
JoomlaGate: The way to the World of Joomla!

http://www.joomlagate.com

MPT.


H

Orstio mentioned that this 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! :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Orstio

Quote from: H on June 03, 2008, 03:34:38 PM
Orstio mentioned that this 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.

ilwoody

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/

:)
Simple Joomla! 1.5.x / SMF 2.x bridge - ver 1.0.14 alpha 26/03/2009
http://code.google.com/p/sjsb/
--
Support: http://groups.google.com/group/sjsb
Bugs:  http://code.google.com/p/sjsb/issues/list
Live: http://www.youpokeme.com/sjsb/

Advertisement: