Site News BB Code Update - Dynamic Usernames & Hidden

Discussion in 'Community News & Projects' started by Misty, Jul 15, 2014.

  1. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    Over the last couple of weeks, @libregkd has been hard at work on these neat new BB Codes for y'all, according to user demand. We're happy to now deploy them on the site!

    Dynamic Usernames
    Back in April, @Ars Nova requested a BB Code to display a user's current username that would react to username changes. The first of our BB Codes today does just that. Here's how it works, using me as an example. My User ID is 6 -- you can tell from the link to my profile kh-vids.net/members/misty.6/.
    Code:
    Hi, my name is [USERID=6][/userid]!
    Outputs...
    Hi, my name is Misty!

    If I were to change my name to Cassie, it would update accordingly.

    Hidden
    We've had the hide/hidden tag for a long time now, but previous implementations had their issues, and it was split between two different tags (one that would just use a black highlight, and another that could be specified by the user). It's been completely re-written to work as just one tag.

    We have a standard spoiler tag for larger blocks of text, that works as such:
    Code:
    [spoiler]I'm a spoiler![/spoiler]
    I'm a spoiler!

    However, some users prefer to use an inline option, like so...
    Code:
    I can't believe that Darth Vader is [hidden]Luke's father[/hidden]!
    I can't believe that Darth Vader is !

    The spoiler will be revealed when you click the blacked out text, and it will hide again when you click a second time.

    The code is very flexible, allowing you to specify your own colors in a number of formats.

    Using .
    And .
    Code:
    Using [hidden=#A61DEC]hex codes[/hidden].
    And [hidden=crimson]HTML color names[/hidden].
    Please note that previously usage of the hide tag will now be broken -- we're running a big find & replace to update them to the new format. It should be completed shortly, but for now, be on the lookout for spoilers!
     
  2. Ars Nova Just a ghost.

    Joined:
    Nov 28, 2009
    Gender:
    hungry
    Location:
    Hell 71
    2,986
    YES. YES.
     
  3. Iskandar King of Conquerors

    Joined:
    May 7, 2011
    Gender:
    Male
    Location:
    Texas
    1,090
    Now everyone's going to be remembering the User ID of everyone instead of names. Excuse me while I grab my notebook
     
  4. Amaury Chaser

    Joined:
    Jan 15, 2007
    Gender:
    Male
    Location:
    Ellensburg, WA
    1,694
    I wonder. Is it possible to make this work with quotes?
     
  5. libregkd -

    Joined:
    Sep 30, 2006
    2,902
    They already do work.
     
  6. Amaury Chaser

    Joined:
    Jan 15, 2007
    Gender:
    Male
    Location:
    Ellensburg, WA
    1,694
    Ah.

    So if you changed your name to "libre," would the quote above update accordingly to "libre said"?
     
  7. libregkd -

    Joined:
    Sep 30, 2006
    2,902
    Oh I thought you were talking about bbcode specifically in quotes.

    No that is not possible as that is beyond the realm of implementing BBCode.
     
  8. DigitalAtlas Don't wake me from the dream.

    Joined:
    Oct 1, 2006
    Location:
    Blossom City
    2,335
    I love this site's coding. Get's better and better.

    Is there an easier way to get somone's user ID than tagging them, and going back in to edit the post and just removing the name between the code?
     
  9. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    imo the easiest way is to just check the URL to their profile. Yours, for example:

    http://kh-vids.net/members/digitalatlas.57085/

    So your User ID is 57085. In terms of code, you'd have to take that up with libregkd -- however, it can't really be based on usernames for obvious reasons.
     
  10. ShibuyaGato Transformation

    Joined:
    May 1, 2009
    Gender:
    Male
    4,065
    This is fantastic and makes the hidden code a lot more manageable -- particularly on mobile where you used to have to quote it to read it. Great additions in general! Thanks again libre.
     
  11. Technic☆Kitty Hmm

    Joined:
    Apr 2, 2010
    Gender:
    Male
    Location:
    Indiana, USA
    1,299
    If you're viewing a thread that they've posted in, just hover over their username and (if you're using Chrome) a bar at the bottom of the browser will display that users profile link. The ID will always be the digits after "Username." and before the final "/".

    So if you'd hover over my username you would see:

    Code:
    http://kh-vids.net/members/nights.44126/
    My ID is 44126.


    -Nights