Thanks shibuya246! Really liking this plugin!
Was trying to customize it:
Is it possible to add a follow link in the extra post field similar to Tweet This and Save Post?
I tried this and some other things... but could not get it to work:
PHP Code:
public function sb_base_show_post_extra_fields($h)
{
if ($h->currentUser->loggedIn && $h->vars['user']->name != $h->currentUser->name) {
// check if already following
$follow = $h->isFollowing($h->vars['user']->id);
if ($follow == 0) {
echo "<li><a href='" . $h->url(array('page'=>'follow', 'user'=>$h->vars['user']->name)) . "'>" . $h->lang['follow_follow_user'] . "</a></li>\n";
} else {
echo "<li><a href='" . $h->url(array('page'=>'unfollow', 'user'=>$h->vars['user']->name)) . "'>" . $h->lang['follow_unfollow_user'] . "</a></li>\n";
}
}
}
Bookmarks