Welcome, Guest. Please login or register.
Did you miss your activation email?
14 May 2008, 12:05

Login with username, password and session length
Home Chat Help Search Calendar Login Register
Pages: [1]
Print
Author Topic: [Solved] Comments Mod & Calendar...  (Read 158 times)
0 Members and 1 Guest are viewing this topic.
sarah_h
Forum Member
*

Karma: 1
Offline Offline

Posts: 132


« on: 27 Mar 2008, 15:23 »

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 Edit: 28 Mar 2008, 03:01 by sarah_h » Logged
Pages: [1]
Print
Jump to: