Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 9 Years, 1 Month ago Default Profile İmage
#1
Solved: 9 Years, 1 Month ago
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
#2
Solved: 9 Years, 1 Month ago
You will have to use either template conditionals or create a plugin that will show default image when the user didn't upload any!
#3
Solved: 9 Years, 1 Month ago
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.
#4
Solved: 9 Years, 1 Month ago
(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
#5
Solved: 9 Years, 1 Month ago
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".
#6
Solved: 9 Years, 1 Month ago
I appreciate. Thank you Smile
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)