Simple Spoiler BBCode

How do I replace the eye icon with text - Simple Spoiler BBCode

How do I replace the eye icon with text

by Zinnn » Tue Jul 21, 2020 6:20 pm

Hi

I'd like to replace the eye icon with simple Show / Hide text

How do i do that?

Thanks!
Zinnn
Registered User
Posts: 42
Joined: Sun Apr 21, 2019 8:14 am
Contact:

Re: How do I replace the eye icon with text

by AbaddonOrmuz » Tue Jul 21, 2020 7:59 pm

Hi,

I removed that option in previous versions to reduce JavaScript code, so currently it's not something that could be done within the extension settings.

I'll evaluate the option to add back that feature.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 985
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: How do I replace the eye icon with text

by Zinnn » Tue Jul 21, 2020 8:22 pm

Thank you for such a quick reply. In this case could you advise me how could I replace the svg files: both for open eye and crossed out? I'd like to slightly tweak it, so the iris is in the middle (vertically). Sorry for being a pain, thank you for the great extension!
Zinnn
Registered User
Posts: 42
Joined: Sun Apr 21, 2019 8:14 am
Contact:

Re: How do I replace the eye icon with text

by AbaddonOrmuz » Tue Jul 21, 2020 9:17 pm

Zinnn wrote: In this case could you advise me how could I replace the svg files: both for open eye and crossed out?
Do you mean the button icon for ABBC3? I only use an SVG file for the button in the posting box for ABBC3.

If you mean the icon with red or green background, that's a FontAwesome icon.
Zinnn wrote: I'd like to slightly tweak it, so the iris is in the middle (vertically)
That's centered vertically on my end.

Image

Could you please share the following information:

- phpBB version
- Extension version
- Web browser name and version
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 985
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: How do I replace the eye icon with text

by Zinnn » Tue Jul 21, 2020 10:21 pm

Oh no no, I should've been more clear. I work as a designer, and like to tweak icons to my liking. So What I want to do is to redesign those two current icons. I know you source one from FontAwesome and the other one is in the extension's folders...

So what I want to ask you is help me find where/how do I tweak the code, so I can paste url to my SVG file that will replace FontAwesome icon. I've found the location of the view-hide.svg already.

In case this is needed:
AbaddonOrmuz wrote:- phpBB version
- Extension version
- Web browser name and version
3.3.0
2.1.0
Firefox latest
Zinnn
Registered User
Posts: 42
Joined: Sun Apr 21, 2019 8:14 am
Contact:

Re: How do I replace the eye icon with text

by AbaddonOrmuz » Thu Jul 23, 2020 4:11 am

Currently the extension is tightly integrated with FontAwesome, the spoiler in posts won't show in any way the SVG file included.

If you want to replace that with a custom SVG image, you will need to modify the BBCode template, CSS and JavaScript files.

BBCode template: ext/alfredoramos/simplespoiler/styles/all/template/spoiler.xsl
CSS (.spoiler-status, .spoiler-status > .icon):
  • ext/alfredoramos/simplespoiler/styles/all/theme/css/common.css
  • ext/alfredoramos/simplespoiler/styles/prosilver/theme/css/style.css
  • ext/alfredoramos/simplespoiler/styles/prosilver/theme/css/colors.css
JavaScript (fa-eye and fa-eye-slash): ext/alfredoramos/simplespoiler/styles/all/theme/js/spoiler.js

Just note that I do not provide support for modified versions of my extensions, because it could be hard if not impossible to fix if something breaks between those modifications.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 985
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact: