[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
    lol, yeah you really need a pic. How about this one? I don't think so since the image's URL isn't based on the username.

    Attached Files:

    • cpt.png
      cpt.png
      File size:
      11 KB
      Views:
      10
    stormingkiwi likes this.
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    It's based on the username's ID though.

    For example, your profile URL is: https://forums.uberent.com/members/lavasnake.1943593/
    Your image URL is: https://forums.uberent.com/data/avatars/l/1943/1943593.jpg

    The hard part is how to find that ID, given a username, or alternatively, how to get the user's profile page without an ID, then scrape it for the image.

    Edit: What you could do is formulate a user search URL, which will re-direct to the user's profile, then scrape that
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Yeah, that's what I was saying, just in less words. I looked into this before when updating my mod and couldn't figure it out. It would be great if someone from Uber would help us on this but it's not that big of a deal.
  4. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Have a look at the code behind The member's page, to see what happens when you click Find Member: https://forums.uberent.com/members/

    That redirects to the users' profile page if it's a valid user, so you could use that to get the page, then either get the ID from the URL or scrape the HTML for the image.

    Edit: Got It.
    https://forums.uberent.com/members/?username=<username>
    https://forums.uberent.com/members/?username=LavaSnake

    Then get $(".avatarScalar") - under this there's an <a> tag, with a <img> tag under that - this is the profile image.
    You could also split the returned URL to get the ID number of the user. I'd have to look up how to do that though.
    Last edited: February 24, 2014
  5. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    SWEET! Thanks a ton and update coming soon.
    cptconundrum likes this.
  6. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I'm not sure how steam login works. Do steam users have an uber id also?
  7. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    And done. Thanks a ton for figuring that out!
  8. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    hm, good question. I guess I'll just wait for a steam user to tell me it's not working and then figure it out.
    cptconundrum likes this.
  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    I think the scraper needs work. :)
    I got this:
    Code:
    https://forums.uberent.com/data/avatars/l/1943/..--></a>                    <div class.jpg
    when I click on the profile pic to see the url it found.
  10. mishtakashi

    mishtakashi Active Member

    Messages:
    369
    Likes Received:
    217
    I like it the way it is atm tbh but if you want extra things to do you could try this:

    I just had a think in response to your question and thought the more competitive people might like a plug in for their ranking on the ladder. They can get gratification every time they log into PA :p or be sad b/c they went down the ladder maybe.
    LavaSnake and Quitch like this.
  11. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Oh joy, bug fixes coming soon.
  12. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    So maybe add an option to embed the PA Ladder sig pic in the main menu? That would be quite easy...
  13. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    @raevn could you tell me what function you use to get the player's username? The one I use gets the lower case version which I can't use for getting the PA Ladder sig pic like mishtakashi suggested. Thanks!
  14. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    The bug is now fixed (I think) but I won't release it until I'm done with adding mishtakashi's suggestion which should be done as soon as raevn replies to the above post.
  15. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Actually, I figured it out. This is all fixed now and the new version is out.

    Thanks for the suggestion and bug report!
  16. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    What about this?
    13683715911096782163captain-icon-md.png
  17. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    I don't know, it doesn't have the "conundrum" part.
  18. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    13683715911096782163captain-icon-md_2.png
    emraldis, LavaSnake and zaphodx like this.
  19. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    How do you like the update to this mod? Any suggestions?
  20. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    The link to the image is still showing up as https://forums.uberent.com/data/avatars/l/..--/..--><.jpg

    I fixed it but just putting it in manually. Can you make the background transparent so that the back shows through if our image uses transparency? Maybe it should just be an option in case there are people that rely on the background color to make their images look right on the forum.

Share This Page