MyBB Community Forums

Full Version: Default Profile İmage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I installed this mod: http://mods.mybb.com/view/profile-image

it works perfectly BUT how can i make default profile image for users?

thank you already Smile
You will have to use either template conditionals or create a plugin that will show default image when the user didn't upload any!
Here, in the plugin file, at line no. near about 324:

IF($userimg != ""){
$img_prof = $userimg;
eval("\$img_table = \"".$templates->get("usercp_prof_img")."\";"); 
}

make it:

IF($userimg == ""){
$userimg = $someimgreference; // Set your default image reference here
}
$img_prof = $userimg;
eval("\$img_table = \"".$templates->get("usercp_prof_img")."\";");

Follow the comment and set your default reference.
(2014-03-01, 07:24 PM)effone Wrote: [ -> ]
IF($userimg == ""){
$userimg = $someimgreference; // Set your default image reference here
}
$img_prof = $userimg;
eval("\$img_table = \"".$templates->get("usercp_prof_img")."\";");



thank you so much, but how can i set default image?
images/sample.jpg
IF($userimg == ""){
$userimg = "uploads/imgprofile/default.jpg"; // Default image reference placed
}
$img_prof = $userimg;
eval("\$img_table = \"".$templates->get("usercp_prof_img")."\";"); 

... and upload the default.jpg under "uploads/imgprofile".
I appreciate. Thank you Smile