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]
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.
Does "Open Source" say something to you ?
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
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. ::)
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.
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...
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)
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.
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...
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
Quote from: skydig on July 17, 2006, 03:06:59 PM
[Removed, because I am rude]
I'd like to give it a try
So skydig, could you explain what you modify to make it running ???
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...)
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
Hi
Working like charm.... ;D
Regards
IQAPPS
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
Thank-you. This worked perfectly!
Thank-you again.
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']); ?>
Very good work, Skydig. I now have this running on Mambo 4.5.4. (Just had to remember to edit the params) ;)
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
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...
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?
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
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
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&Itemid=33&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.
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)?
Try this instead:
http://www.simplemachines.org/community/index.php?topic=108680.msg699248#msg699248
necesito el Bridge 1.1.5
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