Giter VIP home page Giter VIP logo

phpbb-ext-simple-spoiler's Introduction

About

Simple Spoiler BBCode extension for phpBB.

Build Status Latest Stable Version Code Quality Translation Progress License

Allows you to write [spoiler]text[/spoiler] or [spoiler title=title]text[/spoiler] and it will hide the content on anywhere that you can render BBCodes.

You can nest [spoiler] and write unicode titles in [spoiler title=title].

Features

  • BBCodes can be nested
  • Full Unicode support in title for the [spoiler title=] BBCode
  • It's easily extensible and customizable for new styles
  • HTML5 markup

Requirements

  • PHP 7.1.3 or greater
  • phpBB 3.3 or greater

Support

Donate

If you like or found my work useful and want to show some appreciation, you can consider supporting its development by giving a donation.

Donate with PayPal Donate with Stripe
Donate with PayPal Donate with Stripe

Installation

  • Download the latest release
  • Decompress the *.zip or *.tar.gz file
  • Copy the files and directories inside {PHPBB_ROOT}/ext/alfredoramos/simplespoiler/
  • Go to your Administration Control Panel > Customize > Manage extensions
  • Click on Enable and confirm

Preview

Nested spoilers

[spoiler title=Nested spoilers]First level
[spoiler title=«µǹï¢øð€»]Second level[/spoiler][/spoiler]

Spoiler title with emojis

[spoiler title=🇩🇪 🇲🇽 🇺🇸 Title with emojis 😁 🤗 🔱]Some text 🦏[/spoiler]

(Click to view in full size)

Configuration

To customize the look and feel:

  • Move into {PHPBB_ROOT}/ext/alfredoramos/simplespoiler/
  • Copy the styles/prosilver/ directory to styles/{STYLE}/
  • Edit the following files as needed
    • styles/{STYLE}/theme/css/style.css
    • styles/{STYLE}/theme/css/colors.css

Note: If your style doesn't inherit from prosilver, you should follow the steps above even if you don't want to change any file.

Uninstallation

  • Go to your Administration Control Panel > Customize > Manage extensions
  • Click on Disable and confirm
  • Go back to Manage extensions > Simple Spoiler > Delete data and confirm

Upgrade

  • Go to your Administration Control Panel > Customize > Manage extensions
  • Click on Disable and confirm
  • Delete all the files inside {PHPBB_ROOT}/ext/alfredoramos/simplespoiler/
  • Download the new version
  • Upload the new files inside {PHPBB_ROOT}/ext/alfredoramos/simplespoiler/
  • Enable the extension again

Credits

File eye-invisible.svg is a modified version of 1F441.svg from Emoji One Legacy which is licensed under CC BY-SA 4.0.

phpbb-ext-simple-spoiler's People

Contributors

alfredoramos avatar alhitary avatar dependabot[bot] avatar github-actions[bot] avatar joshyphp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

phpbb-ext-simple-spoiler's Issues

Spoiler mass action

It seems to be a good idea to make mass spoiler opening/closing. I made a simple solution for the mass action for all spoilers on page by CTRL+click any spoiler header. It works fine with recent Chromium and almost fine with recent Firefox (CTRL also provokes current message selection, selection provokes phpbb-ext "Modern quote" to react). I'm not sure it will work fine everywhere. Maybe making a separate button for this would be better.

spoiler.js.patch.zip

Extension broken after updating to phpBB 3.2.7

After updating to phpBB 3.2.7, your extension is broken: The spoiler tags are no longer displayed as spoilers. How it is displayed:
not_working_spoiler_tags
How it should look like:
how_it_should_be

I tried with your extension version 1.3.0 final and 1.3.1-beta (May 20, 2019).

The problem seems to be caused by vendor/s9e/text-formatter, the only phpBB part which contains the word "spoiler" in some of its files. After reverting the s9e folder to the one from phpBB 3.2.5, your extension works again normally.

French Translation

Hey there !

This is not an issue but I don't want to fork for only 4 lines :)
I just want to propose you a French (fr) translation for your extension. :)

$lang = array_merge($lang, [
	'SPOILER'			=> 'Spoiler',
	'SPOILER_HELPLINE'	=> 'Utilisation : [spoiler]texte[/spoiler] ou [spoiler=titre]texte[/spoiler]',
	'SPOILER_SHOW'		=> 'Afficher',
	'SPOILER_HIDE'		=> 'Cacher'
]);

I keep the word "Spoiler" as I don't think we have any other word for that expression.

Doesn't work in Chrome on Android

Hi again,
the extension doesn't work when the forum is accessed via Chrome or the default browser on Android as new as Android 6.0. Nothing happens when the show button is pressed. However it works perfectly with Firefox on Android and the desktop version of Chrome.

German Translation

Hi,
I did a german translation (de and de_x_sie) of your extension for my forum. I thought you might wanna have it:

$lang = array_merge($lang, [
	'SPOILER'			=> 'Spoiler',
	'SPOILER_HELPLINE'	=> 'Verwendung: [spoiler]Text[/spoiler] oder [spoiler=title]Text[/spoiler]',
	'SPOILER_SHOW'		=> 'Anzeigen',
	'SPOILER_HIDE'		=> 'Ausblenden'
]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.