This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

setting name and avatar image via variable and hiding name field properly
#1

Thanks a ton - this is a fantastic tool with clearly a lot of effort put into it. I implemented it tonight and got it working very quickly. I have a couple of challenges that I'm not satisfied with after scrubbing the forum/faq, docs and google as much as I can and I'd like your help.

1. Like many I have @username available in my php. I can set it via cmtx_set_name_value. Is there a better/newer way?
2. On a related note, I no longed need the Name field. I've removed it via the div style display:none suggestion in form.php, but I'm not super happy with that since it could technically be manually overridden by someone inventive. I'd rather not have it submitted at all and not show up in the html at all. I'd rather have it passed via something like a post when the comment link is clicked and picked up on the backend. Is there a built-in clean way to do this with configuration variables or something more sustainable than modifying the code?
3. I also have a variable available with a url to an avatar image for all my users. I don't need gravatar at all. With the data available it looks like I could call a bogus gravatar url with my image as the default/failback, but that seems really sloppy. Is there a clean way to just set the avatar image to my variable and not involve gravatar at all? Again I'm hoping for a nice way via a variable I can set rather that hacking up the code.

Thanks again
Reply
#2

Hi perullo,

I'm glad you like the script, and thanks for your donation.

1. Setting the name using $cmtx_set_name_value is the only way.

2. You can then hide the name field in Layout -> Form -> States. This can not be overridden by someone inventive, as the form processor uses the $cmtx_set_name_value instead of anything from the $_POST. Also, the name field won't show up in the HTML at all.

3. You'll have to alter the code to use your own avatars. The code is in /comments/includes/functions/comments.php, lines 212 - 227.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by And
02-Mar-2021, 05:32 PM
Last Post by Steven
29-Jul-2020, 09:05 AM
Last Post by vkp
10-Jun-2017, 06:38 AM
Last Post by Steven
06-Feb-2014, 08:01 PM
Last Post by CommiC
27-Jun-2013, 11:08 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)