Page 1 of 3 123 LastLast
Results 1 to 20 of 53

Thread: Suggestion: Superscript annotations

  1. #1
    死徒二十七祖 The Twenty Seven Dead Apostle Ancestors Counterguardian's Avatar
    Join Date
    Mar 2011
    Location
    Melbourne, Australia
    Age
    32
    Gender
    Male
    Posts
    3,097
    Blog Entries
    5

    Suggestion: Superscript annotations



    Is there a way we can implement superscript annotations like phonetics (such as the above) in forum text?


    It would be a pretty nifty feature to have for the translators and the bilinguals among us. And it would be nicely appropriate because Nasu likes to abuse it to hell and back.

  2. #2
    死徒二十七祖 The Twenty Seven Dead Apostle Ancestors Counterguardian's Avatar
    Join Date
    Mar 2011
    Location
    Melbourne, Australia
    Age
    32
    Gender
    Male
    Posts
    3,097
    Blog Entries
    5
    Bump.

  3. #3
    アルテミット・ソット Ultimate Thot Five_X's Avatar
    Join Date
    Mar 2011
    Location
    Ontariariario
    Age
    30
    Posts
    25,421
    Blog Entries
    36
    Could you just... type out something in Word/OpenOffice, then copy and paste it into the reply box?
    <NEW FIC!> Revolution #9: Somewhere out there, there's a universe in which your mistakes and failures never happened, and all you wished for is true. How hard would you fight to make that real?

    [11:20:46 AM] GlowStiks: lucina is supes attractive
    [12:40] Lace: lucina is amazing
    [12:40] Neir: lucina is pretty much flawless

  4. #4
    死徒二十七祖 The Twenty Seven Dead Apostle Ancestors Counterguardian's Avatar
    Join Date
    Mar 2011
    Location
    Melbourne, Australia
    Age
    32
    Gender
    Male
    Posts
    3,097
    Blog Entries
    5
    It doesn't work.

    好似这样(It ends up like this)

  5. #5
    アルテミット・ソット Ultimate Thot Five_X's Avatar
    Join Date
    Mar 2011
    Location
    Ontariariario
    Age
    30
    Posts
    25,421
    Blog Entries
    36
    Hm.
    <NEW FIC!> Revolution #9: Somewhere out there, there's a universe in which your mistakes and failures never happened, and all you wished for is true. How hard would you fight to make that real?

    [11:20:46 AM] GlowStiks: lucina is supes attractive
    [12:40] Lace: lucina is amazing
    [12:40] Neir: lucina is pretty much flawless

  6. #6
    dead Lianru's Avatar
    Join Date
    Aug 2011
    Location
    suffering
    Gender
    Female
    Posts
    10,401
    Blog Entries
    21
    You could type it in small font a line above?
    Now Loading...



    [15:09] <KnightTurtle> "I WILL NOT DIE FOR THE BEAUTY OF MATH. MATH IS MY SOUL AND BLOOD, MY PASSION. MATH IS WHAT KEEPS THE WORLD RIGHT. I WILL ON FOR THE BEAUTY OF NUMBER CRUNCHING, THE MIND NUMBING ABILITY OF CALCULUS, THE SOUL OF THE BARE BASICS OF ARITHMETIC"
    [21:21] <+EnigmaticFellow> we derive fun from integration

  7. #7
    死徒二十七祖 The Twenty Seven Dead Apostle Ancestors Counterguardian's Avatar
    Join Date
    Mar 2011
    Location
    Melbourne, Australia
    Age
    32
    Gender
    Male
    Posts
    3,097
    Blog Entries
    5
    That would be a workaround, but it would be a lot more trouble.

    Plus page formatting will most likely displace it.

  8. #8
    アルテミット・ソット Ultimate Thot Five_X's Avatar
    Join Date
    Mar 2011
    Location
    Ontariariario
    Age
    30
    Posts
    25,421
    Blog Entries
    36
    Like this
    Like this

    Mmmm... doesn't really work. Not enough difference between font sizes, I guess?

    <NEW FIC!> Revolution #9: Somewhere out there, there's a universe in which your mistakes and failures never happened, and all you wished for is true. How hard would you fight to make that real?

    [11:20:46 AM] GlowStiks: lucina is supes attractive
    [12:40] Lace: lucina is amazing
    [12:40] Neir: lucina is pretty much flawless

  9. #9
    死徒二十七祖 The Twenty Seven Dead Apostle Ancestors Counterguardian's Avatar
    Join Date
    Mar 2011
    Location
    Melbourne, Australia
    Age
    32
    Gender
    Male
    Posts
    3,097
    Blog Entries
    5
    Bumping again. =[

  10. #10
    dead Lianru's Avatar
    Join Date
    Aug 2011
    Location
    suffering
    Gender
    Female
    Posts
    10,401
    Blog Entries
    21
    :|
    Admins have been busy for the past month, it seems.
    Now Loading...



    [15:09] <KnightTurtle> "I WILL NOT DIE FOR THE BEAUTY OF MATH. MATH IS MY SOUL AND BLOOD, MY PASSION. MATH IS WHAT KEEPS THE WORLD RIGHT. I WILL ON FOR THE BEAUTY OF NUMBER CRUNCHING, THE MIND NUMBING ABILITY OF CALCULUS, THE SOUL OF THE BARE BASICS OF ARITHMETIC"
    [21:21] <+EnigmaticFellow> we derive fun from integration

  11. #11
    Try using tables? It's an even bigger pain in the ass but it works
    Code:
    [07:55:59] <Spinach> Take off your clothes Kirby
    [07:56:07] <Kirby> I'm in class
    
    [20:37:34] <Lian|phone> there is a such thing as lingerie for guys?
    [20:37:54] <Kyokushi> yea
    [20:37:57] <Kyokushi> they're called jockstraps
    [20:38:02] <Lian|phone> :o
    [20:38:07] * Lian|phone googles
    [20:38:10] <Kyokushi> NO
    [20:38:11] <Kyokushi> DON'T
    [20:40:07] <Lian|phone> okay
    [20:40:16] <Lian|phone> I don't think I should have googled that
    
    [12:59:30]  <Spinach> call me onii-chan, bitch
    [13:00:12]  <kroyo> imma fuck ur shit up onii-fam

  12. #12
    dead Lianru's Avatar
    Join Date
    Aug 2011
    Location
    suffering
    Gender
    Female
    Posts
    10,401
    Blog Entries
    21
    I am the bone of my sword
    此身为剑而生

    Works....kinda.
    Now Loading...



    [15:09] <KnightTurtle> "I WILL NOT DIE FOR THE BEAUTY OF MATH. MATH IS MY SOUL AND BLOOD, MY PASSION. MATH IS WHAT KEEPS THE WORLD RIGHT. I WILL ON FOR THE BEAUTY OF NUMBER CRUNCHING, THE MIND NUMBING ABILITY OF CALCULUS, THE SOUL OF THE BARE BASICS OF ARITHMETIC"
    [21:21] <+EnigmaticFellow> we derive fun from integration

  13. #13
    Fuckin' chicken grill!!! Kotonoha's Avatar
    Join Date
    Mar 2011
    Posts
    29,299
    Blog Entries
    25
    此身为剑而生(I am the bone of my sword)

    ...is what people do when rubytext is not possible, so yeah

  14. #14
    僕はね、ヒマワリになりたかったんだ mewarmo990's Avatar
    Join Date
    Mar 2011
    Location
    Space Battleship Aoko
    Posts
    15,734
    JP Friend Code
    お林
    Blog Entries
    46
    AHHHHHHH SIMPLIFIED PROLETARIAT CHARACTERS

  15. #15
    屍鬼 Ghoul Dreadnought's Avatar
    Join Date
    Dec 2011
    Location
    The Netherlands
    Gender
    Male
    Posts
    21
    Pretty much been lurking around the boards for a while, decided to register up just for this.

    This should actually be solvable quite easily with the use of a custom BBtag.
    Ie something like this:
    Code:
    option
    value
    Would end up:
    option
    value
    But with more styling of course.

    Replacement would be the following html code (though needs a bit of tweaking really, this is just a really quick 'n dirty option).
    Code:
    <div style="display: inline-block;">
    <div style="display: block; text-align: center; font-size: 8px; line-height: 0.7;">option</div>
    <div style="display: block; text-align: center; font-size: 10px; line-height: 1;">value</div>
    </div>
    I'm not sure if people around these parts are all 'zomg must be webstandards compliant and backwards compatible all the way to IE6!'.
    If that's the case, attaching classes instead for these divs will make it easier for styling purposes really.
    You could then use conditional comments to make IE6/IE7 load up a different stylesheet overwriting the default values so those work too.
    You'd be looking at a display:inline combined with zoom:1 option to make them properly use a display:inline-block.

    Line-height and font-size settings can be fiddled with until it sort-of looks fine on most browsers, but I think this would be the result you guys are after.

    Preview image of above code:

    or with longer value:

    or with longer option:


    It might get a bit more complicated if one of the two has to get specific, user-defined, colors though.
    I'm not too sure how VB would respond having a tag inside the option of another, probably wouldn't work.
    Question would be though: is that necessary?

    Hope this helps things along anyway.

  16. #16
    アルテミット・ソット Ultimate Thot Five_X's Avatar
    Join Date
    Mar 2011
    Location
    Ontariariario
    Age
    30
    Posts
    25,421
    Blog Entries
    36
    ARE YOU A WIZARD?
    <NEW FIC!> Revolution #9: Somewhere out there, there's a universe in which your mistakes and failures never happened, and all you wished for is true. How hard would you fight to make that real?

    [11:20:46 AM] GlowStiks: lucina is supes attractive
    [12:40] Lace: lucina is amazing
    [12:40] Neir: lucina is pretty much flawless

  17. #17
    dead Lianru's Avatar
    Join Date
    Aug 2011
    Location
    suffering
    Gender
    Female
    Posts
    10,401
    Blog Entries
    21
    HE'S A CODER
    A MIRACLEWORKER
    COUNTERGUARDIAN WHERE ARE YOU
    Now Loading...



    [15:09] <KnightTurtle> "I WILL NOT DIE FOR THE BEAUTY OF MATH. MATH IS MY SOUL AND BLOOD, MY PASSION. MATH IS WHAT KEEPS THE WORLD RIGHT. I WILL ON FOR THE BEAUTY OF NUMBER CRUNCHING, THE MIND NUMBING ABILITY OF CALCULUS, THE SOUL OF THE BARE BASICS OF ARITHMETIC"
    [21:21] <+EnigmaticFellow> we derive fun from integration

  18. #18
    屍鬼 Ghoul Dreadnought's Avatar
    Join Date
    Dec 2011
    Location
    The Netherlands
    Gender
    Male
    Posts
    21
    Thanks, but.... not really, I'm not a wizard or a miracleworker or a coder. I'm a bit of an amateur at all this, but really... this is actually quite simple stuff for me still. I am definitely not a wizard at HTML/CSS/javascript/etc. I actually know just about enough to make one think that one knows it - kind of in the dangerous zone in a sense. I have no programming background either, didn't take any courses, etc. All my knowledge I have atm is basically selftaught in the span of ... a month? Maybe two? I really don't know that much about this stuff. =)

    And really, in all honesty, anyone that knows a lil' bit of HTML and has seen the admin-panel of a VB could've come up with that, really. Now if color-customization is also necessary on both parts, it gets a lot more annoying if not simply impossible to do with BBcode alone. You'd need two or even three variables whereas BBcode only supports one. One for defining the superscript, one for defining the color of said superscript, and quite possibly another for defining the color of the subscript. You probably would end up having to use javascript to manipulate the DOM to move the parts into the proper elements for styling purposes. While I do know just a tiny bit of raw javascript, it by far would not be enough for this type of thing. I'd probably end up grabbing the whole toolbox that is jQuery, a javascript framework which takes the headache out of javascript. Bit of a drag loading up that file just for something like this though, not really efficient. =D But with that, I could do something like this:
    Tag use:
    Code:
    User:
    
    #color1/#color2
    subscript(superscript)
    VB-Internal:
    option
    value
    Replacement:
    Code:
    <div class="rubybox">
    <div class="rubycolors">{OPTION}</div>
    <div class="rubytext">{VALUE}</div>
    </div>
    Wherein {OPTION} would be #color1/#color2.
    And {VALUE} would be subscript(superscript).
    Now jQuery to manipulate the DOM:
    Code:
    (function($){
        $(document).ready(function(){
    
        var color_top = "";
        var color_bottom = "";
        var text_top = "";
        var text_bottom = "";
    
        $(document).each(".rubybox",function(index){
    
            color_top = $(this).children(".rubycolors").html().split("/")[1];
            color_bottom = $(this).children(".rubycolors").html().split("/")[0];
            text_top = $(this).children(".rubytext").html().split("(")[1].split(")")[0];
            text_bottom = $(this).children(".rubytext").html().split("(")[0];
    
            $(this).children("div").remove();
            $(this).append($("<div></div>").addClass("rubytop").css("color", color_top).html(text_top));
            $(this).append($("<div></div>").addClass("rubybottom").css("color", color_bottom).html(text_bottom));
    
            });
        });
    })(jQuery);
    And accompanying CSS should be easy enough:
    Code:
    .rubybox { display: inline-block; }
    .rubytop { display: block; text-align: center; font-size: 8px; line-height: 0.7; }
    .rubybottom { display: block; text-align: center; font-size: 10px; line-height: 1.0; }
    All this is a bit over-kill for all intents and purposes though. =P

    Anyway, for the explanation. What the above script does, is scan the page for any instance where the ruby-text is used. It then jumps in, reads out the values and contents, removes that content and replaces it with what I've shown up above but using the colors the user would have supplied. So technically, if you wanted to have your superscript in red, and your subscript in black, it'd be:
    Code:
    #000/#F00
    subscript(superscript)
    I don't really think that this solution should be used though. It's really an ugly one, and if people start to spam instances of rubytext on a single page, it will slow down browsers a bit. Now with modern computers and all, it's not really that big a deal. However if suddenly there really are a lot of instances of it, even those will start to take a bit longer - to the point where you might even see the script replace these things. So all in all, I would not go for giving the option of specific colorization to the user. It causes too much overhead and over-complicates matters. The first solution I gave is sufficient really.


    If however - while using the first solution! -, you happen to already have colored a part of the text, it will of course inherit said color and apply it to both sections. That's kind of the nature of HTML anyway. The only drawback of this type of implementation is that it will lead to some spacing issues of course. If you use the rubytext mid-paragraph, it will force a bit more whitespace between its line and the one above it. Doubt it matters, but hey - it's a side-effect. Then again it beats the value(option) method of writing I suppose?

    ( Not sure why I gave the advanced solution now... pfftt... keep it at 'for the lulz' I guess. ¬_¬' )

  19. #19
    死徒二十七祖 The Twenty Seven Dead Apostle Ancestors Counterguardian's Avatar
    Join Date
    Mar 2011
    Location
    Melbourne, Australia
    Age
    32
    Gender
    Male
    Posts
    3,097
    Blog Entries
    5
    This is amazing!


    WE NEED THIS IMPLEMENTED. NOW!!!

  20. #20
    屍鬼 Ghoul Dreadnought's Avatar
    Join Date
    Dec 2011
    Location
    The Netherlands
    Gender
    Male
    Posts
    21
    Ehm... amazing? lol, ok... it took longer to type it out in a post than to actually come up with it.
    In all honesty, that first one is basically about 5 mins time spent, the other one is 5 mins stacked on top of the first.

    This really is just child's play, nothing special.

    If you got any other problems with regards to codes, I might be able to help out with those too.


Posting Permissions

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