Comments Plug-in: Allow attachments

Re: [gversion] Comments Plug-in: Allow attachments

By Jason - December 21, 2011

Hi Greg,

1 & 2 are not currently supported by the comments plugin. You can customize the plugin to handle this, but that functionality is not there by default. If you need help with the customization please email consulting@interactivetools.com and we can go over some options with you.

3 can be done with a simple if statement. You can determine if the currently logged in user created a post by comparing their user num to the createdByUserNum field of the record you are outputting. You can put in a check so that if this is true, execute the code that displays the comments.

For example:

<?php if (@$CURRENT_USER['num'] == $record['createdByUserNum']): ?>

<!-- DISPLAY COMMENTS -->
<?php
wsc_comments(array(
'tableOrTag' => 'samplePage', // Section these comments are associated with, such as: "articles", "blog", "about_us".
'recordNum' => $record['num'], // Record num these comments are associated with, such as: $record['num'] or 1
'themeName' => 'default', // HTML theme to display comments with, from /plugins/websiteComments/themes
'pageName' => $record['name'], // Page name displayed in comment notification emails, such as: $record['title'] or "Custom Text"
'pageUrl' => realurl($record['_link']), // Page URL displayed in comment notification emails, such as realurl($record['_link'])
));
?>
<!-- /DISPLAY COMMENTS -->

<?php endif ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Comments Plug-in: Allow attachments

By gversion - December 21, 2011

Hi Jason,

Thanks for the help, that's really useful.

Could item 1 not be handled with an if statement too?
So if the user is not logged in display the comments post form, else display the comments post form. Would that work?

I'll be in touch via the consulting service for the attachments.

Thanks again,
Greg

Re: [gversion] Comments Plug-in: Allow attachments

By Jason - December 21, 2011

Hi Greg,

Item 1 is a bit more complex because parts of the plugin operate assuming that a user is logged in. This can be done, but it does require customization of the plugin.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/