I was feeling a little crazy after getting a working Discussbot, and decided I didn't like the layout of the postings, so I changed some aspects of it.
Changes to the discussion postings:
- Removes URL and quote from original post (or entire post if that's all it has).
- Adds headers for discussions and quick reply.
- Adds ability to have a link to the forum discussion, and a quick reply box.
- Adds an option for max number of posts it will display underneath the article, with a link to the forum discussion if truncated.
- New discuss picture and cleaned up postings.
So far, I've only tried this with Joomla 1.0.3 and SMF 1.1 RC1. I'd like to know if it will work with Mambo 4.5.2 or 4.5.3 - please let me know if you try it out with one of those.
Here's the download for 4.0.1 (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,1/Itemid,53).
Recommended - Here's the download for version 4.1 beta 5 (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,8/Itemid,53).
Details for 4.1 beta 5:
http://www.technoadvice.com/component/option,com_docman/task,doc_details/gid,8/Itemid,53/
As an added bonus, here's the SMF Discussbot button, which adds a button to the bottom of your editor to quickly insert {mos_smf_discuss:no_discuss} (or whatever board you specify) into a content edit box.
This should work for both Mambo (at least 4.5.1 and higher) and Joomla, though I haven't tested with Mambo 4.5.3.
Changes in this version:
- Pretty new button to match the Joomla default buttons
- Changed default board to be no_discuss, to make the button useful for adding tags to boards you don't want discussions on when you have a default board set. However, this can be changed to anything you want.
http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,3/Itemid,53/
-edit- Added file as an attachment!
Just a reminder, per the original discussbot, you do need to add this code to the bottom of you Mambo template:
<?phpob_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;?>
I can click on the link and get to the forum with the link and quote included. I then type my message and proceed to post it and all I get is a 404 error.
Any ideas?
Did you include the above code at the bottom of your Mambo/Joomla template? What version of it and SMF are you running?
Bot - 1.0.1
SMF Forum - SMF 1.1 RC1
Yes it was included and then removed, because it was actually working before without it, and no change.
I've gone through the install very methodically and cannot get this to work, it just shows the {xxxxxxxxxxx} mosbot comment on the actual page. I've added the code to the template and am on Joom 103. Any advice appreciated.
frankie - it sounds like you never published the mambot.
booger - getting a 404 error is very strange, that makes it sound like it isn't getting to the correct uRL. Have you tried a different theme? Are yoou using SEF URLs?
Quote from: chadness on October 27, 2005, 11:42:59 PM
frankie - it sounds like you never published the mambot.
I'm getting the same error as Frankie, i.e. the article displays with {mos_smf_discuss:General Chat} in the text of the article
a.) I can confirm that the mambot has been successfully published. This occurs both with fckeditor and mosCE.
b.) this occurs both when I manually type in the {mos_smf_discuss:General Chat} command or if I use your "insert SMF Discussion" button.
Quote from: chadness on October 27, 2005, 11:42:59 PM
booger - getting a 404 error is very strange, that makes it sound like it isn't getting to the correct uRL. Have you tried a different theme? Are yoou using SEF URLs?
I am using sef urls just as before and as far as a theme, are you talking about SMF. If so I am using a redesigned default SMF theme and it was previously working with that as well. Absolutly nothing has changed from the last bot to this current one other than mambo to Joomla!
Booger - Yes, your SMF theme - is your theme based on the default theme from SMF 1.1 RC1, or from an earlier one? There were some big theme changes with RC1 and that can cause some odd errors. Also, I'll try uploading a version I was working on that is more SEF compatible when I get a chance and see if that helps.
Sastrugi - I was hoping it would be as simple as not being published :) What version of Joomla, SMF, and the bridge are you using? I'll try to look at this more as well.
My wife and I just had a new baby, so I won't be able to dedicate as much time to looking at this as I would like.
Quote from: chadness on October 28, 2005, 03:32:27 PMMy wife and I just had a new baby, so I won't be able to dedicate as much time to looking at this as I would like.
Woohoo!! Congratulations, best wishes to you both!!
Re. my discuss_bot problem and my set-up: I'm using Joomla 1.3, Orstio's bridge and SMF v1.1 RC1
Just to recap: my problem is that when I publish an article the text {mos_smf_discuss:My_Board_Name} appears in the body of the article.
If its any consolation I just get errors/plural with the original version of the discuss bot thingy that comes with the bridge :-\
It was actually an error with teh 404sef compnent I was using. It was a older version so I just upgraded and it now works. Thanks for the help.
Congrats on the baby. We just had our first about 2 1/2 months ago. I hope all is well with momma and baby. I wish you and your family the best.
Chad, just a quick update for you. I've been wrestling with my install (its now clean-from new :'( ) and the discussbot still won't function; but then again neither does the original. O'll start from there I think and try and track this down.
Cheers for your help
I´m getting the same error.
Quote from: sastrugi on October 28, 2005, 09:17:09 AM
I'm getting the same error as Frankie, i.e. the article displays with {mos_smf_discuss:General Chat} in the text of the article
a.) I can confirm that the mambot has been successfully published. This occurs both with fckeditor and mosCE.
b.) this occurs both when I manually type in the {mos_smf_discuss:General Chat} command or if I use your "insert SMF Discussion" button.
I put the code at the botton of index.php of my published template. I have Joomla 1.0.1, SMF 1-1-RC1 (in spanish) and JoomlaSMFForum_1.0.1b.
I tried with smf.discussbot.4.0.1.zip and with smf.discussbot.4.1b1.zip, and the results was allways the same.
Does anyone know why it happens?
ljrodero - I don't think this works with the joomlahacks version, but Cowboy has a discussbot posted there that I believe works. He could probably add in the stuff I did easily.
Quote from: sastrugi on November 02, 2005, 12:27:04 PM
Chad, just a quick update for you. I've been wrestling with my install (its now clean-from new :'( ) and the discussbot still won't function; but then again neither does the original. O'll start from there I think and try and track this down.
Cheers for your help
Thanks for the update, keep me posted.
And thanks to everyone for the congrats!
GREAT STUFF! Here is some feedback for you:
Suggestion 1
I suggest you add this option to the config: "Show quick reply for guests? Yes/No". That way I can turn on quick reply as the default option, but turn it off if the user is not logged in, since guests can't post on my forums. If a guest thinks he can post anonomously and writes a long comment that he tries to submit, then he is only taken to the forums "please log in to post messages"-page and loses all his text. Could be annoying ;)
Suggestion 2
I'd like to be able to turn off the discussion link on my frontpage and only have a discussion link on the article view. Is that maybe possible already?
Bug report:
I get this error message on my frontpage:
Warning: preg_replace(): Unknown modifier '/' in /path/to/my/site/mambots/content/smf.discussbot.php on line 205
Question:
Why does that block of code need to be added to the template? What does it do?
I'm running:
- Joomla 1.0.3
- SMF 1.1 RC 1
- SMF-Forum Component for Joomla (the bridge) by Theodore Hildebrandt, version 3.19
- PHP Version 4.3.11
Another suggestion/feature request:
Ability to turn off discussion icon. Easiest way should be to leave the url input blank.
Quote from: chadness on November 03, 2005, 11:42:49 PM
Quote from: sastrugi on November 02, 2005, 12:27:04 PM
Chad, just a quick update for you. I've been wrestling with my install (its now clean-from new :'( ) and the discussbot still won't function; but then again neither does the original.
Thanks for the update, keep me posted.
Hmm, well, try as I might I couldn't get the discussbot to work with Jv1.0.3, Orstio's 3.19a bridge and SMF 1.1RC1, neither Orstio's discussbot nor yours would play, all I get is the {mod_smf_blah} text displayed in the page.
So I decided to try the Joomlahacks bridge and bot; and it works :o without a hitch.
Well, thats well strange to me, perhaps more so since the Joomlahack's discussbot bot says its a derivative of Orstio's.
(BTW your discussbot doesn't work with Joomlahack's bridge, but your button does ;) :) )
PS I also tried the amendment shown in jonnydement's (http://www.simplemachines.org/community/index.php?topic=53267.0) thread and my 3.19 etc set-up to no avail.
Does that discussbot facilitate quick-reply directly after articles, or do you have to follow a link to the forums?
Btw: Found a new bug: Smileys aren't parsed at all... I just get the BBC-tags in the middle of the messages, like this:
:confused:
Perhaps difficult to fix?
Quote from: torkil on November 04, 2005, 06:52:28 AM
Does that discussbot facilitate quick-reply directly after articles, or do you have to follow a link to the forums?
In the working versions I've seen it takes you to your forum with n-lines of the article pasted into your new forum post as a quote.
Quote from: torkil on November 04, 2005, 04:58:34 AM
Bug report:
I get this error message on my frontpage:
Warning: preg_replace(): Unknown modifier '/' in /path/to/my/site/mambots/content/smf.discussbot.php on line 205
Found out that this line (number 149) is causing the error:
"/jpg([^\]http://]*)\]{1}/",
Quote from: torkil on November 04, 2005, 11:22:51 AM
Quote from: torkil on November 04, 2005, 04:58:34 AM
Bug report:
I get this error message on my frontpage:
Warning: preg_replace(): Unknown modifier '/' in /path/to/my/site/mambots/content/smf.discussbot.php on line 205
Found out that this line (number 149) is causing the error:
"/jpg([^\]http://]*)\]{1}/",
a combined effort (wel, mostly a friend of mine ;) ) over here has made some progress with the non-functioning smf.discussbot.
line 60 reads
if ( (!strpos($row->text,"{mos_smf_discuss") && $default_discuss == "")) {
changing it to
if ( (!strpos($row->text,"{mos_smf_discuss") === false && $default_discuss == "")) {
clears the error of showing the 'code' as text and displays the button and its text to link to the forum -YAY!!
However, something else breaks; the articles now have the error message :
Warning: preg_replace(): Unknown modifier '/' in /hsphere/local/home/.../cms/mambots/content/smf.discussbot.php on line 198However(2), all is not lost, if you actually click on the "discuss" link, thereby creating an article in the forum the error message goes away - YAY!!
However(3), if you delete the forum post the error message come back
Well, as I say, progress of sorts. My mate, who gave me the "=== false" idea is too busy to help further and, tbh, its largely beyond me but hopefully what I've found/posted above can help nail this gremlin once and for all.
Follwoing on from Torkil's post above:
at line 144 (in my version of smf.discussbot.php, commenting out the line :
// "/jpg([^\]http://]*)\]{1}/",
and at line 175 :
// ($quote_images=="1" ? "jpg[/img]" : ""),
gets rid of the error message but I've no idea if it breaks anything else
HTH
Take the code at line 144 and change it so that it looks like the code on the lines 145 and 146. That should solve the problem. I think I just removed the http://-bit.
I now have another problem: I can't turn the discussbot off! Not even if I unpublish it! I actually had to uninstall to turn it off. Kind of troublesome when you don't want it to be autoenabled :)
Wow, busy day! Good work, I'll look at these changes.
Torkil, your suggestions should both be doable - I'll post more specifics in a little while.
QuoteQuestion:
Why does that block of code need to be added to the template? What does it do?
It's necessary for the quick reply box to function. It's Orstio's coding, so I don't know the exact details - I just hack and edit simple stuff.
QuoteBtw: Found a new bug: Smileys aren't parsed at all... I just get the BBC-tags in the middle of the messages, like this:
:confused:
Perhaps difficult to fix?
That's a good question - I'm not exactly sure how to fix that - it would either be translating over to use Joomla's smileys, or pulling them from SMF correctly. The posts don't really get parsed, like the articles do when getting copied to the forums.
I'm working on other replies to you guys - hold tight....
Quote from: sastrugi on November 04, 2005, 11:40:37 AM
a combined effort (wel, mostly a friend of mine ;) ) over here has made some progress with the non-functioning smf.discussbot.
line 60 reads
if ( (!strpos($row->text,"{mos_smf_discuss") && $default_discuss == "")) {
changing it to
if ( (!strpos($row->text,"{mos_smf_discuss") === false && $default_discuss == "")) {
clears the error of showing the 'code' as text and displays the button and its text to link to the forum -YAY!!
That's bizarre - you basically made it a double negative. Try removing the ! at the beginning of strpos and see if it still works, like so:
if ( (strpos($row->text,"{mos_smf_discuss:")===false && $default_discuss == "")) {
If that works, it means your system doesn't like the !.
All right, try this, 4.1 beta 2:
http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,5/Itemid,53/
This beta version adds:
- Ability to turn off the icon linking to the discussion.
- Ability to turn off viewing the discusion links on the front page. (note - this doesn't affect the {mos_smf_discuss:no_discuss} tag.)
- Fixes the inability to unpublish the bot.
- Fixes problems some were having parsing jpg files.
- Hopefully fixes problems with the bot working for some.
I whipped this together pretty quickly, so hopefully it's OK :)
Chad: I made some improvements on your previous version of the bot and made it possible to link to the users profile and to display the time too.
(when the comment was posted)
Do you want the code? It's just a couple of modified lines, so it might be just as quick to write it yourself :)
Try putting no_discuss as the default discussion board in the bot params.
Quote from: Orstio on November 05, 2005, 10:15:31 AM
Try putting no_discuss as the default discussion board in the bot params.
Should that help with the problems sastrugi was having?
Do you know why that http:// was after the jpg in the parsing?
Torkil - go ahead and post the code changes and I'll add them. Did you try the beta 2 version of the bot?
QuoteDo you know why that http:// was after the jpg in the parsing?
There are a few extra "http://"s in there. It looks like somebody edited the file with DreamWeaver or MS Frontpage, which like to "help" by adding that stuff in automatically.
Ah, OK, I couldn't figure out why those would possibly be in there. Wasn't me, I only use Source Edit :) I'll try to clean those out in the next version.
You can probably just copy the arrays from the original discussbot. There should be no reason for changing them; They are there just to convert HTML to SMF's BBC.
Looks like the table and td code was messed up, too.
OK, I've put together 4.1 beta 3 (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,6/Itemid,53).
This beta version adds:
- Ability to turn off quick reply box for guests (turned off by default).
- Removed some problem tags.
To add a link to the posters name you have to make 2 changes:
1) Load the posters ID in the db query so you have to change this
SELECT posterName, (...)
to this
SELECT ID_MEMBER, posterName, (...)
2) You have to insert a link on the posters name
I inserted this code where the posters name is printed:
if ($posts['ID_MEMBER'] > 0) {
$showlink .= '<a href="'.$myurl.'&action=profile;u='.$posts['ID_MEMBER'].'">'.$posts['posterName'].'</a>';
} else {
$showlink .= $posts['posterName'];
}
A couple of other things I edited:
1) I didn't want the posternames and the "comments" headline to appear in the same style as the article headline (css style contentpagetitle or something), so I edited all class-declarations to this:
- The header text (Typically "COMMENTS:"): discussbot_heading
- Post title: discussbot_postheader
This gives the site owner better control of how he/she wants the discussion to look :)
To add the post time to each comment:
1) Edit the DB query from this:
SELECT ID_MEMBER, posterName, subject, body (...)
to this:
SELECT ID_MEMBER, posterName, subject, body, FROM_UNIXTIME(posterTime, '%d.%m.%y - %H:%i') AS msgTime (...)
This data should probably be a value that you can change in the settings to make the date appear differently:
%d.%m.%y - %H:%i
It could say: "Enter the date format you wish the post date to appear in, or leave blank if you do not want the post date to be displayed"
Then you have to print out the date too. I inserted this code where the posts are printed:
$showlink .= "<span class=\"discussbot_publishtime\">// ".$posts['msgTime']."</span>";
This will print out something like this: // 06.11.05 - 12:33
(a post made on november 6th, at 12:33. ..... Typical Norwegian date format :) )
Ah yes, one last thing I added:
I put a container around all comments like this:
<div class="discussbot_container">
comment 1 here
comment 2 here
comment 3 here
etc.
</div>
I did this because I immediately had a problem with a long word in one comment. It was a very long URL that was pasted in, with the result that the webdesigns center column was expanded accordingly, making the whole site look messed up.
With the div in place I could easily just set it to overflow: hidden so that all extra long words got cut away. Maybe not the ideal solution, but hey. A wordwrap might be better?
Quote from: chadness on November 06, 2005, 12:12:26 AM
Looks like the table and td code was messed up, too.
OK, I've put together 4.1 beta 3 (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,6/Itemid,53).
This beta version adds:
- Ability to turn off quick reply box for guests (turned off by default).
- Removed some problem tags.
Thank you guys for delving into fixing this mambot as it is very usefull. I can confirm that it is now working again. Previously, I couldn't get around this error..
QuoteBug report:
I get this error message on my frontpage:
Warning: preg_replace(): Unknown modifier '/' in /path/to/my/site/mambots/content/smf.discussbot.php on line 205
Now all is well again and I can use the bot. Thanks for your efforts!
I just wanted to thank you for this great mod!
And I have a question, is it possible to get the whole article in the forumpost as well? I don't want no cutoff.
Thanks in advance!
Cheers,
Mario
Quote from: hshan on November 06, 2005, 08:32:51 AM
Now all is well again and I can use the bot. Thanks for your efforts!
Thanks for the feedback!
Quote from: fj0 on November 06, 2005, 05:25:40 PM
And I have a question, is it possible to get the whole article in the forumpost as well? I don't want no cutoff.
The easiest way is to set the number of characters extremely high - there's nothing built in to do this. I'll think about adding that....
torkil - thanks for all of the additions and suggestions! The overflow: hidden might not be a bad thing to have as a default.
Quote from: chadness on November 06, 2005, 09:50:39 PM
Quote from: hshan on November 06, 2005, 08:32:51 AM
Now all is well again and I can use the bot. Thanks for your efforts!
Thanks for the feedback!
Quote from: fj0 on November 06, 2005, 05:25:40 PM
And I have a question, is it possible to get the whole article in the forumpost as well? I don't want no cutoff.
The easiest way is to set the number of characters extremely high - there's nothing built in to do this. I'll think about adding that....
I already tried that it doesn't work! :(
Are you sure the article is not longer than the forums setting for maximum length on posts? I believe there is a forum setting that allows you to set a limit to the length of posts, and if you article is above that limit it might get cut.
Once you have found the max allowed postsize in your forum settings, try pasting your article into Mircosoft Word for instance (or any other program with a character counter) and find the size of the article to compare it to your limit.
Hope that helps.
Quote from: torkil on November 07, 2005, 09:07:37 AM
Are you sure the article is not longer than the forums setting for maximum length on posts? I believe there is a forum setting that allows you to set a limit to the length of posts, and if you article is above that limit it might get cut.
Once you have found the max allowed postsize in your forum settings, try pasting your article into Mircosoft Word for instance (or any other program with a character counter) and find the size of the article to compare it to your limit.
Hope that helps.
I just tried doesn't help. :(
What do you have it set for, and what does it get cut off at?
Another suggestion:
If nobody has written any replies to an article then the discussion link will show "Article discussion (0)". But if you click that button, you automatically create a discussion for that article where you are the topic starter.
I suggest that IF the discussion hasn't been started yet and you click on "Article discussion (0)", then you get a Javascript alert saying:
"No posts have been made in this discussion yet. Do you want to create the first post? Yes/No" (Text should be configurable)
That way, users are made aware of the fact that the topic will be created if you press yes, instead of the topic just being autocreated.
Easy enough to code in as an option. I should get to this in the next couple of days. Started integrating the other stuff you had suggested. The profile link will be SEF enabled. The CSS classes will be configurable, but will use the old values as defaults. I haven't touched the date/time part yet.
Great! Excellent :)
I have a question about the option that says "Do you want discussion links to show on the front page?".
If I set this to "Yes" then the {mos_smf_discuss:Board Name} is inserted for EVERY article on the front page.
How can I set it so that {mos_smf_discuss:Board Name} is only displayed on the front page of items where I manually entered " {mos_smf_discuss:Board Name} "?
In otherwords, on the front page, I want it off by default and turned on only when I manually put in the bot command "{mos_smf_discuss:Board Name}".
Is that possible and I'm missing something?
That option doesn't really affect whether or not it is posting a default discussion link, just whether or not you are allowed to have discussion link on the front page at all. To turn off default discussions, leave the field for "Default discussion board" blank, though this will affect the individual content items as well.
Though, thinking about it, having that option only affect default discussion links might be a better way to do it, since if you are manually putting them in, if you don't want them to show up on the front page, you just don't insert the link in the intro area. I'll look in to that.
Thanks, I had already figured it out. What I did was make the Default Discussion Board "no_discussion". When I left the Default Discussion Board blank, the actual text "{mos_smf_discuss:General Discussion}" showed up in the front article where I had manually enabled the bot. "no discussion" had to be used.
I do have another question though.
I'm also using the akocomment component.
After installing this discuss bot, the article doesn't format well.
I'd like this discuss bot "Discuss this in Forum" link to show directly under the akocomment "Write comment here" link.
Right now, they show up directly next to eachother with akocomment justified left and the discuss bot justified right.....which does not look good on smaller width templates.
Is there an easy way to fix/change this?
Quote from: kac on November 09, 2005, 12:26:36 PM
Thanks, I had already figured it out. What I did was make the Default Discussion Board "no_discussion". When I left the Default Discussion Board blank, the actual text "{mos_smf_discuss:General Discussion}" showed up in the front article where I had manually enabled the bot. "no discussion" had to be used.
Yes, there's no way to use the code at all if you have that set to no, so that's a good workaround.
QuoteI do have another question though.
I'm also using the akocomment component.
After installing this discuss bot, the article doesn't format well.
I'd like this discuss bot "Discuss this in Forum" link to show directly under the akocomment "Write comment here" link.
Right now, they show up directly next to eachother with akocomment justified left and the discuss bot justified right.....which does not look good on smaller width templates.
Is there an easy way to fix/change this?
I'm not sure off hand. I'll download akocomment and fiddle with it, see if there's anything easy to be done. Isn't it somewhat confusing having two discussions?
QuoteIsn't it somewhat confusing having two discussions?
I agree with you but most of the users of the website are not PC or forum savy so when I disabled akocomment, those users that are not familiar with forums had a fit. I had a ton of emails complaining. Therefore, I need to use both. I guess you can't teach an old dog new tricks. :P
I hear you :)
I think I can figure out a way. I can add a "<b />" command at the end of the akocomment code to add a line break. This will put the discuss bot link one line under the akocomment link....which is good. Now I need to figure out how to get the discuss boy link to justify left.
Is there an easy way to do that?
Very easy - In the second to the last line of smf.discussbot.php, the part that controls that is:
link_pos{ float: right; }
Just change the right to left.
ok, that worked great!
Now, one more thing to make it sync up with akocomment.
Right now my discussbot link comes up as "(0) Discuss this in forum".
How can I change it to "Discuss this in forum (0 posts)".
THANKS FOR THE QUICK RESPONSES!
Find two instances of this:
(0) '.$link_text.'
and change it to this:
'.$link_text.' (0 posts)
Find four instances of this:
('.$replies.') '.$link_text.'
and change it to this:
'.$link_text.' ('.$replies.' posts)
If you're feeling really crazy, you can put in an option for if there is only 1 post, so it's not always "posts", but I'm running short on time. :)
Thanks a lot! Looks/works great.
Quote from: torkil on November 08, 2005, 09:58:13 AM
Another suggestion:
If nobody has written any replies to an article then the discussion link will show "Article discussion (0)". But if you click that button, you automatically create a discussion for that article where you are the topic starter.
I suggest that IF the discussion hasn't been started yet and you click on "Article discussion (0)", then you get a Javascript alert saying:
"No posts have been made in this discussion yet. Do you want to create the first post? Yes/No" (Text should be configurable)
That way, users are made aware of the fact that the topic will be created if you press yes, instead of the topic just being autocreated.
To make this even simpler, I made a custom text field for if there are no posts. That way you can just have something that says, "Be the first to post a comment on this article!" or something like that. I like to avoid javascript alerts in case a user has them disabled....
OK, 4.1 beta 4 (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,7/Itemid,53) is ready for testing! This beta version adds:
- Ability to display Real Name instead of Username in discussion posts.
- Ability to disable discussion link from front page.
- Ability to have discussion link bring you to starting a reply in the forums, instead of to just viewing the forum post. This can be set for just the first post, or always.
- Custom text for if there aren't any posts.
- Ability to include date and time on posts.
- Name on posts now links to users profile.
- Ability to split excessively large words to preserve page formatting.
- Much prettier.
- Ability to use custom CSS classes to change formatting of forum posts.
- Various little code cleanups.
This was quite a few changes, so I could really use some testers for this.
Download it here! (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,7/Itemid,53)
I tried but still dont know how to use it. Can you give 1 example for this: "Usage : {mos_smf_discuss:Board Name} into any content item."
First, go to the mambot config and make sure it is published, and save it's configuration once.
Then, pick one of your SMF boards (for instance, I have a board named News Discussions that I use), and in one of your news articles, put that code in it. I use {mos_smf_discuss:News Discussions} so all of the posts are on that board.
As an alternative, you can go in to the mambot configuration and put a board name in the field labeled "Default discussion board", and it will automatically put a link to that board in every news item.
Chadness, can I overwrite the files or do I need to uninstall and reinstall
So does it automatically take the new posts from that board and displays on Joomla?
The way it's working for me right now is: If I add a news on Joomla it will look for post has the same name in the board and link to it, otherwise it automatically creat that post *_*
QuoteSo does it automatically take the new posts from that board and displays on Joomla?
The way it's working for me right now is: If I add a news on Joomla it will look for post has the same name in the board and link to it, otherwise it automatically creat that post *_*
That's what it should be doing...
Just wanted to add, Chadness: This is great work! :D I'm very impressed with what you've done with the discussbot.
OH, I see
Chad, I hope you can add the option to automatically display new topics, but this one is great already.
Cheers ^^
Quote from: Aravot on November 10, 2005, 06:03:32 PM
Chadness, can I overwrite the files or do I need to uninstall and reinstall
Yes, you can, though you'll want to go in to the configuration right away and save it, since there are a LOT of new options.
Quote from: Orstio on November 10, 2005, 06:12:00 PM
Just wanted to add, Chadness: This is great work! :D I'm very impressed with what you've done with the discussbot.
Thanks a lot! It's been a good learning experience, and I'm pretty happy with it, now. I'm debating adding in parsing for the forum code, but we'll see.
Can you make the discuss.gif to point right instead of left.
Quote from: yellow1912 on November 10, 2005, 06:14:16 PM
OH, I see
Chad, I hope you can add the option to automatically display new topics, but this one is great already.
Cheers ^^
By the nature of what a mambot is, this won't be able to do that. You could use a module, like the recent posts module, to display any recently made posts, but that's the closest to what you're looking for that I've seen.
Quote from: Aravot on November 10, 2005, 06:38:16 PM
Can you make the discuss.gif to point right instead of left.
That would make sense, wouldn't it? :) You can open it up in any editor (even Microsoft Paint) and simply flip it horizontally.
That makes sense.
I tried the 4.1b4 discuss bot and found an issue. If you don't put something in the "Default discussion board" field in the mambot parameters, the {mos_smf_discuss:xxxxx} is not processed and the content shows the bot tag as entered. If you put a board name in the "Default discussion board" field, the bot tag is processed as expected and the comment text is generated, however, you're stuck with every content item having the discuss link without going through each article and adding the {mos_smf_discuss:no_discuss} tag. Can you fix it so we don't have to have a "Default discussion board" and yet still process the tag where we explicitly add the {mos_smf_discuss:xxxxx} tag?
I'm running Joomla 1.0.3 with SMF 1.1RC1 and Orstio's bridge.
Put no_discuss in your default discussion board.
Yeah, that should have the same effect. I'll fix that in the next release.
Quote from: Orstio on November 11, 2005, 11:39:47 PM
Put no_discuss in your default discussion board.
That worked. Thank you!
Mambo 4.5.2.3
SMF 1.1 beta 4
Database Version: 4.0.17-standard
PHP Version: 4.4.0
Web Server: Apache/1.3.34
SMF discussbot v4.1b3 was working fine however after I upgraded to v4.1b4 my site is unaccessible with the following message
QuoteFatal error: Cannot redeclare textwrap() (previously declared in /home/mysite.com/public_html/cms/mambots/content/smf.discussbot.php:391) in /home/mysite.com/public_html/cms/components/com_akocomment/functions.akocomment.php on line 54
If I unpublish either discussbot OR akocomment the site is back to normal, something is conflicting between these two bots.
smf.discussbot.php:391
function textwrap($text, $width = 75) { <----LINE 391
if ($text) return preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$width."})/i"," \\1\n",$text);
}
functions.akocomment.php on line 54
function textwrap($text, $width = 75) { <---LINE 54
if ($text) return preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$width."})/i"," \\1\n",$text);
}
Do a search and replace in the discussbot file and change every instance of "textwrap" to "textwrapper". Should be lines 287 and 391.
Quote from: chadness on November 12, 2005, 08:54:22 PM
Do a search and replace in the discussbot file and change every instance of "textwrap" to "textwrapper". Should be lines 287 and 391.
Thanks that, fixed it.
I hate to sound dumb, but what does this do? Does anyoen have a demo/live site where I can see it in action??thanks in advance rickC
Check http://aim.aiiresources.com (http://aim.aiiresources.com).
The purpose of this is to have discussions connected to your content items. What it does is put a link in your article that will bring the user to a forum post for that specific article in the board you specified. If the forum post doesn't exist yet, it will create it.
Usage : {mos_smf_discuss:Board Name} into any content item. Of course, replace "Board Name" with the actual name of the board in which you wish for the discussion to take place.
Other features include:
- The ability to automatically add links to all articles. You can also use {mos_smf_discuss:no_discuss} if you have set it up to auto insert and you don't want it to show in a particular item.
- The ability to have the link only show on the full article, not on the intro only front page.
- The ability to see the posts from the forum at the bottom of the article.
- The ability to have a quick reply box at the bottom of the article to add posts to the forum.
Quote from: chadness on November 13, 2005, 01:17:10 AM
Check http://aim.aiiresources.com (http://aim.aiiresources.com).
The purpose of this is to have discussions connected to your content items. What it does is put a link in your article that will bring the user to a forum post for that specific article in the board you specified. If the forum post doesn't exist yet, it will create it.
Usage : {mos_smf_discuss:Board Name} into any content item. Of course, replace "Board Name" with the actual name of the board in which you wish for the discussion to take place.
Other features include:
- The ability to automatically add links to all articles. You can also use {mos_smf_discuss:no_discuss} if you have set it up to auto insert and you don't want it to show in a particular item.
- The ability to have the link only show on the full article, not on the intro only front page.
- The ability to see the posts from the forum at the bottom of the article.
- The ability to have a quick reply box at the bottom of the article to add posts to the forum.
Ok that makes sence....thanks chadness, now I have to D/L and play with it....
I'm releasing 4.1 beta 5. This beta version adds:
- Fixed a few minor errors (missing variable declarations). Should prevents some errors in your error log.
- Fixed problem with no default board declared (see below).
Download page (http://www.technoadvice.com/component/option,com_docman/task,doc_download/gid,8/Itemid,53/)
Details page (http://www.technoadvice.com/component/option,com_docman/task,doc_details/gid,8/Itemid,53/)
I'm working on parsing BB code. We'll see if it ever happens :)
Quote from: kcdude on November 11, 2005, 11:22:49 PM
I tried the 4.1b4 discuss bot and found an issue. If you don't put something in the "Default discussion board" field in the mambot parameters, the {mos_smf_discuss:xxxxx} is not processed and the content shows the bot tag as entered. If you put a board name in the "Default discussion board" field, the bot tag is processed as expected and the comment text is generated, however, you're stuck with every content item having the discuss link without going through each article and adding the {mos_smf_discuss:no_discuss} tag. Can you fix it so we don't have to have a "Default discussion board" and yet still process the tag where we explicitly add the {mos_smf_discuss:xxxxx} tag?
4.1 beta 6 posted here:
http://www.simplemachines.org/community/index.php?topic=56918.0
Parsing BB-code is one thing. How about parsing smiley sets from SMF? :-X
Right now I have :wow:, :popcorn: and :silly: all over my comments, since they have been posted in the forum. :D
Smiley sets is part of beta 6 as well.
Sorry, didn't follow the link to the new thread. This thread should be closed.
I just installed 4.1 beta 4 - Joomla 1.0.3 on Joomla 1.0.12, Community Builder 1.0.2, with SMF 1.1.1, but got the following error.
Warning: main(/home/softdux/public_html/administrator/components/com_smf/config.smf.php) [function.main]: failed to open stream: No such file or directory in /home/softdux/public_html/mambots/content/smf.discussbot.php on line 30
Fatal error: main() [function.require]: Failed opening required '/home/softdux/public_html/administrator/components/com_smf/config.smf.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/softdux/public_html/mambots/content/smf.discussbot.php on line 30
Any suggestions on this? Even unpublishing it still gave me the error. Only uninstalling it made the error go away.
Yes, use discussbot 4.2 beta 1 instead.
Wow, quick reply!
I'm not one for using beta scripts on productions sites, but this one seems to work well. Where to give feedback?
My installation is as follows:
Joomla 1.0.12
SMF 1.1.1
Community Builder 1.0.2
discussbot 4.2b1
This all is setup unwrapped: main website on http://www.softdux.com & forum on http://forum.softdux.com
The only two problems I have so far is:
1. I have to use the topic numbers, using the names doesn't work.
2. When a user hasn't logged in yet, and he clicks on the "comment on this article" link, he gets taken to the SMF logon page (shouldn't this be handled with the CB logon form?), and then once logged in, he gets redirected back to my Joomla site, at which stage he has to click on the link again. Is this a bug? Or should I put in a new feature request for it?
Otherwise it's great, thanx :)
Quote(shouldn't this be handled with the CB logon form?),
With the bridge, nothing should ever be handled by the CB login form.
Quote from: SoftDux on February 10, 2007, 05:55:25 PM
1. I have to use the topic numbers, using the names doesn't work.
Do you use separate databases for Joomla and SMF?
Seems like the bot i am looking for :)
Hovever, i got one problem: the number of comments is not counted after writing one and adding new comments from the joomla text spawns a new topic ending up in several topics with comments for the same article. I can't figure out what is wrong.
I am using:
Joomla 1.0.12
Bridge 1.1.6
Discuss bot 4.2 beta 1
Edit: problem fixed :)