New and improved Joomla compatible discuss bot (4.1 beta 5 released 11-14-05)

Started by chadness, October 18, 2005, 01:17:39 PM

Previous topic - Next topic

chadness

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

chadness

#61
OK, 4.1 beta 4 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!

yellow1912

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."
My SMF forum ^^
An Ecommerce site I help to build

chadness

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.

Aravot

Chadness, can I overwrite the files or do I need to uninstall and reinstall

yellow1912

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 *_*
My SMF forum ^^
An Ecommerce site I help to build

Orstio

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.

yellow1912

OH, I see
Chad, I hope you can add the option to automatically display new topics, but this one is great already.

Cheers ^^
My SMF forum ^^
An Ecommerce site I help to build

chadness

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.

chadness

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.

Aravot


chadness

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.

chadness

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.

Aravot


kcdude

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.

Orstio


chadness

Yeah, that should have the same effect.  I'll fix that in the next release.

kcdude


Aravot

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);
}


chadness

Do a search and replace in the discussbot file and change every instance of "textwrap" to "textwrapper".  Should be lines 287 and 391.

Advertisement: