'
+ );
+ break;
+
+ case 2:
+ $retval = (
+ '
'
+ );
+ break;
+
+ case 1:
+ default:
+ $retval = (
+ '
'.
+ ''.$txt['spoiler_tag_text'].$topic.' '.$txt['spoiler_tag_hover_info'].' '.
+ ''
+ );
+ }
+ break;
+
+ case 'after':
+ switch($spoilerTagStyle)
+ {
+ case 3:
+ case 2:
+ $retval = (
+ '
'
+ );
+ break;
+
+ case 1:
+ default:
+ $retval = (
+ '
'
+ );
+
+ }
+ break;
+ }
+ return $retval;
+}
+
// The current time with offset.
function forum_time($use_user_offset = true, $timestamp = null)
@@ -1539,6 +1620,24 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
'before' => '
',
'after' => ' ',
),
+
+ array(
+ 'tag' => 'spoiler',
+ 'block_level' => true,
+ 'before' => build_spoiler('before'),
+ 'after' => build_spoiler('after'),
+ 'disabled_before' => '
',
+ 'disabled_after' => '
',
+ ),
+ array(
+ 'tag' => 'spoiler',
+ 'type' => 'unparsed_equals',
+ 'block_level' => true,
+ 'before' => build_spoiler('before', "$1"),
+ 'after' => build_spoiler('after'),
+ 'disabled_before' => '
',
+ 'disabled_after' => '
',
+ ),
array(
'tag' => 'table',
'before' => '
',
diff --git a/Themes/core/Settings.template.php b/Themes/core/Settings.template.php
index 2097ac8..dd13337 100644
--- a/Themes/core/Settings.template.php
+++ b/Themes/core/Settings.template.php
@@ -257,6 +257,19 @@ function template_settings()
'label' => $txt['hide_post_group'],
'description' => $txt['hide_post_group_desc'],
),
+
+ array(
+ 'id' => 'spoiler_style',
+ 'label' => $txt['spoiler_tag_label'],
+ 'description' => $txt['spoiler_tag_desc'],
+ 'options' => array(
+ 0 => $txt['spoiler_tag_default'],
+ 1 => $txt['spoiler_tag_onhoverovershow'],
+ 2 => $txt['spoiler_tag_onlinkclickshow'],
+ 3 => $txt['spoiler_tag_onbuttonclickshow'],
+ ),
+ 'type' => 'number',
+ ),
'',
array(
'id' => 'show_bbc',
diff --git a/Themes/core/css/index.css b/Themes/core/css/index.css
index 1e4817e..154347c 100644
--- a/Themes/core/css/index.css
+++ b/Themes/core/css/index.css
@@ -3552,4 +3552,41 @@ img#smflogo
.signature img, .signature object, .signature embed
{
display: none;
-}
\ No newline at end of file
+}
+fieldset.spoiler
+{
+ border: 1px dashed gray;
+}
+
+fieldset.spoiler > legend
+{
+ font-size: 1.2em;
+}
+
+div.spoilerheader a
+{
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+}
+
+div.spoilerheader input
+{
+ background-color: #cececc;
+ color: #3e3e33;
+ font: 0.9em sans-serif;
+}
+
+div.spoilerbody
+{
+ color: #0f0f0f;
+ border: 1px dotted gray;
+ padding: 1em;
+ margin: 1em;
+}
+
+fieldset.spoiler div.spoilerbody
+{
+ border: 0px;
+ padding: 0em;
+}
diff --git a/Themes/core/images/bbc/spoiler.gif b/Themes/core/images/bbc/spoiler.gif
new file mode 100644
index 0000000..b18b89c
Binary files /dev/null and b/Themes/core/images/bbc/spoiler.gif differ
diff --git a/Themes/default/Settings.template.php b/Themes/default/Settings.template.php
index 3147d0e..247cbc5 100644
--- a/Themes/default/Settings.template.php
+++ b/Themes/default/Settings.template.php
@@ -263,6 +263,19 @@ function template_settings()
'label' => $txt['hide_post_group'],
'description' => $txt['hide_post_group_desc'],
),
+
+ array(
+ 'id' => 'spoiler_style',
+ 'label' => $txt['spoiler_tag_label'],
+ 'description' => $txt['spoiler_tag_desc'],
+ 'options' => array(
+ 0 => $txt['spoiler_tag_default'],
+ 1 => $txt['spoiler_tag_onhoverovershow'],
+ 2 => $txt['spoiler_tag_onlinkclickshow'],
+ 3 => $txt['spoiler_tag_onbuttonclickshow'],
+ ),
+ 'type' => 'number',
+ ),
'',
array(
'id' => 'show_bbc',
diff --git a/Themes/default/css/index.css b/Themes/default/css/index.css
index 602a5d9..d439964 100644
--- a/Themes/default/css/index.css
+++ b/Themes/default/css/index.css
@@ -3649,4 +3649,41 @@ img#smflogo
.signature img, .signature object, .signature embed
{
display: none;
-}
\ No newline at end of file
+}
+fieldset.spoiler
+{
+ border: 1px dashed gray;
+}
+
+fieldset.spoiler > legend
+{
+ font-size: 1.2em;
+}
+
+div.spoilerheader a
+{
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+}
+
+div.spoilerheader input
+{
+ background-color: #cececc;
+ color: #3e3e33;
+ font: 0.9em sans-serif;
+}
+
+div.spoilerbody
+{
+ color: #0f0f0f;
+ border: 1px dotted gray;
+ padding: 1em;
+ margin: 1em;
+}
+
+fieldset.spoiler div.spoilerbody
+{
+ border: 0px;
+ padding: 0em;
+}
diff --git a/Themes/default/images/bbc/spoiler.gif b/Themes/default/images/bbc/spoiler.gif
new file mode 100644
index 0000000..b18b89c
Binary files /dev/null and b/Themes/default/images/bbc/spoiler.gif differ
diff --git a/Themes/default/languages/Help.english.php b/Themes/default/languages/Help.english.php
index 1fc5579..f73941e 100644
--- a/Themes/default/languages/Help.english.php
+++ b/Themes/default/languages/Help.english.php
@@ -601,4 +601,8 @@ $helptxt['custom_mask'] = 'The input mask is important for your forum\'s securit
More information and advanced techniques may be found on the internet.';
+
+// Spoiler Tag Mod
+$helptxt['defaultSpoilerStyle'] = 'Set this to change the default type of spoiler used on the forum.';
+
?>
\ No newline at end of file
diff --git a/Themes/default/languages/Modifications.english.php b/Themes/default/languages/Modifications.english.php
index c0f2f50..b5d6715 100644
--- a/Themes/default/languages/Modifications.english.php
+++ b/Themes/default/languages/Modifications.english.php
@@ -11,4 +11,25 @@ $txt['doublePostHelp'] = 'Time(in Days) before double posting is considered as a
$txt['doublePostAdmin_sub'] = 'Is set as in Days. Click on the "?" if you want more information. Leave Blank to prevent double posting always';
+
+// Spoiler Mod
+// BBC Strings
+$txt['bbc_spoiler'] = 'Insert Spoiler';
+
+// Post View Text
+$txt['spoiler_tag_text'] = 'Spoiler';
+$txt['spoiler_tag_click_info'] = '(click to show/hide)';
+$txt['spoiler_tag_hover_info'] = '(hover to show)';
+
+// Mod Settings
+$txt['defaultSpoilerStyle'] = 'Spoiler Mode';
+$txt['spoiler_tag_onhoverovershow'] = 'Show on Hover';
+$txt['spoiler_tag_onlinkclickshow'] = 'Show on Link Click';
+$txt['spoiler_tag_onbuttonclickshow'] = 'Show on Button Click';
+
+
+// Extra Settings String for per-theme selection
+$txt['spoiler_tag_label'] = 'Spoiler Mode';
+$txt['spoiler_tag_desc'] = 'Choose how spoilers will display on the theme.';
+$txt['spoiler_tag_default'] = '(use global default spoiler mode)';
?>
\ No newline at end of file