I have this thing to do:
I wish that the avatar of my forum users was not availabe to modifying and point to a specific url like this: http://myWebsite.com/avatars.php?uid=123 where uid is the user id from the forum..
thanks Chris, but I need exactly the inverse thing: I wish that the user must not be able to select a personal avatar, 'cause is took by default from an url as shown above;
for simply the thing: suppose that you have a folder into a website with a .png file with the name equal to the id: for example in this forum: mine will be 3220.png, your 11388.png, and the avatar is exactly it
You need a programmer. That function takes in the user record and returns avatar html. You can modify it to check for and use the user_id to build the avatar html. If you are not a programmer then you can post a request:
Yeah I am trying to modify /library/XenForo/Template/Helper/Core.php to allow remotely-linked avatars. And before someone says "Why would you ever need remotely linked avatars?" I am dealing with a corporate client who does not want to allow uploads PERIOD.
I created a Custom User Profile Field named 'avatarurl'. That was the easy part.
So I tried to code the "right" way and use the helper function helperUserFieldValue() but after 1 hour of trying cannot get any variation on this to work:
So then I resorted to $user['customFields']['avatarurl']. This works great, except for those few places where $user['customFields'] is not set and the best you can hope for is $user['custom_fields'] which is serialized data. I'd rather not have to try to unpack and parse a serialized string if I can help it.
P.S. I wouldn't know where to begin writing this as a Plugin. I figure I'll be lucky just to get this working as a code hack.