Comments Plug-in: Allow attachments

By gversion - December 21, 2011

Hi guys,

I have three questions about the Comments Plug-in that I'd be grateful for some help with:

1. Can I allow users that haven't logged in to post comments?

2. How can I allow users to attach a file to their comments?

3. How can I only allow the user that created the web page/blog post, to view the comments?

As always, thanks for your help!

Regards,
Greg

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: [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/