Forum
Comments on Events App
Hello
Is it possible to add the comments app onto an event in events app?
I have a unique eventID to use to show comments, just not sure how to implement it to show on the event page.
Would it work like the blog comments?
perch_events_custom(array(
'filter' => 'eventID',
'match' => 'eq',
'value' => $membersEventId,
'template' => 'events/listing/event-detail.html'
));
Denise
Yes, that should work. Is it not working?
No It isn't.
I am not sure how to group comments for specific event.
Trying this ... bit don't even get a past to go into the system.
<?php
// get the event ref for the logged in user $membersEventRef = perch_member_get('eventRef'); // get the id of the event matching the eventRef $membersEventId = faroffice_epic_get_event_id_for_event_ref($membersEventRef); perch_events_custom(array( 'filter' => 'eventID', 'match' => 'eq', 'value' => $membersEventId, 'template' => 'events/listing/event-detail.html' ));
?>
<?php perch_comments_count(perch_get('eventID')); ?> comments.
I can get the comments working if I just do this to show comments but filtering with the eventID doesn't then work.?
<?php perch_comments('eventID'); perch_comments_form('exentID, ''); ?>
You're using
perch_get('eventID')
to geteventID
from the URL. DoeseventID
exist on the URL?No it doesn't. The eventID is pulled from the event info and member. So I only want comments assigned to one event
Tried something like this but the comment just appears on all events and is not unique.
<?php if (perch_member_logged_in()) {
// get the id of the event matching the eventRef $membersEventId = faroffice_epic_get_event_id_for_event_ref($membersEventRef);
// get the details for the events, currently the default template perch_events_custom(array( 'filter' => 'eventID', 'match' => 'eq', 'value' => $membersEventId, 'template' => 'events/listing/event-detail.html' ));
} ?>
perch_comments('eventID'); perch_comments_form('exentID', 'eventTitle'); ?>
Ok, so if you're not reading something off the URL (the GET request) don't use
perch_get()
.I think you probably want