Replies
About the requirement number 1, we have actually changed the way users are able to comment. So you can just focus on requirements number 2 and 3.
Thanks in advance for your support!
Hello Brajesh and BuddyDev Team, hope you are doing great!
Here is a small update on our requirements – We would like some assistance regarding the next topics:
1. Unfortunately we think we were not specific enough with the previous resolved ticket that we opened ( Right now users can writte testimonial without being “friends”, but we were actually interested in make public users able to posts testimonials without being members at all).
Any public user just cannot submit a testimonial form properly, cause it seems to be just stuck.
We only made these changes on the code currently:
On the Child Theme functions.php:
/* CUSTOM - All users can write testimonials permission */ add_filter( 'bp_testimonial_user_can_write', 'custom_write_permission' ); function custom_write_permission( $can_write ) { $can_write = true; return $can_write; }
On the testimonial-loop.php, we changed the if conditional in order to display the bp_testimonials_post_form() to anyone except the owner of the profile.
<div class="u-testimonials"> <?php if ( bp_is_my_profile() ) : ?> <div class="error" id="message"> <?php printf( __( 'You must not write your own testimonials.', 'bp-user-testimonials' )); ?> </div> <?php else : bp_testimonials_post_form(); ?> <?php endif; ?>
We also modified the wordpress->settings->discussion and disabled “Comment author must fill out name and email” so it should allow public users to writte testimonials, However we would later maybe add a name and email fields to the testimonial form.
We appreciate any kind of support within this matter.
2. About our request to add rating stars to the testimonials, we have some idea of how to add “comment meta” to a testimonial comment right after it is posted. We found the function save_testimonial(), which seems to get the $testimonial_id so then we could do something like
add_comment_meta( $testimonial_id, 'rating', $_POST['rating'] );
The Post form will need to be modified in order to contain an input for star ratings. We would like to know if you think this could be a good solution or you could actually guide us through a better one?3. The final subject it is the way to “Display the meta data in the Wp dashboard”. As you already know we are able to see the testimonials in wp dashboard inside the edit panel of the “user testimonials” custom posts. We would like to ask you for some specific support to how could we display inside the comments panel all the meta fields that we could add to the testimonials (By default it is only showing Name, Web, and Comment message).
As always we are really grateful with the BuddyDev team work and support towards the plugin and these requests.
Thanks in advance for your help!- This reply was modified 4 weeks ago by
Ronald Story.
- This reply was modified 4 weeks ago by
Hello Team, hope you are doing great.
Just mentioning we just manage to add some fields in the front-end through the post-form.php, we still would appreciate your comments on the back-end side of the fields to be able to align our work to the user-testimonial plugin you developed.
As an example one of the extra custom fields we would like to add is for example: “Your rating”, this will be a star rating according to some subjects. We are planning to have some other fields that might be or not be public.
Thanks in advance!
- This reply was modified 1 month ago by
Ronald Story.
- This reply was modified 1 month ago by
Thank you Brajesh for your quick and on point answer! we really appreciate it.
We would open another ticket regarding another subject, but this one can be closed and marked as success.
- This reply was modified 1 month ago by
Ronald Story.
- This reply was modified 1 month ago by