Implemented [hide] tags

Discussion in 'Feedback & Assistance' started by Pinekaboo, Oct 31, 2012.

  1. Pinekaboo Chaser

    Joined:
    Feb 18, 2011
    Gender:
    Female
    1,389
    Since the move from vbulletin to Xenforo, I've noticed that the [quote=Makaze]I feel this would be a good addition because it doesn't provoke as much curiosity as the clickable spoiler and . It also allows someone to while the normal spoilers move things down onto the next line and are inconvenient for use in a sentence or paragraph.[/quote]
     
  2. Neku_Sakuraba Gummi Ship Junkie

    Joined:
    Sep 30, 2012
    Gender:
    Male
    Location:
    Houston, TX
    171
    350
    I agree!
     
  3. Plums Wakanda Forever

    Joined:
    Aug 21, 2009
    Gender:
    Male
    Location:
    Konoha
    4,346



    Yeah, the coding got changed. The [/B]now (remove asterisk)
     
  4. Pinekaboo Chaser

    Joined:
    Feb 18, 2011
    Gender:
    Female
    1,389
    The coding itself isn't the issue, but how it works. It used to be that you had to purposefully click and drag the cursor over the text in order to highlight it, but now just rolling over it with the cursor does, making it very easy to accidently view the spoiler.

    Fixing the problem should be very easy, since the original implementation was a custom BBCode with distinct HTML. The edit wouldn't have been done automatically. If the new one is specialized via an add-on, then that add-on is not what was requested. What was requested was the custom BBCode without the hover effect and without the newline, which is possible via this and perhaps a built-in BBCode framework if XenForo has one.
     
  5. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    The line break issue was unintentional, it should be fixed now. However, the hover effect is pretty typical of that style spoiler tags.
     
  6. Pinekaboo Chaser

    Joined:
    Feb 18, 2011
    Gender:
    Female
    1,389
    Thanks for fixing the line breaks, that was annoying me.

    About the hover issue, while it may be typical of the tag on other sites, it is still relevant. The other sites didn't ask for the same things we did, and the reason for the suggestion is still negated with the change.

    Because no public support was put forward for the change and the reasons that people originally voted for have been negated, a change back to the original suggestion still seems only fair.

    When the tags were suggested, Makaze referred to TVtropes, a very popular site that has a similar spoiler tag set-up, and doesn't have the hover feature.
    If you don't have a particular reason for why the original reasoning isn't important anymore other than that it seems unusual to you, it doesn't really make sense to ignore it.
     
  7. Chevalier Crystal Princess

    Joined:
    Jan 8, 2008
    Location:
    Trapped on an Island
    552


    Okay so let's see if this works...okay there we go. Sadly this code does not work on mobile devices. Neither hovering nor highlighting it works (on iOS devices at least)

    So I'm not sure it should be used on important things? Maybe recreationally but even then, those using devices other than a computer will have trouble using it, sadly.

    Doesn't really have much to do with the overall fixing of the code. Many things went wonky when Xenforo happened, but I figure it's worth mentioning.
     
  8. Pinekaboo Chaser

    Joined:
    Feb 18, 2011
    Gender:
    Female
    1,389
    Are you sure it's fixed? Rolling over it still highlights it for me. It's still easier to see than the button spoilers.
    Also, for the iOS-only and mobile device-only issues, this may help.

    EDIT: In light of the mobile problem Chev corrected himself on, mobile users will see a black block that they cannot unhide either way and have been seeing one throughout both versions. That makes the argument from mobile functionality void regardless of whether or not the link above can help, though I'm pretty sure it can.

    Since that's out of the way, it's back to the original reasoning (that it should be harder to see accidentally) over it seeming unusual.
     
  9. Boy Wonder Dark Phoenix in Training

    Joined:
    Aug 31, 2008
    Gender:
    Male
    Location:
    Genosha
    2,239
    So the problem is that instead of highlighting the spoiler to reveal it, hovering over it reveals it, correct? This wasn't always like that, if I remember, even if the
     
  10. Chevalier Crystal Princess

    Joined:
    Jan 8, 2008
    Location:
    Trapped on an Island
    552
    Just to clarify, I wasn't saying it was fixed. I was just trying it in a mobile device :x I'm not really stating if it should be fixed or not. Just noting that it does not work at all on mobile devices which could be problematic. It's not 'out of the way' but rather something that was a side-note.
     
  11. Arch Mana Knight

    Joined:
    Oct 5, 2007
    Gender:
    Male
    Location:
    Anywhere
    2,430
    So is anything about this being done? Has the line break problem been fixed? +1 for the highlight spoiler. ...Also, the [hidden*] tags don't do anything but break lines in the post preview. A lot of formatting issues pop up when previewing them it seems.

    Edit: FFFF- *Adds asterisk to tag*
     
  12. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    I was going to change it but with the hurricane cancelling a week of my classes, there's been a bit of a "let's shove everything into the weeks we have" mindset. Unfortunately natural disaster recovery & more important KHV site work comes before a minor bbcode annoyance. c;
     
  13. Makaze Some kind of mercenary

    Joined:
    Jan 22, 2011
    Location:
    The Matinée
    1,207
    Requesting an update on this, please!

    On top of the previous requests, I believe a change is a prudent move because the tag has a few bugs as it currently is. Taking from the first post, the code right now is this:
    Code:
    <span class="spoiler-hide" style="background-color: {1}; color: {1};"></span>
    Hovering over the hidden text in the first post turns the text white, but nothing else. This happens because there is no argument given in the first post, but it still tries to render without one.

    This only applies to the [HIDE=COLORVALUE][/HIDE] tag. It's clear from the way the post is rendering that this tag has neither been removed completely nor implemented correctly for XenForo. More on how to fix this below (Possibility 1).

    The [HIDDEN][/HIDDEN] tag works fine aside from using the hover instead of the select feature, as seen .

    In order to fill this request and solve these problems in one go, I think the following courses of action make the most sense:
    1. Remove the hover effect and instead force people to select the text. This fills the request and meets all of the criteria asked for in this thread. Additionally, the current hover setting uses white as the hover color on all themes which may become an issue later.
    2. Remove CSS rules specific to this code and instead use proper inline CSS without classes. Doing so will centralize the code for this tag and thereby clean up your templates.
    3. Remove the [HIDE] tag completely to avoid redundancy.
      • Possibility 1: Make the [HIDDEN] tag have a color value argument to replace the previous [HIDE] tag.

        e.g. [HIDDEN=#ff0000][/HIDDEN] (for red spoiler blocks)

        It should be possible to make a conditional statement so that if the tag is used without an argument, it defaults to black as it does right now.
      • Possibility 2: Ignore color options completely and have one static [HIDDEN] tag that defaults to black like the one staff created after the move.
    I prefer Possiblity 1 because it is more in line with what what was asked and voted for, if it is possible.

    Thank you for keeping it open this long.
     
    Last edited: Jun 24, 2014
  14. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    It's actually been my plan to gut the code altogether and redo it. XenForo's Custom BB Code system is vastly better than vBulletin's but I didn't really change the code at all when we moved (and it had problems from the start). I'd like to put together a less hacky solution that doesn't require both the hide & hidden tags, as well as one that doesn't rely on hovering (since that has mobile issues & it's easy to accidentally expose the spoiler). My plan was to do one similar to what they have on NeoGAF, but of course allowing custom colors to be used. So the suggestions are appreciated, it's already in the pipeline.
     
  15. Makaze Some kind of mercenary

    Joined:
    Jan 22, 2011
    Location:
    The Matinée
    1,207
    What is the one on NeoGAF like?

    I have a copy of XenForo 1.2 (I think it is) for personal development. If you would like, I can cut down on the load and try to code it for you or at least figure out a way to combine the tags into one. I have the free time and the knowledge. I will understand completely if you are not comfortable with that.
     
  16. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    First post I came across with a spoiler: http://www.neogaf.com/forum/showpost.php?p=118089767&postcount=23
    It's pretty similar to ours at first glance. Instead of hovering, you click on the spoiler and the background color disappears, exposing the text. You could also highlight it to show it but that's not really how it's designed to work.

    Won't be necessary but thanks for the offer. @libregkd recently became my code slave so if I can't find the time to do this I'll just ask him (provided he's willing I guess lol). I wasn't treating it with any kind of urgency but since you've brought it up & it's a pretty small task it can get done fairly quickly.
     
  17. Makaze Some kind of mercenary

    Joined:
    Jan 22, 2011
    Location:
    The Matinée
    1,207
    Ah, I see. That's interesting... It toggles back if you click again, which is nice.

    If you want it to work with mobile devices you'll have to use touch events as well as clicks. Bind to both 'click' and 'touchstart'.

    I'm looking forward to what you come up with. Good luck.[DOUBLEPOST=1403696100][/DOUBLEPOST]Update on the previous post... That's actually incorrect. My mistake. What happens on mobile devices is this:
    1. A touchstart event is fired.
    2. 300ms delay.
    3. A click event is fired in the same place the touchstart was fired.
    I doubt you'll have issues with this specific code so long as the only thing that changes is the background and foreground color, but it will be 300ms slower on mobiles. On the other hand, if you do what I said at face value it will fire normally and then toggle back after .3 seconds.

    The only way around that delay/self-canceling (that I know of) is to bind to both like I said and use event.preventDefault() to stop the click event from firing after the touchstart.

    Sorry for the bad advice before.
     
    Last edited: Jun 25, 2014
  18. Makaze Some kind of mercenary

    Joined:
    Jan 22, 2011
    Location:
    The Matinée
    1,207
    I noticed this was implemented! Thank you. I like what you did.

    There is an error on this page regarding bold. Unrelated, but probably a notable problem. Please take a look at the OP and see what is causing it.
     
    Last edited: Jul 17, 2014
  19. Misty gimme kiss

    Joined:
    Sep 25, 2006
    Gender:
    Cisgender Female
    Location:
    alderaan
    6,590
    Issue has been sorted now, thanks again to @libregkd. Here's the update details he gave me:
     
  20. Makaze Some kind of mercenary

    Joined:
    Jan 22, 2011
    Location:
    The Matinée
    1,207
    Thank you very much.

    Funny you mention it now. I just noticed a bug or two with the code.
    1. The click functionality does not work until the page has fully loaded.
    2. The click functionality does not work on dynamically inserted posts such as the 'latest posts' loaded when a new post is added to a thread.
    jQuery offers a way around both of these using the .on() function which can add a click handler to all selected elements, now or in the future.

    Use something like this to add a click handler to all instances of '.hidden', loaded initially or dynamically:
    Code:
    $(document).on("click", ".hidden", function() {
    	// do stuff
    });
    It will solve the initial loading problem as well if it is added to the page header instead of the footer.
     
    Last edited: Jul 20, 2014