I just add widget support for this plugin:
`
add_action( ‘widgets_init’, ‘bp_profile_views_wdgt’ );
function bp_profile_views_wdgt() {
register_widget( ‘bp_profile_views’ );
}
class bp_profile_views extends WP_Widget
{
public function __construct()
{
$widget_details = array(
‘classname’ => ‘bp_profile_views’,
‘description’ => ‘BP user profile view count widget.’
);
parent::__construct( ‘bp_profile_views’, ‘BP Profile View Count’, $widget_details );
}
public function form( $instance ) {
// Backend Form
}
public function update( $new_instance, $old_instance ) {
return $new_instance;
}
public function widget( $args, $instance ) {
global $bv_views_log_model;
$displayed_user_id = bp_displayed_user_id();
$where = array(
‘member_id’ => $displayed_user_id,
);
$views = $bv_views_log_model->get( $where );
if( !empty( $views ) ) {
$views_count = count( $views );
?><span
class=”bv-view-count”><?php echo sprintf( _n( ‘%s Profile View’, ‘%s Profile Views’, $views_count, ‘buddy-views’ ), $views_count ); ?></span><?php
}
}
}’
]]>Hi thanks for creating this plug-in its great. But can you help me. I would like to show the count of views in between a certain div in my page. What would be the php hook to get this , or some other method.
Thanks for your help
]]>HI,
Can you please provide me with the CSS to hide the text on the profile pages of the view count?
Can you please let me know how to deactivate the notification feature?
Many Thanks!
Travis
Hi,
Nice plugin and I tested for two weeks.
That’s what’s really annoying is the situation that a user have to delete or to set the ‘read’ status for getting the notification hint away.
Sorry this isn’t useful. It would much easier for a user, if the hint would gone after mouse hovering.
Thanks.
]]>Hi,
it’s a great plugin but the status of the notification doesn’t change until the notification has been deleted.
Can you check this please?
]]>Hello,
I hava translated the plugin in french using poedit.
Howerver once installed, the plugin menu doesn’t show. look like it is not working…
Can you help please ?
best regards,
Hervé