sijad Flarum Spoiler Alert Spoiler Alert BBCode for Flarum. Installation Run following command via SSH while you're in Flarum root folder: composer require sijad/flarum-ext-spoiler-alert Usage [SPOILER]Content To Hide[/SPOILER]
sijad Note in case you already installed old extension, you need disable and remove that using following command before installing this one. composer remove sijad/flarum-spoiler
Kulga sijad Yep, can't "unblur" a mediaembed imgur image. Should note that urls are blurred until you click on them, but this also loads the link. Probably not a good thing ?
wignu Thanks for updating this sijad , one request - wouldit be possible to have an admin option to have the spoiled text/image either blurred or, as with your previous version, removed? Also is it possible to have a title for the spoiled code?
Cheun These are the type of spoilers that I love <3 Blurr to make a blind person having a hard time, have an even harder time.
JoshyPHP @sijad For future reference, if you add a title for the spoiler I recommend naming the bbcode parameter explicitely in the definition, e.g. [SPOILER title={TEXT2}]{TEXT}[/SPOILER]. If you don't name it, it'll be called spoiler. The value will be available in the template either as @title wherever XPath is expected or as {TEXT2} anywhere else.
wignu sijad wignu you mean title? Yes with the title, the ability to hide whatever's spoilt completely and just have a default spoiled label if no title is set ?. Be great if it was possible thanks.
JoshyPHP @sijad The spoiler markup currently uses a span element. It prevents it from hosting a block element like a quote or code block, or an embedded video with a responsive div wrapper. Have you thought about using a div element, perhaps with display: inline-block? This is related to that post.
sijad JoshyPHP thanks for informing me. do you think it's ok? sijad/flarum-ext-spoiler-alertd238f43 I'm not sure about display: inline-block, because other elements (like <p> tags) are display: block;, and it prevents displaying spoiler inline with other elements any way, what do you think?
JoshyPHP You're right about p and div. If you change it to a div I think it'll break the current paragraph. The best solution might be to have different BBCodes for inline spoilers and block spoilers.
jordanjay29 JoshyPHP Maybe add in the original click-to-show implementation for block-style spoilers? Makes sense you'd want to hide large items like quotes and codes, but keep inline content "hidden" just behind a blur.
sijad JoshyPHP The best solution might be to have different BBCodes for inline spoilers and block spoilers. don't you think there might be a better solution? this may confuse users