[Solved] Comments Mod & Calendar...

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
sarah_h
Forum Members
Forum Members
Posts: 189
Joined: Tue Apr 25, 2006 8:30 am

[Solved] Comments Mod & Calendar...

Post 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.
Last edited by sarah_h on Fri Mar 28, 2008 8:01 am, edited 1 time in total.
sagedel
Forum Members
Forum Members
Posts: 20
Joined: Fri Aug 24, 2007 3:50 pm

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

Post by sagedel »

Any clue on how to accomplish this exact same thing with the Form Browser mod instead of Calendar?
Post Reply

Return to “CMSMS Core”