Add ReplyNew TopicNew Poll

 Default Photo
#
Hello!

Don't know if this exist, but I put the topic here cause I couldn't find anything about it.

I use the personal photo feature on my site, but would like to have a default photo (like default avatar) for people who haven't uploaded a photo yet.

I found the no photo macro, but I guess that's for posts?

Thanks in advance!
PM
#
The no photo macro, I think, was for profile cards that were phased out but I could be wrong. Anyway, I have a pretty simple fall back for this. What size do you use for the photos on your site / can you link the image you want to use as default?

signature
user posted image
#
owl
Alright :/ I kind of figured as much ):
The size I use is 400x400 pixels, I haven't created one yet, so I've just been using PlaceHold.It
PM
#
<div style="height: 400px; width: 400px; overflow: hidden; text-align: center; color: transparent; background: url('PLACE HOLDER IMAGE HERE')"><!-- |photo| --></div>

That should work. What it does it create an empty looking div with your placeholder as the background image. Once someone uploads the image it fills up the div, covering the placeholder image and so it works like a simple default code. Hope it helps. ^^

signature
user posted image
#
owl
Ah yes! Of course! Why didn't I think of that? Haha!
Thanks for the help, friend! Much appreciated!
PM
#
Oh, nice, I'm glad to see it worked! I'm sure you would have figured it out eventually, but I'm happy to have been of assistance. Good luck with your forum.^^

signature
user posted image
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feature Requests | Next Newest »

Options Add ReplyNew TopicNew Poll