Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Tapatalk Modification for vB3 - Issue with Avatar Icons
This post will be soon moved to the "Web Application" forum so our Tapatalk developer friends can follow an unresolved issue with regard to how the Tapatalk app fetches can caches avatar icons.
We start this process by creating a hook in the vB 3.8 tapatalk file get_online_users.php
This code works as expected, and in the screen shot above; we can see two online TT users.
(Note: There is also one "special system bot" user we created that is used to display system information to mods, but I will not describe that code in this post; it is discussed in this post).
Because this works so easily, I then decided to add icons for all users who do not have icons already (because they did not upload a custom avatar). We will do this for the. I created many different hooks and experimented in many different places (because there is an issue with the icons, as they are fetched and cached in the TT app)
Currently, I am using the vB 3 file: functions_user.php
and the hook is:
PHP Code:
// final case: didn't get an avatar, so use the fake one if (empty($userinfo['avatarurl']) AND $returnfakeavatar) // we never use this fake one, only the hook code below { $userinfo['avatarurl'] = $stylevar['imgdir_misc'] . '/unknown.gif'; }
OBTW, I also modify the function (used above) to send it the required $location parameter:
PHP Code:
function fetch_avatar_from_userinfo(&$userinfo, $thumb = false, $returnfakeavatar = true,$location= '')
This code basically says, fetch the avatar from the userinfo with an addition location parameter, and if there is no user avatar, replace with our custom avatar, one for various user groups, and if the user is not a member of any of those groups, show a default "UX" avatar, but if their location is "Using Tapatalk" then show a different TT icon.
Unfortunately, this does not work. You can see in the image above, two users are online via TT and the status message is correct, but the icon is not correct. We see the default "UX" icon and not the "TT" icon.
Also, FYI:
is called from the TT include file common.php
which is located in our modified function (with our optional agent param):
if($userinfo[avatarurl]){ $icon_url = get_icon_real_url($userinfo['avatarurl']); } else { $icon_url = ''; // this should never happen because we add default icons in the fetch_avatar_from_userinfo() function } }
I have tried placing the hooks in various locations, clearing the cache, restarting the app on the mobile phone, even restarting the phone. The logging info always shows that the icons are set correct by the code; but they do not display correctly.
So, I have concluded this is a pre-fetching or caching bug in the TT app that causes the avatar icons not to display properly. In this same screenshot, the icons are wrong for the two logged in TT users:
You can see that for two TT users, the correct TT default avatar is set, but it does not show correctly in the app. Clearing the cache, restarting the app and/or the phone does not fix the issue.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Update: This is very strange.
Without any notice TT upgraded their app to remove the user avatar from the "People" pages. Why they would do this, without coordinating with forum owners and admins, is beyond me to understand.
I guess that when TT has a bug in something and they cannot fix it, they just "remove it" without discussing it with forum admins?
Update: I worked many hours to debug this issue and then TT just deleted the feature from the app. It's a bit frustrating.. needless to say.
My frustration with Tapatalk continues. After reinstalling TT for the forums, I'm trying to tweet it so we can get a lot of benefit for forum members. TT has both a free version and a "Pro" version (which we pay for). I paid for the "Pro" version, and the first thing I noticed was that the app... (3 Replies)
Referring back to this thread:
Tapatalk Modification for vB3 - Issue with Avatar Icons
I mentioned that we had some "system bot" code:
In this post, I describe that code and how easy it is to create a "system bot" user for Tapatalk (TT):
Basically, its quite easy. We add a hook to... (0 Replies)
I have uploaded a small image, 64x64 and about 5k in size, that was about a week ago, I still do not see my image when I post, or maybe I just can't see it and others can? It helps me scroll through threads and find my own posts easier, but on this forum it either doesn't show up for me or is just... (1 Reply)
Discussion started by: raidzero
1 Replies
5. Post Here to Contact Site Administrators and Moderators
Hi,
I wanted to change my avatar, but I get the message
You may not upload animated images.
How come that this user has one?
https://www.unix.com/members/3394.html
https://www.unix.com/avatars/perderabo.gif
All users are equal, but some are more equal than other?
Thanks. (0 Replies)
Note the new feature on UNIX.COM, many thread at the bottom of the page have a new feature:
Similiar Threads
Here is an example on one of Perderabo's posts:
https://www.unix.com/showthread.php?t=16337
Kudos to the vB folks for this built-in feature!!
Neo (0 Replies)
Discussion started by: Neo
0 Replies
7. Post Here to Contact Site Administrators and Moderators