Page 1 of 1

[Solved] Comments Mod & Calendar...

Posted: Thu Mar 27, 2008 8:23 pm
by sarah_h
Hi,

I've read through the comments module info and as far as I can see it should work like this (let's assume we're talking about the news module as per the info):
  • A user views news item A and adds a comment
    Another user views a different news item B and does not see the comments made for news item A
    Another user visits news item A and sees the comments mde by a previous user.
So any comments left are related to a particular news item. I think that's how it works? Makes sense to me.

Now, can this approach be done for the Calendar module? I've installed the comments mod (and the Calendar mod)  and added the call for the comments to a template like this:

{cms_module module='comments' modulename='Calendar' event_id=$entry->id}

Where event_id is the id for the calendar event that the comments mod should use.

I went to an event and added a comment. Great, it adds it to the DB.  A problem occurs when I visit a different event; I see the comment I added a minute ago for a different event. Is this how it should work? I don't think so and I think the problem is something to do with the template call and the event_id. Am I close?

I'll do some more digging in the morning. If anyone has any ideas I'd appriciate any pointers.

Sarah


Ok after some digging and experimenting, this is what I did to get the calendar module working with the comments module so that comments left by users only show on the event that they're supposed to i.e. the event on which the user left the comment.

Insert this into the calendar event detail template:

{cms_module module='comments' modulename='Calendar' number='5' pageid=$event.event_id}

pageid=$event.event_id was the bit I was missing and it simply supplies comments with the calendar event id so that a comment can be paired with the particular event.

Re: [Solved] Comments Mod & Calendar...

Posted: Tue Dec 23, 2008 6:49 pm
by sagedel
Any clue on how to accomplish this exact same thing with the Form Browser mod instead of Calendar?