PhpBB/Mambo Comments

This is where article comments will be kept.

Postby YoungArmy » Fri Apr 22, 05 1:33pm

I have a guess ... I think it's not because of the comment component, it's probably a general problem with my mambo and I have no idea how to fix it.

Because :
Mambo also publishes modules(selfcreated ones) twice so that I have to delete one manually and your comment component also opens 2 threads in the forum for the comment (one with the article and an empty one).


I am really a rookie and I fear that I really can't cope with these kinda problems ... do you have no idea or a somebody else who could help.

You know deleting a module didn't bother me , but the comment thing now really does.


CU
YoungArmy
 

Postby Chris » Fri Apr 22, 05 3:40pm

Yeah, if you had pre-existing troubles with Mambo, this could just be another symptom of the larger problem.

As to the reason for your other problem, the whole included part is an if/else statement. You've commented out the "if {"
but left the closing "}"
out there, which confuses PHP. If PHP sees a "}" it looks backwards for the "{" that started it. If it doesn't find it, it spits out that error message.
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby YoungArmy » Sat Apr 23, 05 8:34am

Well I lost faith in my first statment ... I just don't find it out .. the double module thing is a rare execption ... is there no way you could check if there's probably sth messed up in my content.html.php file by uploading it into your system maybe offline ? to test it somehow ? I tried it all as a rookie for hours.

http://www.youngarmyonline.com/contenthtml.zip
YoungArmy
 

Postby Chris » Sat Apr 23, 05 4:21pm

I can't do that because I am running 4.5.2.1 , not 4.5.1 . Other than that, it looks fine. Your problem may be in your template file, you might want to try commenting out some of that stuff. Sorry you've had so much trouble, but I don't think this hack is the problem, rather that it is exposing a problem in your Mambo.
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby YoungArmy » Sun Apr 24, 05 11:16am

my mambo is really upside down you're right I figured out how to fix it I removed the mosmodule "top" from template and replaced it with user6 and adapted all the necessary modules to it.

And after that the comment text dissapeared from top : hooray!!!


I think I found the last problem related to the comment script:

if you click on comment an error appears ... this is a different content section apart from news ... so there should be no comments at all.


What can we do about that.



CU
YoungArmy
 

Postby Chris » Sun Apr 24, 05 5:44pm

Congratulations! There is little more satisfying in this world than finally beating down an elusive solution to a major annoyance.

I'm a little confused as to what you want on this page. It appears that the variables are not being passed to the GetMessage function from the content. That's why the links lead to nothing. I'm not sure if they are inserting posts, but I suspect not. My computer is acting up right, now so I can't see it.

If you don't want a certain section or category to post comments in the forum, you'll have to edit the if/else lines. Right now, it only puts a comment link if option == com_content, but you can make the if condition other things to, like if id is not equal to 4, etc. (I'm not sure of the commmand, but you can find it out at php.net.)

Glad to see you're almost home.
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby YoungArmy » Tue Apr 26, 05 9:45am

Why is the script letting people post comments that are not registred, the script should rather go to the Login page at the forum.

Because I don't let people post that are not registred I blocked the possibility of posting as a guest.

But because the comment script still opens guests the posting page ( don't know why) that creates an error when clicking on post message then.


Is this problem Board related or script related?
YoungArmy
 

Postby Chris » Tue Apr 26, 05 2:51pm

The post comment links to the posting page. This is fine for me because I let anyone comment any article on my site. If you do not want unregistered users to post replys, you should set up the forum to not allow anonymous replies.

If I understand you correctly, you have done this. However, normally PhpBB prevents anonymous users from even getting to the posting page. Apparently it doesn't stop direct links.

The best response to this would be to remove the second line from the comment text, the link to the posting page. This way, the only thing people can click on is the "View Comments" link. This way, when they want to reply, they click on the reply button on PhpBB, which generates the proper error page.
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby Chris » Tue Apr 26, 05 2:53pm

Further investigation makes it appear that the same error results when I go straight to the forum and attempt to reply to anything in the video downloads section too.

I'll have to look into this further.
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby YoungArmy » Sat Apr 30, 05 4:16am

The Problem is related to the comment script ... you should add a line to make sure if a user is logged in ... if not he should be referred to the login in the forum.

Do you know what lines have to be replaced.


Problem with the comment link @ artists comment link if option == com_content, I only know how to code saying what to do .. not what it should not do (means : don't know the code for except a certain ID) ... but that is not working here because after every news post a new id comes out.
YoungArmy
 

Postby YoungArmy » Sat Apr 30, 05 7:31am

ok done :) so that about timezones I'm already solving problems when you're still asleep :)
Just kidding.

the problem with the comment text persists , I don't know how to place an except id 4 line in the content.html.php.

CU
YoungArmy
 

Postby Chris » Tue May 3, 05 11:58pm

Sorry for the long wait time, but I've been sick and delusional. I heartily recommend visiting http://php.net for the very well done PHP manual.

I believe what you are looking for is
Code: Select all
if ( $optionvar == "com_content" && $idvar != 4 ) {
although you'd have to move the code to request the $idvar variable above the if line.

This could be repeated for anything else you wanted the comments not to show up on.

Also, you may need to put quotes around the 4, but I don't think you do. I haven't investigated fully.

As for the user stuff, that may be a few weeks out. I will probably wait until RC3 comes out for the component to see if he gets the logout issue fixed first. Then I want to make this into some sort of mambot/component thingy, but I may have to have my own alternate forum component (I hope not).
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby Bi4a » Thu May 19, 05 11:10am

everything works okey, except one thing. In my site i have not only news items, but also newsflash items. so this hack also wants me to comment on my newsflash items. but i want it to comment only main news items, not newsflash.
i think you understand.
thanks, great mod!
Bi4a
 

Postby Chris » Thu May 19, 05 9:08pm

Much like Young Army, in the post directly above yours, you can edit the conditions in which the comments link is added. I'm not sure what the id or itemid is for newsflashes, but when you find it, just change
Code: Select all
if ( $optionvar == "com_content" && $idvar != 4 ) {

Replace $idvar!=4 with $whatever!=whatever number.

Does that make sense?

You just have to figure out what category, id, or itemid represents newsflashes.
I'm the Chris Boylan who runs Chris Boylan dot com. So there.
User avatar
Chris
Site Admin
Site Admin
 
Posts: 312
Joined: Tue Nov 18, 03 1:56am
Location: Gillette, NJ

Postby Bi4a » Fri May 20, 05 10:08am

hm seems like i get it. i'll try it now!
Bi4a
 

PreviousNext

Return to Comments for Chris Boylan .com articles

Who is online

Users browsing this forum: No registered users and 0 guests

cron