To answer your questions:
Where?
any where in your theme that you would like to show the rank or title, that is where.
How?
the plugins FAQ show’s exactly what you need to do in order to use it, the only thing i mistakenly assumed was known to every is that $user_id is something that needs to be in the scope and assigned.
Little example :
Say you have a multi-author blog with Author profie page and you want to display the author’s rank and Score then you add to your theme’s author.php file this code:
<?php
//first get the authors data beacuse you need the ID
if(isset($_GET['author_name'])) {
$curauth = get_userdatabylogin($author_name);
}else{
$curauth = get_userdata(intval($author));
}
//then use the plugins class and pass the current author ID
$baur_plugin = new baur_Plugin();
$user_rank = $baur_plugin->ba_get_user_points($curauth->ID,true);
echo "Rank: ". $user_rank['title'] . "Score: " . $user_rank['points'];
?>
Hope this helps , and if you have more specific question feel free to ask instead of trashing someone Else’s hard work.
Hi,
I’ve got troubles getting this plug working….I use wp 3.1.1
First, there’s an extra character at the biginning of the baur.php file, only appear in the wordpress online editor (output a header error)
Then, after deleting this character, I’v got warnings on publishing or editing a post :
Warning: Missing argument 2 for baur_Plugin::clear_user_post_ranks() in /homepages/13/d191175333/htdocs/wp-content/plugins/bainternet-user-ranks/baur.class.php on line 257
Warning: Missing argument 3 for baur_Plugin::clear_user_post_ranks() in /homepages/13/d191175333/htdocs/wp-content/plugins/bainternet-user-ranks/baur.class.php on line 257
Warning: Missing argument 2 for baur_Plugin::clear_user_post_ranks() in /homepages/13/d191175333/htdocs/wp-content/plugins/bainternet-user-ranks/baur.class.php on line 257
Warning: Missing argument 3 for baur_Plugin::clear_user_post_ranks() in /homepages/13/d191175333/htdocs/wp-content/plugins/bainternet-user-ranks/baur.class.php on line 257
Warning: Cannot modify header information – headers already sent by (output started at /homepages/13/d191175333/htdocs/wp-content/plugins/bainternet-user-ranks/baur.class.php:257) in /homepages/13/d191175333/htdocs/wp-includes/pluggable.php on line 897
I’ve try to look into the database if something was written but get nothing
(SELECT * FROM wp_usermeta
WHERE meta_key = “ba_ur”)
thanks !
@nuagedelait: Thanks, the extra characters were due to wrong file encoding and was fixed in version 1.1.0
please update and try again.
as for the other warnings “Missing argument … ” , what php version does your sever have?
@nuagedelait: fixed “Missing argument … ” warnings in 1.2.0
thanks.