News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

smf mosbot discuss

Started by profile, January 29, 2005, 09:34:52 PM

Previous topic - Next topic

profile

I installed mambot using mambo administration, published it, and also placed smf_mosbot_help.php in the mambo root.  I don't see additional details regarding how to make this work.  I also searched "discuss".  Any leads?  TIA

Orstio

Hmm... That should be in the file called "READ.THIS.FIRST".

Basically, put this code into an article:

{mos_smf_discuss:Board Name}

Where Board Name is the name of the board where you want the topic to appear.

profile

Here's the READ.THIS.FIRST.txt

Quote## SMF Discuss Mambot ##

Version: 1.0
Release Date: 11/19/2004
Copyright: (c) 2004 Theodore Hildebrandt, based on original by Two Shoes Mambo Factory
Author: Theodore Hildebrandt
Original Author: Arno Zijlstra <[email protected]>
License: GNU GPL


Prerequisites:
Mambo 4.5.1 or up;
SMF 1.0 RC2 or later

How to install:
Unzip the package and install discussbot.zip file as any mambot from the admin backend.

Upload the smf_mosbot_help.php file to your Mambo root.  This is just a little utility that displays the code you can
copy/paste into your article to display the link.

and you're done!

Disclaimer:
Always, yes, that's right, always (!!) back up your database and site prior to installations and test any additions you
make to your site locally first and do NOT add anything to your livesite unless tested thoroughly, extensively, securely
and wisely!

Note:

This bot is set to quote the first 700 characters of the article, and so it may not work correctly if the {mos_smf_discuss:}
appears in those first 700 characters.

Sorry, does a new topic or new board need to be created for each article?  I don't think it was made clear in the 'READ.THIS.FIRST.txt' file.

Orstio

Sorry, you're right.

It creates a new topic with each article.  You don't have to create the topic, the bot will do that for you with the first post.

You must specify a board that already exists, however, or you will get an error when you click the link.

profile

The problem with the bot creating the first post is that it includes most of the article (including pics) in the reply box, which may be confusing.  When I tried to comment, it included everything in the reply box, not knowing it wasn't a bug, I deleted everything inside the reply box and typed a test message.  The AKO comments bot was great and made every article very simple to discuss/comment.

Orstio

The problem there is security.  You don't want a script-kiddy writing a little bot that posts 100 messages/minute to your forum.  As far as SMF is concerned, that would be what the discussbot was trying to do:  start a topic, and then reply instantly.

So, it cannot be done that way without compromising security.

profile

Thanks for your help.  Since the bot includes a part of a section and even includes the photos, how easy/hard would it be to customize it to include only a certain amount of lines and also to strip out images.

Orstio

Not hard at all, if you know anything about regular expressions.

Check the code.  It's a huge find/replace array.

profile

Sounds complicated, so I'll skip it.  Being a non script person, that's the main reason why I chose to try mambo+ smf as I don't have any skills with code stuff.

Orstio

I need to add some parameters for the Mambo backend on this anyway.  I'll probably make the number of characters customizable, the image URL, and support for multiple languages.  I can add the inclusion of images as optional as well.

Anything else for the discussbot?

Slack

Maybe an option to take you to either the top OR the bottom of the topic listing? 

chadness

Quote from: Orstio on January 30, 2005, 08:41:00 PM
Anything else for the discussbot?
An option to specify a forum to add to every posted article would be useful to many, I think.  There's a number of people who have a specific "News discussions" forum, I believe.

profile

parameter suggestions:
option to display image (on or off)
option to change link name (ie: discuss, comment, etc.)
option to show 'discuss' in the intro text view

Orstio

Quoteoption to show 'discuss' in the intro text view

I'm not quite certain what you're asking for here.  Can you explain a bit?

profile

Quote from: Orstio on February 01, 2005, 07:24:36 AM
Quoteoption to show 'discuss' in the intro text view

I'm not quite certain what you're asking for here.  Can you explain a bit?

When you have news articles with single/two/three-colum, you have the option of showing the intro text (teaser i guess), but if you include the discuss bot at the bottom, the intro text viewable on the frontpage doesn't indicate if you have comments on the article or not (similiar to akocomment).  Sorry if I'm not making this clear.

xenovanis

So, just put the tag at the top in your intro-text box before your article, like I did @ http://www.taxibalk.nl
"Insanity: doing the same thing over and over again and expecting different results."

Orstio

QuoteWhen you have news articles with single/two/three-colum, you have the option of showing the intro text (teaser i guess), but if you include the discuss bot at the bottom, the intro text viewable on the frontpage doesn't indicate if you have comments on the article or not (similiar to akocomment).  Sorry if I'm not making this clear.

Move the bot code up higher in the article so it appears in the intro text.  ;)

Warning, however:  If the first click on the link is from the homepage, the forum will link back to the homepage.

profile

If you do that, it will also have {mos_smf_discuss:} included in the forum as well as seeing it in the article itself.  With akocomment, you don't see that, so I thought there must be a way.

xenovanis

Okay, you have a point there  ;)
"Insanity: doing the same thing over and over again and expecting different results."

Kindred

AkoComment does not re-quote the news item....  it just tacks on messages after the item itself. Sort of a poor man's message thread.

the DiscussBot take the akocomment a step further, starting a discussin thread in the attached message board and quotes the item to start with....

There may be a way around it...   to put the {discussbot} message in the "intro" and then drag the quote form the main section...

(Of course, I still can not get the damned discussbot to work right on my site...   I get errors, with any (or no) mambot editor installed...)


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Orstio

#20
QuoteThere may be a way around it...   to put the {discussbot} message in the "intro" and then drag the quote form the main section...


I may have a work-around that shouldn't be too difficult.  ;)

BTW:  I have added seven parameters from this topic so far.... (Params in Mambots are a pain  >:( )

- set # of characters from the article to quote in the post
- specify the URL of the discussion icon image
- specify whether or not to include images from the article in the forum quote
- specify whether to jump to the beginning or end of the topic
- customizable link text ( Comments, discussion, or whatever)
- specify a default board in which to discuss articles.  If an article does not contain the mosbot code, a discussion link will automatically be created to the default board.
- a topic prefix, so that forum members know that the topic is for discussion of an article posted in Mambo.

Any more?

profile

i click on the comments to an article, then once in the board, i tried to modify the quote so it doesn't include (clean it up) all the special characters and the mosbot link, but when i go to save it, it's not linked any more.  what determines or breaks that link?

Orstio

You mean the article is no longer linked to the topic?

The only thing that it is looking for is the title of the topic (Which should match the title of the article).

profile

Actually, I made a mistake by changing the subject.  Even with a little manual cleanup, it works, and that's good for now.  Can't wait to try the new features in the next version.  Will you be releasing a beta to test?

Orstio

What kind of manual cleanup?

If you let me know which tags/characters are being generated, I can automate their removal, or conversion to BBC.

profile

Quote from: Orstio on February 04, 2005, 11:43:26 PM
What kind of manual cleanup?

If you let me know which tags/characters are being generated, I can automate their removal, or conversion to BBC.

Here are the code so far that doesn't get translated or left behind and displayed in the forum.

[strike] [em] [strong] [ol] [ul] [li]

[Unknown]

[s] [i] [b] [list] [list] [li]...[/li]

-[Unknown]

Orstio


deejayh

Hi Folks,

Any news on the modificated Mambot?
Desperate to see it!! :D

Cheers,
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

Kindred

it's included with the 3.0 bridge.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

profile


jorgen

I really like the new bot.  new features and parameters are great.

I also like that it defaults to a board if no bot is defined. But here is also a big problem:
It puts a "discuss this"-link on EVERY article. Even those that should not have it.  Like static content that I use to make static pages on the website.

Could we somehow expand the discussbot with something like {mos_smf_discuss:nodiscuss}  ?
If this is included in an article, the bot would NOT make a discuss-link.
Could we make this change rather quickly (not wait for next release) ?

chadness

If you leave it blank it won't put in those links.

jorgen

Leave what blank?    Like this: {mos_smf_discuss:}   ?

Or the "Default discussion board"  in the config? 
I really would like to have the automatic default discuss-link on all articles except a few static content pages.

chadness

I meant the default discussion board.

So, what you owuld like would be another parameter, or hardcoded to {mos_smf_discuss:nodiscuss}, that says do not put in a link to the forums if you find this.

Hmmm, you may be able to hardcode that by changing line 39 to this:
if ( (strpos($row->text,"{mos_smf_discuss:") === 0 && !isset($default_discuss)) || $_REQUEST['option'] !="com_content" || (strpos($row->text,"{mos_smf_discuss:nodiscuss}") === 1) {

jorgen

Thank you, Chadness, but I still couldnt make it work.

chadness

Ooops, try this:

if ( (strpos($row->text,"{mos_smf_discuss:") === 0 && !isset($default_discuss)) || $_REQUEST['option'] !="com_content" || (strpos($row->text,"{mos_smf_discuss:nodiscuss}") !== 0) {

I'm sure there's a better way to do this but I'm still pretty new with PHP.

deejayh

Hi All,

I cannot even get the mosbot discuss to work.

  • installed the discussbot.zip file as mambot in admin.
    Uploaded the smf_mosbot_help.php file to my Mambo root - If fact tried every where to ensure I got it in the correct place! :)

Does a picture show to click on in the document (such as the {mosimage} pic), which puts {mos_smf_discuss:} into the document! Or do I need to just put in {mos_smf_discuss:}. Either way does not work!

Also some earlier posts say there are some new features and PARAMETERS. I cannot see these at all?
Mambo says there are NO parameters for this item!?

I have tried removing and re-installing. I am currently using Mambo 4.5.2 and HTMLArea3 XTD

Any help appreciated,
Dave
Regards,
Dave
Family History UK  - http://www.familyhistory.uk.com

Orstio

Deejayh:  You need to update your bridge, with the new discussbot.  ;)

You use the discussbot by putting this into your articles:  {mos_smf_discuss:Board Name}

Replace Board Name with the actual name of the SMF board in which you want the discussion to take place.


QuoteI also like that it defaults to a board if no bot is defined. But here is also a big problem:
It puts a "discuss this"-link on EVERY article. Even those that should not have it.  Like static content that I use to make static pages on the website.

Could we somehow expand the discussbot with something like {mos_smf_discuss:nodiscuss}  ?
If this is included in an article, the bot would NOT make a discuss-link.
Could we make this change rather quickly (not wait for next release) ?

Yes, this can be built in.  It shouldn't take long.  The code submitted here by Chadness is pretty close. ;)

chadness

Quote from: deejayh on February 21, 2005, 05:27:38 PM
Does a picture show to click on in the document (such as the {mosimage} pic), which puts {mos_smf_discuss:} into the document! Or do I need to just put in {mos_smf_discuss:}. Either way does not work!
Like Orstio said, there are parameters in the updated discussbot that comes with the 3.01 version of the bridge.  One of them is to automatically add the discussbot code to all articles.  If you'd rather have a button, I wrote a really basic one up a while back - search the forums for discussbot and you should find the thread.

jorgen

#40
Quote from: chadness on February 21, 2005, 04:43:37 PM
Ooops, try this:

if ( (strpos($row->text,"{mos_smf_discuss:") === 0 && !isset($default_discuss)) || $_REQUEST['option'] !="com_content" || (strpos($row->text,"{mos_smf_discuss:nodiscuss}") !== 0) {

I'm sure there's a better way to do this but I'm still pretty new with PHP.

Thanks for yet another attempt, Chadness. But I couldnt make that one work either. And my own PHP-skills ate practically noneistent, so couldnt make it work on my own.

I think I'll clear the default board for now, and add the {mos_smf_discuss:} manually where I want it.

But it would be great if Orstio could add a test when automatically adding the link to default board. The link should not be created if the article is a static content item.

jorgen

I got another problem with the 3.01-version of the bot.
I cleared the default board from the bot-settings, and then "{mos_smf_discuss:} " appears on the bottom of all articles even if I have not defined any bot-text in the article (also static items).

See an example at:   
http://www.inventorforum.net/index.php?option=com_content&task=view&id=99&Itemid=65

Does the bot behave like this for others as well, or have I messed things up?

Orstio

QuoteI got another problem with the 3.01-version of the bot.
I cleared the default board from the bot-settings, and then "{mos_smf_discuss:} " appears on the bottom of all articles even if I have not defined any bot-text in the article (also static items).

See an example at:   
http://www.inventorforum.net/index.php?option=com_content&task=view&id=99&Itemid=65

Does the bot behave like this for others as well, or have I messed things up?

Is there perhaps a space in the textbox for the default board in the bot params?

botagrox

Where do I find the smf_mosbot_help.php file?  I didn't see it in the zip file.  I've added the mambot, but it doesn't work, so I'm guessing this php file will complete the installation.

Kindred

well, the smf_mosbot_help.php file has no actual function with the bot...   it just displays a list of the available forums that you can call for.

in order to use the bot, you need to a) publish it and  b) either configure it to add a link to every article or add the link thext to the articles that you want...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Kagemaru

I have a problem (what a surprise -_-") with the Bot. It works good, when I put in News as default board. But then it displays the Forum link at every entry (as it is supposed to). But when I leave the default board empty, it's nowhere displayed and I can't add the link.
it just writes it there then.

example [nofollow]

=\ anyone an idea how to fix that?

Orstio

Have you published the bot?

Kagemaru

#47
I did... and as I said, when I enter News into the default board text field, it works as it should.

edit: If it helps, when the default board is set to News and I write {mos_smf_discuss:} it works that the forum link is not displayed. But the {mos_smf_discuss:} itself is displayed still. :o

Orstio

You know that you can enter {mos_smf_discuss:no_discuss} to get rid of that, right?

Kagemaru

nope, thank you. ^^

But the other problem remains still with me =\
*just uses {mos_smf_discuss:no_discuss} for now*

chanh

I use: MOS_SMF_BRIDGEv3.19a_SMF1.1b3.zip, Mambo 4.5.3 and SMF 1.1RC1

Everything work except the discussbot.  If you leave the Default discussion board: blank then I will get {mos_smf_discuss:general} in the content where I added it.

If you add "general" in the "default discussion board:" then I will get (0)

What am I missing?

Thanks

chadness

There's a bug in that version.  Either put no_discuss in for your default discussion board, or better yet, uninstall that version and install this version:
http://www.technoadvice.com/component/remository/Download/Joomla-and-Mambo/SMF-Discussbot-version-4.1-final

chanh

Yea, I found that after I post this.

Thanks

Advertisement: