[REL] ProfilePic+ [72996]

Discussion in 'Released Mods' started by LavaSnake, November 5, 2013.

  1. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    I know. Still waiting for that data from Quitch, I'm honestly quite interested as to what is causing it to mess up.
  2. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Sorry, had to wait for the SSL fix and it didn't come before sleep :)

    https://forums.uberent.com/undefined

    Did it actually run a check at all? After I ran the reset command it looks like it simply slapped the undefined string on the end of the URL.
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    That's javascript's way of saying it can't find your image. Let me run a couple of tests and see what's wrong.
  4. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Ok, I figured it out. Quitch, you have security settings in place so only people who are logged in can view your profile. (Try logging out and going to https://forums.uberent.com/members/?username=quitch to see what I mean.) The error page that it gives my code as a result doesn't have your profile pic (obviously) so the javascript just throws a temper tantrum and drops the "undefined" into the URL. I've made yet another update that will now handle that and just asks the user to provide the URL.
    Quitch likes this.
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    You should still be able to find it though. Searching for "Quitch" ( https://forums.uberent.com/members/?username=Quitch ) brings me to this url:
    https://forums.uberent.com/members/quitch.1759989/
    So that gets you his forum id. The picture is then
    https://forums.uberent.com/data/avatars/l/1759/1759989.jpg
    No need to be logged in for that.

    No need for HTML parsing either that way. :)
  6. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    The issue is I couldn't find a way to get the url you were redirected to for that. The XML HTTP request only returns the HTML of the error page so I can't really do much.
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    I'm not at home right now so I can't test it right now, but would this work?:
    Code:
    var userurl = xhr.getResponseHeader('Location');
    Apparently it's server dependent, so just guessing here really. :)
  8. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    hm, I think I'll still with the current system since it's a little more dependable than a server-specific method and works fine for all results.
  9. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    There is no profile pic in the lobby in gamma. Good bye mod. :(
  10. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    On the contrary; this mod has more purpose than ever!
    cptconundrum likes this.
  11. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    True. all he has to do is add it in himself instead of change an existing picture.
  12. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Yep, update is coming soon!
    evilOlive and cptconundrum like this.
  13. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    So, I've decided to completely rebuild this mod to not only be a lot more useful, but also to make use of some of the epic frameworks and other goodies that have been made since this mod was first made. Here's a little preview of what I have planned:
    • The name: Profile Pic +
    • The main feature: Adds your Uber forums or other profile pic to the main menu just above your user name.
    • The bonus feature: Allows you to add ladder, tracking, or other pics to the bottom of the menu to add stuff like PA Stats Ladder to the main menu. Also supports raw HTML so you can add WHATEVER YOU WANT!
    • The selling point (although I'm not selling this): Customizable to the death.
    Any suggestions? I'm hoping to finish this over the weekend but I may not end up having the time so be prepared to wait an extra week and weekend.
    Quitch likes this.
  14. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
  15. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Done! :D It looks really great now and should work better than ever. Be sure to check out the new screenshot in the first post.
    Quitch likes this.
  16. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    This is how it looks to me.
    profilepic.jpg
  17. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Same, except still no profile pic.

    Also looks like it's messing up the font for both of us.

    EDIT: ran localStorage.removeItem("LProfilePic_URL") and it dropped the undefined bit, but still no profile pic or ladder stats. Font thing may be unrelated as I've seen it before.

    Attached Files:

  18. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    oops, thanks for catching that. I fixed it now so just reinstall it through PAMM.
  19. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    The font issue isn't related. The bug fix I just released for cpt should fix that too. But you still need to go into settings and manually set your profile pic since it can't get it from your account. It should have popped up a dialog explaining that.
  20. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    PAMM isn't showing the update BTW.

Share This Page