Results 1 to 5 of 5

Thread: Added YouTube / GitHub / Steam to user profile

  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts

    Added YouTube / GitHub / Steam to user profile

    Hey all,

    you can now add your YouTube / GitHub / Steam profile links to your user account. I had to add some regexes to prevent the input against XSS attacks, so this is what I came up with:

    Code:
    ^(http|https)://(www.)?(youtube.com|youtu.be)/((c|channel|user)/)?(\+?)[a-zA-Z0-9_\-]+(/)?
    
    http://youtube.com/YourGooglePlusName
    http://youtube.com/+YourGooglePlusName
    http://youtu.be/+YourGooglePlusName
    https://youtube.com/c/KilltubeOrg
    http://youtube.com/c/KilltubeOrg/
    https://www.youtube.com/c/KilltubeOrg
    https://www.youtube.com/channel/UCVuQk8dOOnP3NATrK_N4yHQ
    
    
    ^(http|https)://(www.)?steamcommunity.com/(id|profiles)/[a-zA-Z0-9_\-]+(/)?
    
    https://steamcommunity.com/id/kungfoo_man123/
    http://steamcommunity.com/id/kungfoo_man123/
    https://www.steamcommunity.com/id/kungfoo_man123
    http://www.steamcommunity.com/id/kungfoo_man123/
    http://steamcommunity.com/profiles/NUMBERS_GO_HERE
    
    ^(http|https)://(www.)?github.com/[a-zA-Z0-9_\-]+(/)?
    
    https://github.com/kungfooman/
    http://www.github.com/kungfooman-asd
    Great site for testing: http://www.phpliveregex.com/

    If any valid link might not work, please tell me.

    Are the any other sites which you wanna add to your profile?

    Random ideas welcome aswell.

    Edit #1: Added youtu.be, G+, and Steam /profiles/
    timescale 0.01

  2. The Following 5 Users Say Thank You to kung foo man For This Useful Post:

    guiismiti (21st June 2016),serthy (21st June 2016),voron00 (21st June 2016),Whiskas (21st June 2016),YuriJurek (21st June 2016)

  3. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Please add steamcommunity.com/profiles/NUMBERS_GO_HERE [optional slash]
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (21st June 2016)

  5. #3
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Thanks

    to YoutTube: you can also have a link one without any /c/ or /user/ dir in the URL (when you have a unique G+ url): http://youtube.com/YourGooglePlusName
    , but its not that important
    Last edited by serthy; 21st June 2016 at 12:47.

  6. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (21st June 2016)

  7. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    youtu.be anyone?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  8. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (21st June 2016)

  9. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Thanks ^^ Added all variations now
    timescale 0.01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •