autowakins
Forum Replies Created
-
Here:
http://wordpress.org/plugins/p3-profiler/The thing is, I’ve not started actively using myCred on that site, just activated it and created levels, points to match the levels and a few images to go along those ladder levels.
I’ll try giving more details later
Thanks for the quick response, Gabriel (always been fantastic).
Would you mind showing me how to create that restriction hook? Or show me a link to the tutorial.
Thanks
W.Hi,
Yes, I already have the gender field added, so let’s assume I know where the meta key information is stored, how do I incorporate the get_user_meta()function?
Is it anything like what’s written below:
add_filter( 'mycred_ranking_row', 'my_custom_ranking_rows', 10, 4 ); function my_custom_ranking_rows( $layout, $template, $row, $position ) { // Step 1. Prep $user_id = $row['user_id']; $balance = $row['creds']; // If balance is 1000 or higher with gender female use level 3 female image if ( $balance >= 1000 && gender = female) $icon = get_stylesheet_directory_uri() . '/images/level-3-female.png'; // If balance is 1000 or higher with gender male use level 3 male image if ( $balance >= 1000 && gender = male) $icon = get_stylesheet_directory_uri() . '/images/level-3-male.png'; // If balance is 100 or higher but less then 1000 with gender female use level 2 female image elseif ( $balance >= 100 && $balance < 1000 && gender = female) $icon = get_stylesheet_directory_uri() . '/images/level-2-female.png'; // All else with gender female use level 1 female else $icon = get_stylesheet_directory_uri() . '/images/level-1-female.png'; // All else with gender male use level 1 male image else $icon = get_stylesheet_directory_uri() . '/images/level-1-male.png'; // Add icon before the layout return '<img src="' . $icon . '" alt="" /> ' . $layout; }I think I get the logic, I just don’t know how to speak the php language (even if my life depended on it). Please check the above code and let me know how far away I am to crashing the entire php coding system 😛
Hi,
One last layer of complexity I’m struggling with on this code you wrote (which allows me to add additional images to the avatars of users based on their levels):
add_filter( 'mycred_ranking_row', 'my_custom_ranking_rows', 10, 4 ); function my_custom_ranking_rows( $layout, $template, $row, $position ) { // Step 1. Prep $user_id = $row['user_id']; $balance = $row['creds']; // If balance is 1000 or higher use level 3 image if ( $balance >= 1000 ) $icon = get_stylesheet_directory_uri() . '/images/level3.png'; // If balance is 100 or higher but less then 1000 use level 2 image elseif ( $balance >= 100 && $balance < 1000 ) $icon = get_stylesheet_directory_uri() . '/images/level2.png'; // All else use level 1 else $icon = get_stylesheet_directory_uri() . '/images/level1.png'; // Add icon before the layout return '<img src="' . $icon . '" alt="" /> ' . $layout; }How can I add different images to these users’ avatars also based on their genders AND levels? The one above is for levels only, but I’d like to have ladies and guys icon images differ a little.
Thanks in advance.
W.
Thanks a bunch!!!
I’ll go try it out.
Great! Thanks again for that.
Here’s are two more things I’d like to know that I think maybe a little bit complicated but would be fantastic if it were possible with this plugin.
First One:
How can I put an icon/badge alongside users’ avatars to represent their different levels? To further explain what I mean in the simplest possible form:Assuming all users can only progress through three(3) levels within the site (as they earn points); level 1 (beginner), level 2 (skilled) & level 3 (master). I’d like to have a unique icon that can be shown alongside users’ avatars that represent their current levels e.g beginner with a wooden hat, skilled with a metal hat & master with a golden hat. How can I do this?
Second One:
I’d like all users to be able to rate something on my site. However, I want their ratings to all be different based on a formular that references their current levels.Ok, let’s use the three(3) levels mentioned above as an example again. Assuming the formular is something like this:
Anyone's rating x user's level = actual ratinge.g a beginner (level 1) rates a picture with 8.5 stars. Hence the actual rating becomes 8.5 x 1 = 8.5stars
If a higher level user, say skilled (level 2), rates the same picture with even 6 stars, then this skilled user’s rating would amount to
6 x 2 = 12stars, which is better for the picture considering a higher levelled member voted. And so on like that…I just want to create a system where quality is prefered over quantity.
Thanks again.
W.
Epic plugin, epic response and an even more epic author!
SHank you vewy vewy much! I’ll go give it a go…
Any chance of us customizing the avatar to our tastes; say we wanted them round with borders, white padded edges etc. ??