Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Spoiler MyCode
#1
I have updated my spoiler bbcode to MyBB 1.8, and just want to announce it's availability on the new mods site .

I've also updated it to look better with the new default MyBB theme, as well as making it easier to expand/collapse the spoilers by clicking anywhere on the title row.

Enjoy!~
Reply
#2
Great, thank you very much for this plugin.

It works fine in Firefox but the +/- effect is not appearing in chrome. Possible bug? Please check attachment for screenshot.


Attached Files Thumbnail(s)
   
[Image: MO3HXYH.jpg]
Reply
#3
Thank you, but it's better to use another regexp to support not only the English languge in descriptions. Something like this:

$pattern = array("#\[spoiler=(?:"|\"|')?(.*?)[\"']?(?:"|\"|')?\](.*?)\[\/spoiler\](\r\n?|\n?)#si", "#\[spoiler\](.*?)\[\/spoiler\](\r\n?|\n?)#si");
Reply
#4
(2014-09-13, 09:16 AM)ThePanda Wrote: Great, thank you very much for this plugin.

It works fine in Firefox but the +/- effect is not appearing in chrome. Possible bug? Please check attachment for screenshot.

It works fine for me in Chrome; check your image path settings. Due to the way this plugin is coded with the javascripts, I believe it only pulls the min/max images from the images/ directory; if your theme uses a custom directory, simply drop collapse.png and collapse_collapsed.png into /images and you'll be fine.

[Image: JOAhlfa.png]




(2014-09-15, 12:26 AM)oji Wrote: Thank you, but it's better to use another regexp to support not only the English languge in descriptions. Something like this:




$pattern = array("#\[spoiler=(?:"|\"|')?(.*?)[\"']?(?:"|\"|')?\](.*?)\[\/spoiler\](\r\n?|\n?)#si", "#\[spoiler\](.*?)\[\/spoiler\](\r\n?|\n?)#si");


I will consider this for a future update, but seeing as I've only dealt with the English Language, I cannot guarantee proper support for non-english languages. If that regexp will work, I can include it in the next update. I'll likely see about custom theme support for this plugin, since I only run a single theme on my board.
Reply
#5
(2014-09-20, 10:49 PM)Sephiroth Wrote:
(2014-09-13, 09:16 AM)ThePanda Wrote: Great, thank you very much for this plugin.

It works fine in Firefox but the +/- effect is not appearing in chrome. Possible bug? Please check attachment for screenshot.

It works fine for me in Chrome; check your image path settings. Due to the way this plugin is coded with the javascripts, I believe it only pulls the min/max images from the images/ directory; if your theme uses a custom directory, simply drop collapse.png and collapse_collapsed.png into /images and you'll be fine.

Yes I'm using a custom theme. But the issue was not with the images.

The thing is that, the forum is in a "/forum" subdirectory.

In the plugin, I found that the

src="/images/collapse.png
src="/images/collapse_collapsed.png


So I replaced it with

src="forum/images/collapse.png
src="forum/images/collapse_collapsed.png


and now everything works fine. Thanks.  Big Grin
[Image: MO3HXYH.jpg]
Reply
#6
working great!
Reply
#7
(2014-09-21, 06:11 AM)ThePanda Wrote:
(2014-09-20, 10:49 PM)Sephiroth Wrote:
(2014-09-13, 09:16 AM)ThePanda Wrote: Great, thank you very much for this plugin.

It works fine in Firefox but the +/- effect is not appearing in chrome. Possible bug? Please check attachment for screenshot.

It works fine for me in Chrome; check your image path settings. Due to the way this plugin is coded with the javascripts, I believe it only pulls the min/max images from the images/ directory; if your theme uses a custom directory, simply drop collapse.png and collapse_collapsed.png into /images and you'll be fine.

Yes I'm using a custom theme. But the issue was not with the images.

The thing is that, the forum is in a "/forum" subdirectory.

In the plugin, I found that the


src="/images/collapse.png
src="/images/collapse_collapsed.png


So I replaced it with


src="forum/images/collapse.png
src="forum/images/collapse_collapsed.png


and now everything works fine. Thanks.  Big Grin

Actually the plugin should probably be edited to this path:

src="images/collapse.png"
Reply
#8
(2014-09-26, 03:56 AM)Eric J. Wrote:
(2014-09-21, 06:11 AM)ThePanda Wrote:
(2014-09-20, 10:49 PM)Sephiroth Wrote:
(2014-09-13, 09:16 AM)ThePanda Wrote: Great, thank you very much for this plugin.

It works fine in Firefox but the +/- effect is not appearing in chrome. Possible bug? Please check attachment for screenshot.

It works fine for me in Chrome; check your image path settings. Due to the way this plugin is coded with the javascripts, I believe it only pulls the min/max images from the images/ directory; if your theme uses a custom directory, simply drop collapse.png and collapse_collapsed.png into /images and you'll be fine.

Yes I'm using a custom theme. But the issue was not with the images.

The thing is that, the forum is in a "/forum" subdirectory.

In the plugin, I found that the



src="/images/collapse.png
src="/images/collapse_collapsed.png


So I replaced it with



src="forum/images/collapse.png
src="forum/images/collapse_collapsed.png


and now everything works fine. Thanks.  Big Grin

Actually the plugin should probably be edited to this path:


src="images/collapse.png"

Right, will fix that in the plugin itself. I run my board in the root directory, so I never caught that. Thanks.



e: Submitted new build to plugins site, labeled as Beta. If I get enough feedback from others with it, I'll bump it up to stable. Should contain fixes for non-english support in descriptions and non-root-directory forums. Still looking into getting theme image directory for the search/replace function inside of it so it can support boards with multiple themes.
Reply
#9
Works thanks!
Write in the description "no button", you need to manually write the code:

[spoiler]This is a spoiler[/spoiler]

And I could not understand why there is no button, and how to add a spoiler.

Please add a button to the text editor.
And add styles to the plugin, so no need to add code to each theme.

Thank you!
Reply
#10
Which CSS file is the CSS supposed to go in?

When you open a template, there are many CSS files to choose from. I am not technical, so I need exact instructions. Thank you.
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)