Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Hello, I would like to list/show all the usernames following a certain user (the author of a post). I want to hook into your plugin data from the content-single.php that creates every post. How can I achieve this? Specifically, I found the functions that I would need to tie into in your /wpdiscuz/includes/class.WpdiscuzDBManager.php:
public function getUserFollowers($userEmail) // returns users that follow userEmail from followUsers table
I know I can use something similar to your /utils/layouts/follows/follows-page.php to display the usernames. But how can I tie into this table to retrieve the data from outside your plugin?
Also, I want to be about to use the follower (bell symbol) on the same content-single.php, so that other users can follow the author (and subscribe to their comments). I know I can use this from class.WpdiscuzDBManager.php:
public function addNewFollow($args) // adds new follower into followUsers table
and this from class.WpdiscuzWalker.php:
$commentOutput .= '<div class="wc-comment-author ' . $uNameClasses . '">' . $user['authorName'] . '</div>';
if ($args['can_user_follow'] && $args['current_user_email'] != $comment->comment_author_email) {
if (is_array($args['user_follows']) && in_array($comment->comment_author_email, $args['user_follows'])) {
$followClass = 'wc-unfollow wc-follow-active';
$followTip = $this->optionsSerialized->phrases['wc_unfollow_user'];
} else {
$followClass = 'wc-follow';
$followTip = $this->optionsSerialized->phrases['wc_follow_user'];
}
$commentOutput .= '<div class="wc-follow-link wpd-tooltip-right wc_not_clicked ' . $followClass . '">';
$commentOutput .= '<i class="fas fa-rss" aria-hidden="true"></i>';
$commentOutput .= '<wpdtip>' . $followTip . '</wpdtip>';
$commentOutput .= '</div>';
}
Any help is appreciated. I really like your plugin setup and want to take advantage of the functionality and data.
Thanks!