User Follower speci...
 
Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

User Follower specific question  

  RSS

wpwp2
(@wpwp2)
New Member
Joined: 1 year ago
Posts: 2
25/08/2019 2:22 am  

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!


Quote
Share:
Scroll to top