This is a static archive of the old Chris Boylan dot to the COM forum, preserved 2026-07-07. Posting is closed.

PhpBB/Mambo Comments

Chris
Don't hold your breath. I have to finish this site I'm working on that actually pays me first - but I do fully intend on doing it and soon (a weekish).

In addition, there seems to be a path problem when you click on the comments link. I've changed my forum template, but the template is the same as the rest of the site when you link via the comments link.

If I really get into it, I'll fix the permission problem too (comments are public even if content is not), but I'm not sure if that's possible without many hours of work.
Bi4a
well, comments link worked fine for me and moved me to correct topic. it's ok. as for now i'm thinking of unpublishing my newsflashes :) lol nobody reads them ; 8)
Guest

Question

This creates a thread for each "article" I publish in Mambo, correct?
Chris
Yes, it does. It is the "post comments" and "view comments" links at the bottom of each of my articles. It auto creates a thread in your forum and inserts the first page of your article as the lead post. It then counts the replies and gives that info to your article page.

Be careful, however, it is still a hack to your core files, so you shouldn't attempt it unless you don't fear messing up your site. I didn't care that much, so I just forged ahead.

If you read this thread, you will see that apparently it doesn't work in a "blogcategory" or "blogsection" but does work on the front page. This confuses me, but I'll be looking into it the next few days.
campbell

HTML

Okay, I did everything in the first post except for the template stuff for the HTML mod you mentioned:
http://www.phpbb.com/phpBB/viewtopic.php?p=923833

I didn't do the template stuff because I couldn't find it in the code. :oops:

My CommentBot has Allow HTML turned on. In the board's General Config, I have HTML turned on.

Why is it that my HTML is messed up? Basically, it's all broken up and not compiled. It looks exactly like this: LINK KILLED

Any ideas?

Thanks.

Edited to remove link

Last edited Wed Jun 8, 2005 11:08 pm UTC by campbell, edited 1 time(s).

Chris
Campbell -- glad to see you tried it out. The more people that use this and give feedback, the better it gets.

As for the Admin-only HTML, I've given up on that. The developers at PhpBB have changed the way HTML is viewed, so I just let anyone post HTML, Just like you probably did.

However, after 2.0.14 or so, you now must check to have HTML displayed on a per-user basis. If allow HTML is not checked on the poster and the viewer, it will not work. You now have to go into PHPMySQLAdmin to edit the allow HTML value for all users to 1 from 0. This also goes for the anonymous user, usually with an id of -1.

I'm thinking I may be able to insert BBcode, which would make a heck of a lot more sense. If I get inspired I may do it today and tomorrow with the other fixes I'm looking at.
Guest
Chris wrote:I'm thinking I may be able to insert BBcode, which would make a heck of a lot more sense. If I get inspired I may do it today and tomorrow with the other fixes I'm looking at.

That's exactly what I was about to look into. Like you, if I get the initiative, I'll look into it as well. But, for now, I'm enjoying watching it rain (no, it doesn't take much).

Fact: I'm an idiot. That said, I don't fully understand what I have to do in order to keep the comments part off of newsflashes. I'm extremely new to Mambo, so I don't know where to look to see what item id it is. Or, are all newsflashes Itemidvar = 3?

Also, since I may be asking for too much out of you already, I'll ask for one more: is it possible to keep the comments to the newsflashes, but direct them to go into a different forum than the comments for the other stuff?
campbell
That was me above, for what it's worth.

EDIT 1:
The trick seems to be getting the carriage returns to work.

EDIT 2:
Carriage return not as big a deal as I thought. I edited the content.html.php code to say this:
Code: Select all
      $thread_id = GetMessage($row->id, FORUM-ID, COMMENTBOT-ID, "$row->title", "[url="."http://www.ENTERYOURDOMAINNAMEHERE.com".
"/index.php?option=".$optionvar."&task=".$taskvar."&id=".$idvar."&Itemid=".$itemidvar."]
[size=18]Link back to the article.[/size][/url]\r\n\r\n(Note:  This is original version of article.  It may have been edited.  Click on link above for most recent version.)\r\n\r\n[size=9]([url=http://chrisboylan.com/]PhpBB Mambo Comments by Chris Boylan[/url])[/size]\r\n\r\n".$row->text, 0, NOTIFICATION-ID);

Not that elegant, but it should work. HOWEVER, it doesn't. After I've submitted the article, I'll go and view the comment in phpbb. None of it got translaterd. If I were to click on Edit, then uncheck the box that says "Disable BBCode in this post" and click preview, then all looks good. But, in general config for the board, BBCode is allowed all over the board. Any ideas?
Chris
As you might be able to see, I upgraded to 4.5.2.2 and PhpBB 2.0.15 and this seems to have messed things up for anonymous viewers.

When I log out I no longer see the HTML as it should be, but instead see raw code. The only problem is that if I edit it, I'm pretty sure the HTML will be ripped out for good.

Good times.
campbell
Have you made any progress?

I gave up on getting the BBCode to work. I'm just using regular text without any formatting. The site itself makes the URL a link, so that's taken care of. Not that attractive, but it works.
Chris
Well, I figured out the HTML problem... again.

The mos_users MySQL table has all the users for the forum. In order to display HTML, SET 'user_allowhtml' to '1' for all users - especially that of user 'Anonymous' with a user_id of '-1'.

If user_allowhtml is set to 0, then the HTML will display as plain text - the problem we have been having.

The more I thought about it, using BBCode would be a bitch. Since the content is written in HTML for mambo, insert_post would have to be completely rewritten with translations for all HTMl to the relevant BBCode. As it stands, I have to find a way to strip out the inline css, which throws the PhpBB HTML display for a loop.

Good times.

Still working on the newsflash thing.
Chris

For Bi4a

for Bi4a:

Alright, to make the comments not show up in blogcategory or blogsection (if there is such a thing) make change the beginning of the content.html.php code hack to:

Code: Select all
at line 512 --- after ---
         HTML_content::TOC( $row, $params );
--- add ---
      $optionvar = mosGetParam( $_REQUEST, 'option', "" );
      $taskvar = mosGetParam ( $_REQUEST, 'task', "");
      if ( $optionvar == "com_content" && $taskvar != "blogcategory" && $taskvar != "blogsection") {
      $itemidvar = mosGetParam ( $_REQUEST, 'Itemid', "");
      $idvar = mosGetParam ( $_REQUEST, 'id', "");
      $taskvar = mosGetParam ( $_REQUEST, 'task', "");
      $thread_id = GetMessage($row->id, FORUM-ID, COMMENTBOT-ID, "$row->title", "Link back to the article. (Note:  This is original version of article.  It may have been edited.  Click on link above for most recent version.)(PhpBB Mambo Comments by Chris Boylan)".$row->text, 0, NOTIFICATION-ID);



This will cause the Comments link to not be loaded on the blog display, which is preferred. I'm thinking it should be set to only load when task="view", but I have to do a little more research.

If there was earlier editing to this file as well, like making sure an ItemId was not selected as well, make sure you keep that. I'm not sure hwere you are at now.
Guest
I've setup up this mod and have been using it for awhile. Great work! After awhile though our front page articles are taking you to the wrong story in the forums. Any suggestions?
Chris
I'm not really sure. Do you have a link I could check out?

I'd need to see the stories, the links to the threads, the proper threads and the links back to the stories.
Chris
FYI --

I will be moving this and all of my sites to Joomla in a bit and will be moving Mambo/PhpBB Comments to... I guess Joomla/PhpBB Comments. Long live opensourcematters.org.