I'm looking for a way to attribute a comment to the logged in Front End User - I have CGFeedback hooked up to CGBlog on an extranet site, so ALL users will be logged in. Rather than have then fill in more fields, I'd like to pull in the user's information, both for display on the site and for admin purposes (tracking of comments). Ideally I would capture 'firstname', 'lastname' (which could be combined into a 'Name' field, but sin't necessary) and 'email'. The client doesn't want the comments system to be anonymous, but we don't want to rely on them to provide the information.
I'm sure this has been answered somewhere, but my searches haven't turned up anything useful so far. I'm running the latest version of the CMS, CGBlog and CGFeedback - it's a new site under development.
Attribute CGFeedback comments to logged in FEUser [SOLVED]
Attribute CGFeedback comments to logged in FEUser [SOLVED]
Last edited by tophers on Thu Jul 18, 2013 3:41 pm, edited 1 time in total.
Re: Attribute CGFeedback comments to logged in FEUser
I believe that the CustomContent module provides the means to extract that data from the logged in user.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Attribute CGFeedback comments to logged in FEUser
This is not difficult.
You can use the methods/plugins from FEU/CustomContent to popuplate the author and email fields of the CGFeedback comment form.
You could then make these fields read only, or hidden... but not disabled.
You can use the methods/plugins from FEU/CustomContent to popuplate the author and email fields of the CGFeedback comment form.
You could then make these fields read only, or hidden... but not disabled.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Attribute CGFeedback comments to logged in FEUser
That's what I was thinking - here's what I have working now:
In conjunction with this:
Does this seem like the best solution? Or have I overly complicated matters?
Code: Select all
{capture assign='author_name'}{ccUser::property('firstname')} {ccUser::property('lastname')}{/capture}
{capture assign='author_email'}{ccUser::property('email')}{/capture}Code: Select all
{* Assign FEU info to Comment *}
<input type="hidden" name="{$actionid}author_name" value="{$author_name}"/>
<input type="hidden" name="{$actionid}author_email"value="{$author_email}"/>
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Attribute CGFeedback comments to logged in FEUser
that's what I would do, unless I could find a way to not use 'capture' (it's very slow).
{$author_email=ccuser::get_property('email')} would be better.
or
<input type="hidden" name="{$actionid}author_name" value="{ccuser::get_property('firstname')} {ccuser::get_property('lastname')}"/>
<input type="hidden" name="{$actionid}author_email" value="{ccuser::get_property('email')}"/>
{$author_email=ccuser::get_property('email')} would be better.
or
<input type="hidden" name="{$actionid}author_name" value="{ccuser::get_property('firstname')} {ccuser::get_property('lastname')}"/>
<input type="hidden" name="{$actionid}author_email" value="{ccuser::get_property('email')}"/>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


