Fast Lane! Posted April 7, 2019 Posted April 7, 2019 I can see they are passed as a url encoded string, like follows: data:image/svg xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" style="background:#a462c4"><g><text text-anchor="middle" dy=".35em" x="512" y="512" fill="#ffffff" font-size="700" font-family="-apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif">M</text></g></svg> But I don't see this directly called out in the member data base table. Just if a member has a custom photo. Any ideas on how to query the database and construct these svg type profile (letter) photos? Thanks!!
opentype Posted April 7, 2019 Posted April 7, 2019 I’m not sure what you are trying to do. The function is generateLetterPhoto in /system/Member/Member.php if you want to look it up. But I don’t know why you want to query the database at all. Usually you just call the userPhoto template, which does everything for you.
bfarber Posted April 8, 2019 Posted April 8, 2019 <img src='{$member->photo}' alt='' referrerpolicy='origin-when-cross-origin'> The code you pasted can go directly in the src attribute and will be returned automatically if using letter photos. Alternatively, a custom profile photo URL will be returned if appropriate.
Fast Lane! Posted April 9, 2019 Author Posted April 9, 2019 On 4/7/2019 at 1:03 AM, opentype said: I’m not sure what you are trying to do. The function is generateLetterPhoto in /system/Member/Member.php if you want to look it up. But I don’t know why you want to query the database at all. Usually you just call the userPhoto template, which does everything for you. I'm updating a 3rd party external app that needs to play friendly with IPBs 4.4.x user database. I'll see what I can lift from that function.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.