Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Mambo Bridge Support => Topic started by: skydig on July 17, 2006, 03:06:59 PM

Title: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: skydig on July 17, 2006, 03:06:59 PM
I tried to install the SMF Discussbot discussed here :
http://www.simplemachines.org/community/index.php?topic=58578.0 (http://www.simplemachines.org/community/index.php?topic=58578.0)

but was unable to make it work.

So I decided to try to modify the code and you can download my mod at the end of this post.

It runs under Joomla 1.0.10 with SEO off (not tested with SEO on).

Be careful ! For forum languages others than English (using special characters), you have to edit the forum section names directly inside of your SMF database (with phpmyadmin) and replace the special characters by the corresponding html entity code (since SMF does not convert them itself). If you do not, the discussbot will not be able to find your forum sections.

Please leave any comment !

[Removed, because I am rude]
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Kindred on July 17, 2006, 03:39:29 PM
Skydig...

It is extremely impolite to distribute a modified version of someone else's code without first getting permission from the original author.

indicating which lines to be changed is generally acceptable, as is sending your modifications to the author...   but posting a message that essentially says "use my version, not his" is rude.
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: skydig on July 17, 2006, 03:54:46 PM
Does "Open Source" say something to you ?
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Kindred on July 17, 2006, 04:49:42 PM
neither SMF nor the bridge is actually Open Source please re-read your license agreement.

And even with Open Source, it is STILL polite to get permission before "releasing" a fileset that is just a modified version of someone else's work
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: skydig on July 17, 2006, 05:09:43 PM
I did not modify any of SMF nor the bridge, I modified the discussbot which is obviously "open source", as stated in the file header. For your information, the discussbot is a Joomla! mambot.

I agree that it is kind to inform the author of the software of the modifications, which I will do as soon as possible, if the users give me positive feedback about the modifications (I don't know if the modified version will work on other systems).

My point here was to share rapidly a "maybe" solution with, what seems to be, a lot of users trying to use the mambot with the latest release of Joomla.

Finally, I would have appreciated that you get more aware of the situation before blaming me of modifying an open source project.  ::)
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Kindred on July 17, 2006, 05:12:28 PM
Skydig...

What I originally said was:
Quote
It is extremely impolite to distribute a modified version of someone else's code without first getting permission from the original author.

Which is true of ANY software... as you seem to agree... and yet you are doing just that.
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: skydig on July 17, 2006, 05:22:56 PM
I do not agree to get permission first to modify and/or distribute an open source file since this authorization is already granted by the GNU/GPL terms which you can read here if you don't know them :

http://www.gnu.org/copyleft/gpl.html (http://www.gnu.org/copyleft/gpl.html)

If you find it impolite, this is you, but then request for a change in the GNU/GPL terms...
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Kindred on July 17, 2006, 05:36:43 PM
oh please!   I did not say anything about being illegal.  I said it was IMPOLITE...    which it is. being polite has very little to do with legalese...


(just FYI: while it does not apply in this case, be aware that making a module or component for mambo/joomla does not automatically make it Open Source, there are plenty of modules that are not anything of the sort. Also be aware that the "openness" of a source may be changed at any time with a new release. Just because v4.1 is open source, does not automatically make v4.2 the same)
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Orstio on July 17, 2006, 05:53:16 PM
I'm sure if you contact Chadness, he wouldn't have any problem with it.

The discussbot has definitely been around the block already:  It was something I modified from Two Shoes Mambo Factory's discussbot for SimpleBoard, (which I did contact them about, but never received a reply), and then was modified by two or three others before Chadness started on it.

Chadness's 4.1 bot hardly even looks like the original discussbot from which it originated.

Chadness is currently a moderator at http://forum.joomla.org .  I'm not certain he still has the time required to continue to update the bot.
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Kindred on July 17, 2006, 06:02:43 PM
which was my original point...

I don't think Chadness would care that you modify it...   but it is usually polite to check with the author before going around and re-distributing the modified version.   Which is all that I said, in the first place...

Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Benson on July 18, 2006, 03:44:22 AM
Umh the discussbot is distributed under the GNU/GPL licence, so if you modify and redistribute it, you only have to make sure you're still distributing it under the GPL - i don't get why skydig is now blamed for not asking permission... at least skydig is doing something for the community, while the original bot wasn't updated since a long time even it was said again and again that it isn't working. All you can ask him to do is to contact the developer, maybe he's interested in integrating your code.
:-\

I will have a look at the code to see what was changed and test it - anyways thanks for your work!

cheers,
Benson
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: ckacey on July 18, 2006, 11:41:38 AM
Quote from: skydig on July 17, 2006, 03:06:59 PM
[Removed, because I am rude]
I'd like to give it a try
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: chr!x on July 18, 2006, 06:20:34 PM
So skydig, could you explain what you modify to make it running  ???
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: skydig on July 18, 2006, 06:22:30 PM
Here is the link again :

http://skydig.free.fr/smf.discussbot.4.1mod.by.skydig.zip (http://skydig.free.fr/smf.discussbot.4.1mod.by.skydig.zip)

I just edited the following lines:

line #32
require_once ($smf_path."/SSI.php");

to:
// Get the configuration.  This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
");
$variables = $database->loadAssocList();

foreach ($variables as $variable){
$variable_name = $variable['variable'];
$$variable_name = $variable['value1'];
}

if (!defined('SMF'))
{
require($smf_path . '/SSI.php');
}


This modification corrects the "SSI.php not found" problem when loading joomla's frontpage.

lines #42, 160 and 162
($mosConfig_sef ? "" : $mosConfig_live_site."/").sefRelToAbs

to:
sefRelToAbs

This modification prevents the "http://www.yoursite.url/" from being prepended to the well formed link (which ended up in a 404 not found error when trying to click on the "discuss" link).
Again, this modification may not work on other systems or with SEO turned on, as I only tested it on my website.

Thanks for you comments !

I would be glad if my mod worked to send it to the author so that he can include it in an official release (this is the way I see it : the author is the only one who can approve my modifications, since he knows his code more than I do...)
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: chr!x on July 18, 2006, 06:36:51 PM
Great Job man !  ;D

It's correct all errors !

PS : I'm running Joomla FR 1.0.10 + Bridge SMF Ortisio 1.1.5 + SMF 1.1 RC2 + SMF DiscussBot 4.1 final
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: iqapps on July 19, 2006, 07:11:13 AM
Hi

Working like charm.... ;D

Regards
IQAPPS
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: ckacey on July 19, 2006, 10:08:01 AM
the error I'm getting is:
Database Error: Table 'hydspafk_j.smf_sessions' doesn't exist
File: /home/hydspafk/public_html/forum/Sources/Load.php
Line: 1909
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: CarefreeSadie on July 23, 2006, 03:19:27 PM
Thank-you.  This worked perfectly!
Thank-you again.
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Orstio on July 23, 2006, 04:02:42 PM
Quote from: ckacey on July 19, 2006, 10:08:01 AM
the error I'm getting is:
Database Error: Table 'hydspafk_j.smf_sessions' doesn't exist
File: /home/hydspafk/public_html/forum/Sources/Load.php
Line: 1909

That usually means you need to add this to the bottom of your Joomla template:

<?php mysql_select_db($GLOBALS['db_name']); ?>
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Orstio on July 23, 2006, 04:14:11 PM
Very good work, Skydig.  I now have this running on Mambo 4.5.4.  (Just had to remember to edit the params) ;)
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: chadness on July 24, 2006, 02:59:12 PM
I don't mind you changing it at all.  I'm actually halfway through a complete re-write of it that doesn't require SSI.php at all, but in the mean time hopefully these modifications will help people.

Orstio is right, I don't have much time these days.  :)  My original changes to the discussbot were more of "sharing" the work I was doing for myself.

-chadness
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: skydig on July 24, 2006, 10:31:32 PM
Hello Chad!

If you want to take my file and give it away, of course, there is no problem for me!

I'm glad to hear about a new discussbot! Hope you'll find some time to code it...
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Orstio on July 24, 2006, 10:36:44 PM
QuoteI don't mind you changing it at all.  I'm actually halfway through a complete re-write of it that doesn't require SSI.php at all,

How do you plan on getting a proper userid/session for posting without SSI.php?
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: blackfoxz on July 25, 2006, 12:38:07 PM
Quote from: skydig on July 18, 2006, 06:22:30 PM
Here is the link again :

http://skydig.free.fr/smf.discussbot.4.1mod.by.skydig.zip (http://skydig.free.fr/smf.discussbot.4.1mod.by.skydig.zip)

I just edited the following lines:

line #32
require_once ($smf_path."/SSI.php");

to:
// Get the configuration.  This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
");
$variables = $database->loadAssocList();

foreach ($variables as $variable){
$variable_name = $variable['variable'];
$$variable_name = $variable['value1'];
}

if (!defined('SMF'))
{
require($smf_path . '/SSI.php');
}


This modification corrects the "SSI.php not found" problem when loading joomla's frontpage.

lines #42, 160 and 162
($mosConfig_sef ? "" : $mosConfig_live_site."/").sefRelToAbs

to:
sefRelToAbs

This modification prevents the "http://www.yoursite.url/" from being prepended to the well formed link (which ended up in a 404 not found error when trying to click on the "discuss" link).
Again, this modification may not work on other systems or with SEO turned on, as I only tested it on my website.

Thanks for you comments !

I would be glad if my mod worked to send it to the author so that he can include it in an official release (this is the way I see it : the author is the only one who can approve my modifications, since he knows his code more than I do...)
It's great hacking!long time can't run discussbot,reinstall your bot working fine!!!
thank you!thank you again!
PS:i am no put code
<?php
ob_start('output');
$buffer = ob_get_contents();
ob_end_clean();
$buffer = str_replace('<input type="hidden" name="sc" value="" />'
,'<input type=hidden name="sc" value="'.$sc.'">', $buffer);
echo $buffer;
?>to mambo template. is working fine.
mambo4.5.23
SMF1.1RC2
Bridge SMF Ortisio 1.1.5
on mambo SEF
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Quoth on August 03, 2006, 06:32:34 AM
I've followed quite the thread trail to end up here :p

I have the bot installed but even with your modifications i cant get passed the SSI.php error where the bot cannot find the file, which is rather annoying, any suggestions?

Would it work if i just stuck the path into that line in full?

J! 1.0.10
SMF 1.1RC2
Bridge 1.1.5
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: myuption on August 04, 2006, 12:01:14 AM
Hello, i've tried this, thanks for the effort.

WEll, i've changed the smf_discussbot.php and changed just what it's said above.

But i found 4

($mosConfig_sef ? "" : $mosConfig_live_site."/").sefRelToAbs

is it normal? i shouldn't change the last one?  :o

Cause after i changed exactly what is said... i'm getting this when i click inside joomla.

QuoteAn Error Has Occurred!
The topic or board you are looking for appears to be either missing or off limits to you.

And i have this in my articles html  ???

{mos_smf_discuss:<a name="b1" href="http://localhost/site/index.php?option=com_smf&amp;Itemid=33&amp;board=1.0" title="b1">General Discussion</a>}</strong>

its a fresh install, i tried to use {mos_smf_discuss:General Discussion} :(

Hope someone can guide me.
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: TheMaTrIx on September 05, 2006, 03:43:07 AM
Could someone explain to me how this is supposed to work with the zip attached?

On
Orstio Bridge 1.1.5+
Joomla 1.0.10+
SMF 1.1 RC+

While Orstio has stated very clearly that config.smf.php DOES NOT exist in the bridge anymore and the bot is calling for that file anyways(subsequently crashing Joomla because a require stated in the bot can't be met)?
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Orstio on September 05, 2006, 05:50:09 AM
Try this instead:

http://www.simplemachines.org/community/index.php?topic=108680.msg699248#msg699248
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Leno on March 25, 2008, 01:54:29 PM
necesito el Bridge 1.1.5
Title: Re: SMF Discussbot 4.1 final + Orstio 1.1.5 Bridge + Joomla 1.0.10 + SMF 1.1 RC2
Post by: Kindred on March 25, 2008, 05:35:17 PM
bridge 1.1.5 is serious outdated and is no longer available.

There are currently no bridges available for joomla, but bridge 1.1.1 is available for Mambo 4.6.x