Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2833)
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2833)
SimpleSpoiler
for SMF 2.0.x onlySimpleSpoiler is a simple modification that allow you to use the [spoiler] [/spoiler] tags.
-No settings, just install and use.
-Works with every theme, make sure you upload the spoiler.gif file to your theme's image/bbc folder
License* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
Languages-english
-english-utf8
-spanish_es
-spanish_es-utf8
-spanish_latin-utf8
-spanish_latin-utf8
-russian
-russian-utf8
-german
Support-Please use the support topic for questions.
Change log2.0- Remove jQuery, uses pure JavaScript now.
- Add support for DOM changes made by onQuickEdit
- Move JavaScript code to its own file.
-1.0.3-Compatible with SMF 2.0.x
-Fixed some minor errors with hooks.
-Added a remove file for manual installs.
-1.0.2-Added support for SMF 2.0
-Updated jquery and jqueryui scripts.
-1.0.1 2-02-2011 ~fixed a bug on unistalling.
~added a readme.txt
~added support for Russian thanks to Bugo.
-1.0 initial release.
Please provide English version demo.
Quote from: Baloch on January 29, 2011, 12:00:26 AM
Please provide English version demo.
why you need an english demo? the mod will look exactly the same... plus.... the demo is en english...
Russian translation.
I have installed this mod but could not see any change within my forum as well as I don't know how it works with smf? that's why I was interested to see its demo in English version.
what version of SMF are you using? this mod only works for RC4 since it uses a new hook only avaliable in RC4
theres no settings, you will see the bbc button and you will be able to use the [spoiler][/spoiler] tags.
the demo has som examples of how the mod looks like when it has been used:
http://oharascans.com/foro/mods/demo_simple_spoiler_mod_2609.0.html
@Bugo, thanks, I will add your translation when I make an update, the cus team has told me there's issues on uninstalling so I need to update it as soon as I can.
Nice example of the integration hooks! :D
I m totally unable to see any effect even in your demo.
My smf is 2.0 RC4 fresh installation on default theme.
I hv checked it in FIREFOX as well as IE 8
Now I want to uninstall this mod but nothing is happening to click on UNINSTALL BUTTON.
Please help me out to uninstall this mod.
Thanks in advance for your response.
you must have javascript enable on your browser to see the spoiler.
this script was tested on IE7, IE8, opera10, FF3.6 and chrome and it was tested by the customize team before it was approved
if you want to uninstall the mod, upload this file to your forum root directory (where SSI.php is) and call it with your browser
then, manually remove this files:
"Subs-SimpleSpoiler.php" from "./Sources".
SimpleSpoiler.english.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_latin.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_latin-utf8.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_es.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_es-utf8.php" from "./Themes/default/languages".
"spoiler.gif" from "./Themes/default/images/bbc".
Quote from: Masterd on January 31, 2011, 02:04:16 PM
Nice example of the integration hooks! :D
Yes, it's a good example. I even made my variant of spoiler mod, with the using of jQuery :) But I think it useless to send its to the modsite, because the Cust team'll say that there's already a lot of similar mods...
Quote from: Bugo on February 02, 2011, 12:01:31 PM
Quote from: Masterd on January 31, 2011, 02:04:16 PM
Nice example of the integration hooks! :D
Yes, it's a good example. I even made my variant of spoiler mod, with the using of jQuery :) But I think it useless to send its to the modsite, because the Cust team'll say that there's already a lot of similar mods...
as long as your mod provides different options and features than the rest of spoiler mods you can submit it to the mod site.
How do I use things like "Name (Show)"
[spoiler=Name] doesn't work.
doesn't work because it isn't supported and I don't plan to supported it either.
thats why its called simple, no settings, no problems.
there are other spoiler mods that can do what you want.
Then I'll try to modify the code myself.
Quote from: Miss All Sunday on February 02, 2011, 10:47:17 AM
you must have javascript enable on your browser to see the spoiler.
this script was tested on IE7, IE8, opera10, FF3.6 and chrome and it was tested by the customize team before it was approved
if you want to uninstall the mod, upload this file to your forum root directory (where SSI.php is) and call it with your browser
then, manually remove this files:
"Subs-SimpleSpoiler.php" from "./Sources".
SimpleSpoiler.english.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_latin.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_latin-utf8.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_es.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_es-utf8.php" from "./Themes/default/languages".
"spoiler.gif" from "./Themes/default/images/bbc".
Done as per your instructions but its still listed in my Package List
Quote from: Simple Series team on February 02, 2011, 01:57:48 PM
Then I'll try to modify the code myself.
You can do that with the $1, but there is a lot of work to do.
@Baloch the mod is now uninstlled from your forum, just remove the SimpleSpoiler.zip file from your Packages folder.
@Masterd and Simple Series team
SMF already does what you want it will be $2 instead of $1, $1 is the content of the spoiler, $2 is the name, check the code in subs.php for the [code][/code] tag, you can also see how motoko's spoiler works
ok I have updated this mod, heres the changelog:
Change log
-1.0.1 2-02-2011
~fixed a bug on unistalling.
~added a readme.txt
~added support for Russian thanks to Bugo.
You are useing an outdated version of jQuery.
Find this in Subs-SimpleSpoiler.php.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
Replace with this.
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
I'm using it because that's the version I tested the spoiler with, I won't do any changes until I tested it properly.
and thank you, but I already know how to make changes to my own file :)
Quote from: Miss All Sunday on February 06, 2011, 07:34:48 PM
and thank you, but I already know how to make changes to my own file :)
I know that. ;)
You cannot use the code on remote pages :(
It says (in PHP):
Fatal error: Call to undefined function JavaScriptEscape()
Not trying to use your code for public use but I was just testing :P
of course it won't work... you just copy/paste the javascript...
SMF uses a function to properly handle text inside javascript: JavaScriptEscape
javascript code ' . JavaScriptEscape($txt['my_javascript_string']) . ' javascript code
since that function isn't in your external files, php gives you that error.
Quote from: Miss All Sunday on February 07, 2011, 08:37:15 AM
of course it won't work... you just copy/paste the javascript...
SMF uses a function to properly handle text inside javascript: JavaScriptEscape
javascript code ' . JavaScriptEscape($txt['my_javascript_string']) . ' javascript code
since that function isn't in your external files, php gives you that error.
I did not copy/paste it. I must carefully change it because the code of MAP3 is not quite complex.
Again, I am not gonna use your code.
if your not gonna use it, why bother to post?
just because you don't have any idea of what you're doing, doesn't mean the code don't work.
the mod works in any SMF 2.0 RC4 installation.
Quote from: Miss All Sunday on February 07, 2011, 09:08:05 AM
if your not gonna use it, why bother to post?
just because you don't have any idea of what you're doing, doesn't mean the code don't work.
the mod works in any SMF 2.0 RC4 installation.
I mean, I am not gonna use the code in my products.
Hello,
Thanks for creating this mod. We are having the following errors show up in our error log. Is this a problem with the mod or with our theme?
Quote
Guest
218.29.97.249
Today at 06:48:51 PM
session 891d5d8ca1f99c4cc3124dc1a9c2781b
Type of error: General
http://www.teamlethal-cs.com/newforum/index.php?
2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
File: /nfs/c01/h15/mnt/4650/domains/teamlethal-cs.com/html/newforum/Themes/default/languages/SimpleSpoiler.english.php (main sub template - eval?)
Line: 290
Guest
218.29.97.249
Today at 06:48:51 PM
session 891d5d8ca1f99c4cc3124dc1a9c2781b
Type of error: Undefined
http://www.teamlethal-cs.com/newforum/index.php?
8: Undefined variable: user_info
Apply Filter: Only show the errors from this file
File: /nfs/c01/h15/mnt/4650/domains/teamlethal-cs.com/html/newforum/Themes/default/languages/SimpleSpoiler.english.php (main sub template - eval?)
Line: 290
Any help is appreciated. Thanks! :)
can you please tun off the eval in your admin panel, then clean your error log, browse your forum and check again your error log, post the new errors.
the SimpleSpoiler.language.php file is very small I doubt the problem is there, by turning off the eval we'll see where the error is exactly.
You were right, it is the theme. Thanks for the help! ;D
Quote
Guest
IP address 99.30.3.158
Today at 07:10:32 PM
session b46641c7fe11abfbf8b6db38eb20ab56
Type of error: General
http://www.teamlethal-cs.com/newforum/index.php?
2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
File: /nfs/c01/h15/mnt/4650/domains/teamlethal-cs.com/html/newforum/Themes/lagusta_20rc4/BoardIndex.template.php
Line: 290
please open a new support topic in the appropriate board and attach your Themes/lagusta_20rc4/BoardIndex.template.php there as well as post the error.
Already have ;)
Quote from: Miss All Sunday on February 02, 2011, 10:47:17 AM
you must have javascript enable on your browser to see the spoiler.
this script was tested on IE7, IE8, opera10, FF3.6 and chrome and it was tested by the customize team before it was approved
if you want to uninstall the mod, upload this file to your forum root directory (where SSI.php is) and call it with your browser
then, manually remove this files:
"Subs-SimpleSpoiler.php" from "./Sources".
SimpleSpoiler.english.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_latin.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_latin-utf8.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_es.php" from "./Themes/default/languages".
"SimpleSpoiler.spanish_es-utf8.php" from "./Themes/default/languages".
"spoiler.gif" from "./Themes/default/images/bbc".
I need to get this uninstalled. Each time I click to download the file I get this:
QuoteTemporarily Unavailable
Due to high stress on the server the forum is temporarily unavailable. Please try again later.
Looks as if it has been downloaded 10 times? Not true. That is from me clicking it to try and download it.
PLEASE fix this...I need to get it uninstalled.
I could not get the mod removed, no matter what I tried...but
I did it my way and it is now gone....totally.
I went and got a new copy of simple spoiler, and overwrote. It then allowed to to uninstall it the ''normal'' way.
I did check files to make sure they were gone, and they are.
Happy now..
this site has been under some attacks lately, I can't do nothing about it, if you want to uninstall, grap a copy of the mod, unzip it and grap the uninstall file from there.
you were using the old version of the mod, the ond with the uninstall bug, the new version fix that bug.
Hi Miss All Sunday,
You will do an update of the mod for the RC5 of the SMF 2.0?
Thank you in advance!
I'm working on it, but the mod works just fine if you install it by emulating version RC4 :)
After quick edit content of spoiler isn't showned.
Removing the divs from the Subs-SimpleSpoiler.php make it better readable :)
$codes[] = array(
'tag' => 'spoiler',
'before' => '<div><span>' . $txt['spoiler_desc'] . '</span><div class="spoiler_toggle">',
'after' => '</div></div>',
'block_level' => true,
);
to
$codes[] = array(
'tag' => 'spoiler',
'before' => '<span>' . '</span><div class="spoiler_toggle">',
'after' => '</div>',
'block_level' => true,
);
Quote from: Miss All Sunday on February 16, 2011, 10:54:56 AM
I'm working on it, but the mod works just fine if you install it by emulating version RC4 :)
I'm a really beginner on SMF. So, how can I emulate another versions of SMF on the 2.0?
EDIT: I've just modified the package-info.xml and changed RC4 for RC5 and then I've installed it. Now, the Spoiler appears only on a Preview, but not on the Post. You know what is the problem?
Thank you in advance for your very good work!
@XiFiCt69 can I have a link to your forum? or a link to a post using the spoiler?
Of course, it's 3w.avaonline.es
Try to see the Topic number 40. We use a lot of Spoilers there.
Thank you in advance!
ok, all the javascript its missing in your <head> </head> tag, try adding this on your theme's index.template.php:
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/base/jquery-ui.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
$(document).ready(function() {
var is_visible = false;
$('.spoiler_toggle').prev().append(' [<a href="#" class="spoiler_toggle_link">' + 'Mostrar' + '</a>]');
$('.spoiler_toggle').hide();
$('a.spoiler_toggle_link').click(function() {
is_visible = !is_visible;
$(this).html((!is_visible) ? 'Mostrar' : 'Esconder');
$(this).parent().next('.spoiler_toggle').toggle('slow');
return false;
});
});
// ]]></script>
<script type="text/javascript">
$(document).ready(function()
{
$(".tab_content").hide();
$("ul.tabs li:first").addClass("active").show();
$(".tab_content:first").show();
$("ul.tabs li").click(function()
{
$("ul.tabs li").removeClass("active");
$(this).addClass("active");
$(".tab_content").hide();
var activeTab = $(this).find("a").attr("href");
$(activeTab).fadeIn();
return false;
});
});
</script>
It works! Thank you a lot! REALLY thank you a lot! O:)
EDIT: I have another little problem. Now on the preview of the Post/Topic, it shows me the button 2 times.
Example attached.
German Translation.
And: Please make it work with 2.0RC5. ;)
This mod has been updated for RC5, it will work on RC4 and RC5, also added german translation thanks to Omar Hawk
feature request?suggest?
can u add an option so that guests can't open spoiler
thx
btw
how did u managed to get aeva media 2.1 installed in ur rc5 site
i have 2.1 also, when i tried to install i didn't get any error
but actually no codes are being copied to targeted files
I'm trying to keep this mod as simple as possible, if you want I can post some instructions to add the SMF permission system.
sure, some instructions would help
thx
ok, open your Sources/Subs-SimpleSpoiler.php file and find:
global $txt;
loadLanguage('SimpleSpoiler');
$codes[] = array(
'tag' => 'spoiler',
'before' => '<span>' . $txt['spoiler_desc'] . '</span><div class="spoiler_toggle">',
'after' => '</div>',
'block_level' => true,
);
and replace with this:
global $txt, $context;
loadLanguage('SimpleSpoiler');
$codes[] = array(
'tag' => 'spoiler',
'type' => 'unparsed_content',
'content' => '<span>' . $txt['spoiler_desc'] . '</span><div class="spoiler_toggle">'.(!$context['user']['is_guest'] ? '$1' : 'Sorry, guest cannot see spoilers').'</div>',
'block_level' => true,
);
now your guest won't see the actual spoiler but a message: "Sorry, guest cannot see spoilers" if you want to use the SMF permisison system, then follow this tutorial: http://www.simplemachines.org/community/index.php?topic=345127.msg2332714#msg2332714 add the permission and then used it instead of !$context['user']['is_guest']
alright, thank you for the edits
Quotebtw
how did u manage to get aeva media 2.1 installed in ur rc5 site
i have 2.1 also, when i tried to install i didn't get any error
but no codes are being copied to targeted files
i've visited ur site and i saw u have media 2.1 installed in ur forum
do u have any suggestion to my problem?
btw nice site u got, i'm an one piece fan too
i installed this mod without any error.. but i cant see any spoiler even after useing spoiler tag
made a post just for testing;
http://www.amigozone.com/chit-chat/a-question/new/#new
@Eudemon369 I have no issues installing aeva 2.10 in my forum, if no codes are actually copied to your files then it must be a permissions issue, check your error log, it will be an error regarding packager manager unable to open x file.
@!RFAN its an incompatibility with Ir al cielo V1.1 mod, in your index.template.php find:
<!-- // Ir al cielo V1.1 smfsimple.com -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
and remove
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
I'm having the same problem as this guy:
http://www.simplemachines.org/community/index.php?topic=419479.msg2947515#msg2947515
And I'm afraid I don't understand how to fix it. How do I turn off eval?
NM found it
did you solved or do you nedd more assistance? turning off eval will tel you the exact error location, its highly unlikely the error its actually in the SimpleSpoiler.language.php file
Im having problems :S
1. Spoiler doesn't work (SMF 2.0 RC4)
2. Trying unistalling
3. Unistalling page (Completely empty)
Thanks a lot ;)
you are using an old version, read the topic, I posted instructions on how to uninstall
Pues si lo desinstalé y lo volví a instalar pero no funciona, está igual.
follow the instructions I gave in this message:
http://www.simplemachines.org/community/index.php?topic=419479.msg2937177#msg2937177
yep ive done it and set up again with ur latest mod ver, but still not working, is there anything else i can do to fix it?
tyvm
why is not working? do you have another mod that calls jquery in the head tags? url to your forum?
Quote from: Miss All Sunday on February 28, 2011, 09:32:48 AM
why is not working? do you have another mod that calls jquery in the head tags? url to your forum?
cityrol.net/foro/
user: demo
pass: demo
"contraseña incorrecta" I cannot enter your forum, it must be an incompatibility with some other mod who is also using jquery, check your source code, there has to be only one jquery call.
Quote from: Miss All Sunday on March 01, 2011, 09:14:43 AM
"contraseña incorrecta" I cannot enter your forum, it must be an incompatibility with some other mod who is also using jquery, check your source code, there has to be only one jquery call.
Demo - Demo
it's an incompatibility with some other mod who is also using jquery, check your source code, there has to be only one call to jquery library, another mod its calling jquery after this mod adds the JavaScript so it gets nulled and therefore not working.
Quote from: XiFiCt69 on February 18, 2011, 04:47:46 PM
EDIT: I have another little problem. Now on the preview of the Post/Topic, it shows me the button 2 times.
Example attached.
Hi again Miss All Sunday! Can you answer to my doubt on the quoted Topic? Thank you very much in advance and sorry so much about my inactivity. Greetings.
you have the code twice, check your files, somewhere theres two JavaScript:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
$(document).ready(function() {
var is_visible = false;
$(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
$(\'.spoiler_toggle\').hide();
$(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
$(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
$(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>
does it only happens on the preview?
Works great! 8)
Thanks for the code Miss All Sunday.
Previously we had used the Spoiler Tag, but is has not been updated for some time now so your code came along at just the right right time for us.
And... because the bbc code is the same for both packages it picked up the spoilers in our older posts.
Thanks Miss, good job. ;D
Thanks Ken., glad you liked :)
Nice mod, simply and sweet 8)
I just installed. it crashed my ENTIRE SERVER after entering my FTP Details.. 10 domains are now getting internal 500 server error
What other mods did you have installed?
Quote from: FounderSim on March 10, 2011, 01:50:22 AM
I just installed. it crashed my ENTIRE SERVER after entering my FTP Details.. 10 domains are now getting internal 500 server error
well, it has nothing to do with the mod but with your files and folders permissions, talk with your hosting, they can giv your files and folders the correct permissions.
Quote from: Miss All Sunday on March 10, 2011, 09:01:25 AM
Quote from: FounderSim on March 10, 2011, 01:50:22 AM
I just installed. it crashed my ENTIRE SERVER after entering my FTP Details.. 10 domains are now getting internal 500 server error
well, it has nothing to do with the mod but with your files and folders permissions, talk with your hosting, they can giv your files and folders the correct permissions.
Well, it is VERY fishy that it happened just after the installation of this mod...and that the whole server is affected.
Quote from: Yoshi2889 on March 10, 2011, 10:02:47 AM
Quote from: Miss All Sunday on March 10, 2011, 09:01:25 AM
Quote from: FounderSim on March 10, 2011, 01:50:22 AM
I just installed. it crashed my ENTIRE SERVER after entering my FTP Details.. 10 domains are now getting internal 500 server error
well, it has nothing to do with the mod but with your files and folders permissions, talk with your hosting, they can giv your files and folders the correct permissions.
Well, it is VERY fishy that it happened just after the installation of this mod...and that the whole server is affected.
its mere coincidence... he could install any other mod and SMF will ask for his FTP info.
when the permissions for files and folders aren't correct, SMF ask for your ftp info to try change the files and folders permissions, his server must have a unique configuration regarding permissions that's why he has 500 errors, the best he cna do is ask his hosting support and they can restore his files and folders permissions.
The problem has been fixed, however you still can't deny the fact that your mod crashed my server and deleted my php settings =]. Only html and image files would work. no php files.
???
this mod does not modify a single file nor delete a single file... it uses SMF hooks.
this is the key:
Quote from: FounderSim on March 10, 2011, 01:50:22 AM
after entering my FTP Details..
if you have had your permissions right, SMF won't ask for your FTP details... something was wrong with your permissions, you could have installed any other mod and the result will be the same... it was mere coincidence that you installed this mod.
PLeas help me
i just use smf v2 rc5 when i try press button spoiler it's just view like this
Spoiler
tes tes
www.kinglubu.com
how do you installed it?
can you please enable the righ click on your site
what other mods do you have installed?
this is my mod
1. PortaMx v1.0 RC4
2. Simple Spoiler 1.0.1
3. YouTube BBCode 2.6
4. Forum Firewall 1.0.8
5. Advanced Reputation System 1.8.3
6. SA FBConnect 1.0 RC4 Rev285
7. Quick Translation 0.4.1
8. Global Headers Footers 2.0
9. Hide Images from Guests 2.0
10. Disable Right Click 4.0
11. Listen to Quran
Right Click now is enable
well, cheking your source code I couldn't find the javascript this mod adds.
how did you installed the mod? check that Subs-SimpleSpoiler.php file exist in your Sources folder any errors on the error log?
can you attach your theme's index.template.php file
i use default themes
all mod jus install via package menu
try this one, clean your forum's cache to see the changes
the result just like this:
Spoiler []
are you using another language besides english? the Subs-SimpleSpoiler.php file do eist on your Sources folder?
do you have errors on your error log?
only english language
does the Subs-SimpleSpoiler.php exist on your Sources folder ? do you have any errors on your error log ?
I still wonder why it's called a spoiler... does it spoil the fun or something?
(I don't mean this mod, I mean a spoiler in general)
Quote from: Yoshi2889 on February 02, 2011, 01:53:14 PM
How do I use things like "Name (Show)"
[spoiler=Name] doesn't work.
You can try my mod for it » Quick Spoiler » see link in my signature.
Quote from: Miss All Sunday on March 09, 2011, 09:20:58 AM
you have the code twice, check your files, somewhere theres two JavaScript:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
$(document).ready(function() {
var is_visible = false;
$(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
$(\'.spoiler_toggle\').hide();
$(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
$(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
$(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>
does it only happens on the preview?
Yes, it is. Only on the Topic Preview.
(Sorry for my late, I don't have much time, lot of work)
well, if you have that code twice, remove one of those ;)
I love you, miss all sunday ;)
Quote from: Miss All Sunday on March 17, 2011, 09:57:18 AM
well, if you have that code twice, remove one of those ;)
I'm really sorry, but I don't know the files that what I have to check. Can you tell me the file names?
Greetings!
check your theme's index.template.php and your Sources/Subs-SimpleSpoiler.php files
hello,
I get an error message in the archive first (only the first message)
Notice: Undefined index: html_headers in /home/*******/public_html/Sources/Subs-SimpleSpoiler.php on line 45
link : http://www.fulloyuntr.com/arsiv.html
post link : http://www.fulloyuntr.com/arsiv-konu-7068.0-prototype-2-resmen-duyuruldu.html
Thanks for the mod.
has been very good
error reporting is not an important thing, but I wanted to get familiar with
well, the issue seems to be the archive template that does not have/contain $context['html_headers'] what template are you using for the archives?
I'm sorry, I'm not too familiar with archive post/boards, you will have to give me more info about it so I can test it properly.
Quote from: Miss All Sunday on March 20, 2011, 01:18:23 PM
well, the issue seems to be the archive template that does not have/contain $context['html_headers'] what template are you using for the archives?
I'm sorry, I'm not too familiar with archive post/boards, you will have to give me more info about it so I can test it properly.
.htacces code
#Bölümler
RewriteRule ^arsiv-bolum-([0-9.]*)-(.*).html arsiv.php?board=$1
RewriteRule ^arsiv-bolum-([0-9.]*)-([a-zA-Z0-9_-]*) arsiv.php?board=$1
#Konular
RewriteRule ^arsiv-konu-([0-9.]*)-([a-zA-Z0-9_-]*).html arsiv.php?topic=$1
RewriteRule ^arsiv-konu-([0-9.]*)-([a-zA-Z0-9_-]*) arsiv.php?topic=$1
#Arsiv.php
RewriteRule ^arsiv.html arsiv.php
well, that covers your urls.
but what I'm looking is your template, what template are you using to show your archive topics? whatever template you're using, its missing this variable: $context['html_headers'] in the <head></head> tags
I'm getting the same problem with it just showing
QuoteSpoiler
text inside spoiler tag
SMF 2.0 RC4 - Clean install
using the default Core theme, no other themes are installed
$context['html_headers'] is in there just fine
your file is in the Sources folder
cache has been cleared
English and Spanish are the only installed languages and I'm testing it on the English side
nothing else is using jQuery
When I view the page source, none of your <head> stuff is showing up.
This leads me to believe that YOU have a problem with your mod that you need to fix and stop blaming your users for every single issue that comes up. Yes, several of the problems are user errors, but there's been several here that are YOUR problem that need a legit fix and you shouldn't just be blowing them off.
first, calm down.
second, without an url to your forum I cannot help you.
any errors on your error log? how did you install the mod?
/me is willing to bet it was done as a manual install and the calls to integration hooks weren't made.
As with the others having the same problem, I installed it via the Download Mods from the Admin Control Panel inside SMF
And no, there's no error in the logs coming from your mod.
It doesn't matter though at this point, I switched to Bugo's mod, edited his XML file so it would install on RC4 and it works GREAT with no configuration needed. Looks better too.
Quote from: ShadowDrakken on March 25, 2011, 09:34:36 PM
As with the others having the same problem, I installed it via the Download Mods from the Admin Control Panel inside SMF
And no, there's no error in the logs coming from your mod.
It doesn't matter though at this point, I switched to Bugo's mod, edited his XML file so it would install on RC4 and it works GREAT with no configuration needed. Looks better too.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Foharascans.com%2Fforo%2FSmileys%2Fnuevo%2Fafro.gif&hash=8f72b873261716f0868ecd0651e34327bca77a9b)
just to clarify, I cannot possible help if people do not provide enough info about the issue.
Edit, the only thing I can possible think regarding this mod not working in your server is due to this:
if ($header_done)
return;
in spoiler_header(); function, if thats the case, then you only need to remove it
btw, what other users? I only saw two users with this problem, you and other guy, the other guy didn't replied to my last message and I couldn't keep on helping him, as far as I know I wasn't "blowing them off" as I have responded every message in this topic... but I'm glad you were able to switch to another mod, have a nice day :)
this is what i found, nothing major but maybe good to know
here is an example
the first image shows after spoiler tag closed, there are 2 line spaces
the second image shows the actual post, but there is only 1 line space
Quote from: Miss All Sunday on April 02, 2011, 11:48:46 PM
the space that the <p> tags creates relies entirely on your theme's css style sheet.
so check if your theme does already have a style for any <p> tags
simple spoiler does also have its own css class: spoiler_toggle
you can add that class to your_theme/css/index.css file and modify it as you want :)
i ran a quick check, but didn't find any
so it should be default p tag
ctrl+F for "p" in css is a headache...
----------------
no wait...
just realized that was dumb, so i ran search for "p {"
i found this
#footer p { margin: 0; padding: 0; color: #626262;}
i think i'm too tired today........
whats your url? give me a topic where simples poiler mod is been used.
here, btw i edited my previous post
http://kumakuni.com/index.php?topic=2640.0
and what exactly do you want? do you want to add more space between spoilers?
check your /Sources/Subs-SimpleSpoiler.php file, find:
$codes[] = array(
'tag' => 'spoiler',
'before' => '<span>' . $txt['spoiler_desc'] . '</span><div class="spoiler_toggle">',
'after' => '</div>',
'block_level' => true,
);
and in here:
'after' => '</div>', you can add as many spaces as you want:
'after' => '</div><p /><p />',
eh.. i didn't want anything... like i said "nothing major" actually it's not even an issue
i was just wondering why i need to use 2 line spaces to make 1 line space after spoiler tag
you need to add two or more spaces because the spoiler tag does not add any space at all, like I said, you can modify your .css file and add all the space you need to the spoiler_toggle class.
oh. ok, got it...
thanks
i rly need to rest now... my head feels so heavy.... :-[
Hi again MissAllSunday!
I've have another problems... Now, the Spoiler doesn't show on any area! I've deleted all lines about the Spoiler on index.template.php and installed the last Package that no modifies your index.template.php, but the Spoiler doesn't show...
Any suggestion?
And! LOT OF THANKS to you, your Simple Spoiler it's so good.
XiFiCt69 can I has a link to your forum?
does the mod has any errors on install?
is there any errors on the error log?
does the Subs-SimpleSpoiler file exist in your Sources folder?
Same error as XiFi has.
This error shows up in the log (testing in localhost):
8: Undefined index: change_color
File: /var/www/forum/Themes/default/languages/SimpleSpoiler.english.php (body_above sub template - eval?)
Line: 556
Same error online:
8: Undefined index: change_color
File: /home/smftools/public_html/forum/Themes/default/languages/SimpleSpoiler.english.php (body_above sub template - eval?)
Line: 556
turn off template eval, if you see the /SimpleSpoiler.english.php its a very simple file with only 3 strings... the error is in another file, by turning off the eval template you will be able to localize where the error is.
Quote from: Miss All Sunday on May 01, 2011, 07:20:34 PM
turn off template eval, if you see the /SimpleSpoiler.english.php its a very simple file with only 3 strings... the error is in another file, by turning off the eval template you will be able to localize where the error is.
8: Undefined index: change_color
File: /home/smftools/public_html/forum/Themes/AnimatedArena_RC5/index.template.php
Line: 556
Happens in all themes :-\
Well, there you go, the error has nothing to do with this mod (as this mod does not modify any file) , I suggest contacting that theme's author.
if it happens in every theme then I suggest see your mod list and look for a mod that adds the change_color string, it looks like the translation is missing.
Quote from: Miss All Sunday on May 02, 2011, 11:23:24 AM
Well, there you go, the error has nothing to do with this mod (as this mod does not modify any file) , I suggest contacting that theme's author.
if it happens in every theme then I suggest see your mod list and look for a mod that adds the change_color string, it looks like the translation is missing.
But still, the spoiler doesn't show at all.
Sample:
http://map3cms.co.cc/forum/index.php/topic,3.0.html
It shows "Spoiler" but doesn't show anything besides that (and shows the content).
did you have javascript enable in your browser?
I just went to that page (with opera and chrome) and the spoiler its working as it should
it only happpens with IE9, last time I check jquery was having issues with IE9. try using the latest jquery release.
Quote from: Miss All Sunday on May 02, 2011, 12:12:17 PM
did you have javascript enable in your browser?
I just went to that page (with opera and chrome) and the spoiler its working as it should
it only happpens with IE9, last time I check jquery was having issues with IE9. try using the latest jquery release.
It also happens on my mobile here (Samsung Wave 525, Dolphin 2.0)
try using the atest jquery version, as I said, I only saw jquery to have problems with IE9, could have issues with other browsers as well.
http://bugs.jquery.com/timeline
unfortunately, I can't do much at this moment but only updating this mod to the latest jquery version and hopes jquery devs solve those issues.
First off I would like to say I love this simple mod! I'm trying to see if there is a way in Subs-SimpleSpoiler.php to use buttons instead of text for Show/Hide. Any help would be greatly appreciated by this newbie ;p
I'm having some problems in the preview. Not when posting. Only in the preview.
What happens is that it just doesn't work. And cuts all the content in the spoiler.
Maybe's a bug.
I'd like you to make a more complete version of this mod please!
would be amazing.
Thanks for the development of this mod.
And hope u can help me to fix that preview bug.
I'm using SMF 2 RC5
My Regards
ts not a bug, when you preview a message, you load the content after the jquery has been set, it happens with every bbc that uses JavaScript.
Sorry, I'm not going to add more features to this mod, as the name implies, this is a simple spoiler.
Good work
when Update dont forget Portuguese
$txt['spoiler_show'] = 'Mostrar';
$txt['spoiler_hide'] = 'Esconder';
$txt['spoiler_desc'] = 'Spoiler';
yeah the demo is on a site I do not own anymore, I will update this mod to 2.0 as soon as I can fine some time to make the changes, add the translations and do some testing, apart from this, I got another 14 mods to update :( not complying or anything but it does take time.
It should work fine on 2.0 Gold. There was no integration hooks changes in it.
This mod is now updated to SMF 2.0
Change log
-1.0.2
-Added support for SMF 2.0
-Updated jquery and jqueryui scripts.
Here are some suggestions that are SIMPLE too,
When the text comes out, it should be in a small box like this one so it doesn't look creepy.
example: http://custom.simplemachines.org/mods/index.php?mod=195
also, there's a bug with the nested spoiler, after you click show on the first one, then click "Show" on the other one, the text appears and the button to hide it still shows "Show", if you click it the text hides and the button to show it becomes "Hide" instead of "Show"
You can add your own css to your theme's cs/index.css the class for the spoiler is spoiler_toggle
as for the hide/show it actually depends on jquery, sometimes it does display "hide" even if there is only one spoiler
I thought this spoiler only loads anything under it when you click the "show" link. Was I wrong?
I placed 6 images under the spoiler, but it loaded even before I clicked "show".
no, this spoiler, as any other spoiler just hide the content, the content is still loaded normally
will it work in in SMF 2.0 RC5
Mm, I think I was confusing jQuery with Ajax. From what I've read is that Ajax loads content within a page, independently of the rest of the page, without having to navigate to a new page which shows the downloaded content.
Would it be tough to implement Ajax into this spoiler? I know of another spoiler (http://dragomano.ru/page/quick-spoiler) that apparently only loads images once a user clicks the spoiler button. I'm mostly concerned with images since occasionally users post many large images in a thread, which causes the entire thread to load slowly.
Now, I could use that other spoiler, but I like how clean and simple your spoiler looks. I even removed the "Spoiler" word next to the "Show" and "Hide" links to make the spoiler look even cleaner. Next I'm going to change the bbcode to "hide" "/hide" from the default "spoiler" "/spoiler".
What I actually want is to use your spoiler mod as a "content hider" which prevents any content under the tag from loading until a user clicks the "show" link.
Can it be done? Should I perhaps request it in the Mod Request board, since it appears to be very different from your spoiler.
@ Yes it will work on a RC5 forum, you just need to emulate version RC5
@MiY4Gi No that other spoiler does the same thing as this, it just hide the content but the content is still loaded normally.
It will be vey difficult to achieve what you want, I honestly don't see anyone doing this request, the main issue is that any bbc is printed to the browser as a whole, it is not a separate content, thus it will be very difficult to separate from the main HTML.
Hey, I wonder if anybody here can help me out. We're running SMF 2.0 final, and have been using this plugin since way back when. But the other day I noticed something I don't think happened before, when I post a Code tag inside a Spoiler tag, it reduces my code display to one line with a scrollbar instead of that standard 24 lines then a scroll bar appearing.
I've attached my CSS just incase anybody can take a look at it and spot something I've missed. Thanks :)
I will take a look at this I never tested the mod with the code tag before
OK, I tested the latest version with SMF 2.0 and the default theme and I didint reproduce what you said.
can you post an url to a topic with this issue? if guest cannot see the post please post a dummy regular user account to test out things.
Quote from: khamseen on August 23, 2011, 02:57:46 PM
Hey, I wonder if anybody here can help me out. We're running SMF 2.0 final, and have been using this plugin since way back when. But the other day I noticed something I don't think happened before, when I post a Code tag inside a Spoiler tag, it reduces my code display to one line with a scrollbar instead of that standard 24 lines then a scroll bar appearing.
I've attached my CSS just incase anybody can take a look at it and spot something I've missed. Thanks :)
Are you using Google Chrome?
Quote from: Miss All Sunday on August 24, 2011, 07:30:22 PM
OK, I tested the latest version with SMF 2.0 and the default theme and I didint reproduce what you said.
can you post an url to a topic with this issue? if guest cannot see the post please post a dummy regular user account to test out things.
I will get one set up tomorrow and PM you details. :)
Quote from: Bugo on August 24, 2011, 09:26:46 PM
Quote from: khamseen on August 23, 2011, 02:57:46 PM
Hey, I wonder if anybody here can help me out. We're running SMF 2.0 final, and have been using this plugin since way back when. But the other day I noticed something I don't think happened before, when I post a Code tag inside a Spoiler tag, it reduces my code display to one line with a scrollbar instead of that standard 24 lines then a scroll bar appearing.
I've attached my CSS just incase anybody can take a look at it and spot something I've missed. Thanks :)
Are you using Google Chrome?
I am indeed, you think that's what's causing it? I'll ask my friend to check the post and see what he gets with Firefox.
Thanks, finally have a use for this mod mostly for Press Releases. :)
Quote from: khamseen on August 23, 2011, 02:57:46 PM
Hey, I wonder if anybody here can help me out. We're running SMF 2.0 final, and have been using this plugin since way back when. But the other day I noticed something I don't think happened before, when I post a Code tag inside a Spoiler tag, it reduces my code display to one line with a scrollbar instead of that standard 24 lines then a scroll bar appearing.
I've attached my CSS just incase anybody can take a look at it and spot something I've missed. Thanks :)
Just tested it and it worked fine, cannot reproduce.
I've a problem. I've installed SimpleSpoiler manually and launched database.php but the spoiler is shown only in the post's preview.
Can you help me?
Thank you ;)
do you have any other mods that adds the jquery library?
can you provide me a link to a topic with a spoiler to test things.
Right now I've solved by inserting the js code in the index.template.php and commenting the same lines in the Subs-SimpleSpoiler.php.
I'm having a peculiar issue with this mod. Upon install, it says it requires my FTP information to make changes to my "/home" directory. Clearly I'm not about to do that as it will break my server. It also brings back memories of what happened to FounderSim in March (http://www.simplemachines.org/community/index.php?topic=419479.msg2983717#msg2983717) when his entire server went down after installing this mod. Now before you ask me to check my permissions, know that everything is writable--permissions aren't the issue. Furthermore, this is the first and only mod that has ever "required" FTP details. Every other mod I've ever installed has had no issues. I'm also aware that this mod uses integration hooks, which is why I pursued it in the first place. The code is straight-forward and I just want it to work. Do you have any idea why it would be wanting to make changes to my "/home" directory?
Thanks for your help! :)
Sincerely,
EE
SMF 2.0
PHP 5.3.6
MySQL 5.1.39-log
Nginx 0.8.53
URL: N/A as there's nothing to see (I haven't installed the mod)
this mod does not made any edits to your files, perhaps SMf is asking you your ftp details to change the permissions on your Source folder.
You can install this manually with little effort, just follow this instructions:
Move the included file "Subs-SimpleSpoiler.php" to "./Sources".
Move the included directory "languages" to "./Themes/default".
Move the included file "spoiler.gif" to "./Themes/default/images/bbc".
then upload the database.php file to your site root folder and call it woth youe browser: yoursite.com/forum/database.php and thats it.
Quote from: Miss All Sunday on September 17, 2011, 09:05:42 PM
this mod does not made any edits to your files, perhaps SMf is asking you your ftp details to change the permissions on your Source folder.
You can install this manually with little effort, just follow this instructions:
Move the included file "Subs-SimpleSpoiler.php" to "./Sources".
Move the included directory "languages" to "./Themes/default".
Move the included file "spoiler.gif" to "./Themes/default/images/bbc".
then upload the database.php file to your site root folder and call it woth youe browser: yoursite.com/forum/database.php and thats it.
Oh, I'm well aware of manual installation as well. :P I was just hoping to isolate the issue and solve it rather than "treat" the symptoms. ;)
Thanks for the reply. I'll try to do some more digging.
EDIT: Quick update for you: I have solved my issue! I can now install the mod without issue. :)
When i try to submit my post it gets stuck and when i look into the error log i see this:
2: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument
any idea? smf 2.0 rc5
does it say in which file?
Quote from: Miss All Sunday on November 21, 2011, 09:40:47 AM
does it say in which file?
yes, in the post.template.php file but on second thought i think its not the mod thats causing the timeout error (although the errorlog does says so) because i get a timeout too when saving something from the admin panel.
I made a topic in the general smf 2.x board too, regardless of that its really annoying.
Yeah, for some reason this mod gets the blame on some totally unrelated errors.
Quote from: ~DS~ on August 30, 2011, 07:43:53 PM
Quote from: khamseen on August 23, 2011, 02:57:46 PM
Hey, I wonder if anybody here can help me out. We're running SMF 2.0 final, and have been using this plugin since way back when. But the other day I noticed something I don't think happened before, when I post a Code tag inside a Spoiler tag, it reduces my code display to one line with a scrollbar instead of that standard 24 lines then a scroll bar appearing.
I've attached my CSS just incase anybody can take a look at it and spot something I've missed. Thanks :)
Just tested it and it worked fine, cannot reproduce.
Maybe I was wrong.
I will do some test then.
I'm not particularly happy about this mod and the way it uses jquery for a simple hide and show div, may as well re do it purely with javascript or if will continue to use jquery, provide some more options.
Have you looked at this yet, Sunday?
Are you using chrome? seems like chrome is adding a 20px inline style height on the code tag... why? I have no idea.
Yeah, using Chrome 17.0.954.3 canary
EDIT: I think it only happens if you have another spoiler with code tag in the same post body area.
Seem like this mod got a little conflict with Resize Images To Fit Screen (http://custom.simplemachines.org/mods/index.php?mod=1769) . After i installed this mods, immediately the Resize mod is not functioning , which mean it didn't resize the images in the forum >.<
The author for the resize mod was already MIA long ago, therefore, hopefully you all can look into such matter >.< Thank you
both uses jquery, open Subs-SimpleSpoiler and delete the calling to jquery.
Quote from: Miss All Sunday on December 06, 2011, 01:15:50 PM
both uses jquery, open Subs-SimpleSpoiler and delete the calling to jquery.
delete the calling to jquery? What you mean with that? :) How to do that? O.O
By the way, how to add words into the spoiler bar? Because so far the spoiler bar in my forum got no "Spoiler" word. (Refer to the picture in the attachment) Thank you :)
Open Sources/Subs-SimpleSpoiler.php
find and delete:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.js"></script>
the words do not appear because you're using other language than the ones this mod supports, you will need to create your own SimpleSpoiler.yourlanguage.php in Themes/default/languages/ with the translated strings.
Something tells me you're not really using my mod but another one...
I see. That is weird, because i have clearly using ur mod >.<
Simple Spoiler 1.0.2
I am using English in my forum >,<
if you're indeed using my mod, check if the file SimpleSpoiler.english.php do exist in /Themes/default/languages/
also, the screen shot you attached does not match the look of this mod, this mod does not uses any button.
Quote from: Miss All Sunday on December 07, 2011, 09:47:47 AM
if you're indeed using my mod, check if the file SimpleSpoiler.english.php do exist in /Themes/default/languages/
also, the screen shot you attached does not match the look of this mod, this mod does not uses any button.
Maybe it was some left over code from the previous spoiler that I uninstall recently. Yesh, there are a file names SimpleSpoiler.english.php >.<
Anyway, after i delete those code in the Subs-SimpleSpoiler.php, i was unable to put image into the spoiler. In the preview, i am able to see the picture but once i posted out, i was unable to see the picture, is like it isn't there. >.<
what's your forum url?
Simple spoiler should use <span> instead of <div>. Makes rendering faster and the tag more usable.
Quote from: Guillelmus on December 08, 2011, 11:09:39 AM
Simple spoiler should use <span> instead of <div>. Makes rendering faster and the tag more usable.
The reason I use a div rather than a span tag it's because the content of the spoiler could be anything, for example:
<span class="spoiler"> <p>some text</p> </span> that would be wrong, you can't put block-level elements inside a span tag.
how could the tag be more usable with a span tag?
Quote from: Miss All Sunday on December 08, 2011, 11:31:22 AM
Quote from: Guillelmus on December 08, 2011, 11:09:39 AM
Simple spoiler should use <span> instead of <div>. Makes rendering faster and the tag more usable.
The reason I use a div rather than a span tag it's because the content of the spoiler could be anything, for example:
<span class="spoiler"> <p>some text</p> </span> that would be wrong, you can't put block-level elements inside a span tag.
how could the tag be more usable with a span tag?
Interesting point. I weren't aware of that. I altered the script on my forum so that it uses span istead of div - and seems to work fine. The feature was requested by one of my users. The main difference is that div creates a new line whereas span doesn't. It allows you to do more things + it's faster as I mentioned.
edit: w3 validator at least doesn't give error if you put
inside [span]
Quote from: Guillelmus on December 08, 2011, 12:49:41 PM
edit: w3 validator at least doesn't give error if you put inside [span]
try to validate this:
<span class="spoiler"> <p>some text</p> </span>
or this:
<span class="spoiler"> <div>some text</div> </span>
or put a code tag inside a spoiler tag, it will show you it's invalid. (do note that SMF uses XHTML)
The vast majority of users use the spoiler as a block element.
I can (unlikely since this is a very simple spoiler) add a parameter to the spoiler tag [spoiler=inline] to change the div's css to display:inline; rather than block, however, I will not use span for the reasons given above.
There's really no reason to use span, a div block can do all the things that a span tag can do, plus, the difference between a span tag and a div tag in terms of speed really depends on the browser you're using.
Quote from: Miss All Sunday on December 08, 2011, 01:22:44 PM
Quote from: Guillelmus on December 08, 2011, 12:49:41 PM
edit: w3 validator at least doesn't give error if you put inside [span]
try to validate this:
<span class="spoiler"> <p>some text</p> </span>
or this:
<span class="spoiler"> <div>some text</div> </span>
or put a code tag inside a spoiler tag, it will show you it's invalid. (do note that SMF uses XHTML)
The vast majority of users use the spoiler as a block element.
I can (unlikely since this is a very simple spoiler) add a parameter to the spoiler tag [spoiler=inline] to change the div's css to display:inline; rather than block, however, I will not use span for the reasons given above.
There's really no reason to use span, a div block can do all the things that a span tag can do, plus, the difference between a span tag and a div tag in terms of speed really depends on the browser you're using.
Ok, I see now. Thanks for explaining this! I should switch back to div, using display:inline myself.
Very nice script, btw. :)
Quote from: Miss All Sunday on December 08, 2011, 11:03:40 AM
what's your forum url?
This is my forum :)
My Forum (http://www.anixekai.com/forum)
Please check this thread, i use it for experiment. :)
Check this thread (http://www.anixekai.com/forum/index.php?topic=1414.0)
Thank you and sorry for troubling you and late reply >.< I got examination :(
The spoiler you have its not this mod, you're using a simple javascript function to show/hide a div with a form button.
That is weird >.> I has screenshot my modification browser as proof >.<
Now i also confuse on where is the problem >.<
You have another spoiler, most likely you didn't uninstall it properly, you need to uninstall it completely before install this one.
SO now should i uninstall this mod 1st? (I notice there are no uninstall button on it )
or
I just continue to go and remove those code from the previous spoiler? O.O
Weird, i remember got check the code when i uninstall the mods >.<
You need to uninstall all other spoiler mods you may have, having multiple spoiler mods will cause interference and malfunction.
In my opinion this is best spoiler mod for SMF ;)
Here's Polish language - ISO and UTF8 :)
I was having an issue and decided to try uninstalling/reinstalling the mod, but I seem to be in an endless cycle. Per one of the thread's early posts, I moved the uninstall.php to the site's root and called via URL/uninstall.php, then manually deleted all the listed files, but no matter what I do, the mod still shows up as installed in Installed Packages. If I try to uninstall it from there, I get:
An Error Has Occurred!
This package cannot be uninstalled, because there is no uninstaller!
Please contact the mod author for more information.
After following the initial uninstall instructions first mentioned and with no existing SimpleSpoiler.zip in Packages, I initially get this:
Package uploaded successfully
The package has been uploaded successfully
Simple Spoiler[ List Files ][ Install Mod ]
But then after clicking on 'Install Mod', I get this:
Install Mod
This package is already installed, and no upgrade was found!
You should uninstall the old version first to avoid problems, or ask the author to create an upgrade from your old version.
Please remember to always make regular backups of your sources and database before installing mods, especially beta versions.
Forum version is the latest (2.0.1), didn't know if that might have anything to do with it. Any insight/help would be greatly appreciated. Thanks! :)
If you want to uninstall this mod you will have to amulate version 2.0:
http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn't_work_in_my_SMF_version
Quote from: Miss All Sunday on December 12, 2011, 11:19:38 AM
You need to uninstall all other spoiler mods you may have, having multiple spoiler mods will cause interference and malfunction.
I see. I has already uninstall other mods. Maybe still some left over code. :)
I cant access your manual installation in the modification section. Therefore, can you give me the code for Sources/Subs.php? :)
There is no code for sources/Subs.php, this mod uses hooks, if you want to uninstall this mod you need to follow this instructions:
Move the included file "Subs-SimpleSpoiler.php" in "./Sources".
Move the included directory "languages" in "./Themes/default".
remove "spoiler.gif" in "./Themes/default/images/bbc".
then upload the uninstall.php file to yur forum root and call it with your browser to remove the hooks calls from your database. or you can manually remove those calls in the settings table in your database, look for this parts:
spoiler_bbc_add_code
spoiler_bbc_add_button
$boarddir/Sources/Subs-SimpleSpoiler.php
and remove those.
Quote from: Miss All Sunday on December 14, 2011, 01:30:39 PM
There is no code for sources/Subs.php, this mod uses hooks, if you want to uninstall this mod you need to follow this instructions:
Move the included file "Subs-SimpleSpoiler.php" in "./Sources".
Move the included directory "languages" in "./Themes/default".
remove "spoiler.gif" in "./Themes/default/images/bbc".
then upload the uninstall.php file to yur forum root and call it with your browser to remove the hooks calls from your database. or you can manually remove those calls in the settings table in your database, look for this parts:
spoiler_bbc_add_code
spoiler_bbc_add_button
$boarddir/Sources/Subs-SimpleSpoiler.php
and remove those.
I see. Thank you very much for your reply. :)
Finally i manage to get rid of the block stuff. However, now the spoiler seem to be not functioning >.< I mean i uninstall your mods as well as check with other codes, then reinstall the mods again. Aftre reinstall, your mods is working fine.. so i proceed to sub-simplespoiler to delete the 2 row of javascript code then it ended up not functioning >.<
Please check this thread again >.<
Check this thread (http://www.anixekai.com/forum/index.php?topic=1414.0)
You only need to delete the javascript jquery call if there is already a call to jquery, since it doesn't exist, then leave the javescript code in sub-simplespoiler.php
i not really sure what you mean >.<
However, if i dun delete the javascript code, my autoresizeimage mod wont function >.<
Sorry for troubling you >.<
I don't know how the other mod works, I don't know where and how this other mod loads jquery.
I will release another version of this mod soon, this new version will hopefully reduce incompatibility with mod's that also uses jquery by checking if jquery is already loaded.
I see. Thank you very much :)
haha, sorry for disturbing you. Have you release a new version of this mod that reduce the incompatibility with other mods that also uses jquery? :)
Change log
-1.0.3
-Compatible with SMF 2.0.x
-Fixed some minor errors with hooks.
-Added a remove file for manual installs.
-Check if jquery is already loaded before use it.
Thank you very much. Didn't saw that sentences. ! ;D
No, that means I updated the mod yesterday, I just forgot to type "new version available" or something like that.
still thank you very much gonna test it in my forum now :)
er..Spoiler is not working >.<
when i click spoiler .
It doesn't spoiler the whole content.
Example
Spoiler
<content>
that's all, there's just a word "Spoiler" ..
Sorry for troubling you again >.<
some more details would be helpful.
link to your site?
My Webpage (http://www.anixekai.com/forum/index.php?topic=1464.0)
Last post on that thread >.< Sorry kinda a lot of pictures T.T
The Hangzhou in the last post where by after the word Hangzhou you will notice the word spoiler but the picture is not in the spoiler.
In Sources/Subs-spoiler.php find:
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
$(document).ready(function() {
var is_visible = false;
$(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
$(\'.spoiler_toggle\').hide();
$(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
$(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
$(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>
replace with:
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
jQuery(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/anixekai/public_html/forum/Sources/Subs-SimpleSpoiler.php on line 92
Parse error: syntax error, unexpected ')' in /home/anixekai/public_html/forum/Sources/Subs-SimpleSpoiler.php on line 92
This error appeared >.<
this is the file
use this one
Quote from: Suki on January 12, 2012, 01:02:28 PM
use this one
yeah, it working now I guess i paste wrong code >.<
may i know which mistakes i did?
Thank you so much :)
Oh ya, how can i change the name of the spoiler? I mean the word "spoiler" in post
It was my mistake for not closing the variable in the replace code
the spoiler word is located in /Themes/default/languages/SimpleSpoiler.yourlanguage.php
Quote from: Suki on January 12, 2012, 01:13:24 PM
It was my mistake for not closing the variable in the replace code
the spoiler word is located in /Themes/default/languages/SimpleSpoiler.yourlanguage.php
Thank you very much ! ;D
I have the same error, it only shows the spoiler word...
I tried that file that you put there and still don't work, it worked fine when I installed, no errors are show in the forum logs and if I use the "reply" button and read the posts the spoiler work... only in the post page that doesn't work
Quote from: Sulfur on January 18, 2012, 01:29:40 PM
I have the same error, it only shows the spoiler word...
I tried that file that you put there and still don't work, it worked fine when I installed, no errors are show in the forum logs and if I use the "reply" button and read the posts the spoiler work... only in the post page that doesn't work
The mod is not intended to work on pre-viewing a message.
Quote from: Suki on January 12, 2012, 01:02:28 PM
use this one
I've replaced my file with this one and the spoiler still doesn't work.
All I see is the world "Spoiler" and then what is supposed to be inside it.
Quote from: imaxorz on January 22, 2012, 09:08:44 PM
Quote from: Suki on January 12, 2012, 01:02:28 PM
use this one
I've replaced my file with this one and the spoiler still doesn't work.
All I see is the world "Spoiler" and then what is supposed to be inside it.
url to your forum.
Quote from: Suki on January 22, 2012, 10:55:56 PM
Quote from: imaxorz on January 22, 2012, 09:08:44 PM
Quote from: Suki on January 12, 2012, 01:02:28 PM
use this one
I've replaced my file with this one and the spoiler still doesn't work.
All I see is the world "Spoiler" and then what is supposed to be inside it.
url to your forum.
http://www.shadecrest.com/forum
I've started using our old Spoiler mod for now, want me to put yours on there?
Without been able to see what could be the problem, I can't help.
You need to remove all code from other spoilers as well, that can cause conflicts.
If some other mod loads jQuery indiscriminately that may cause conflicts too.
Quote from: Suki on January 22, 2012, 11:29:15 PM
Without been able to see what could be the problem, I can't help.
You need to remove all code from other spoilers as well, that can cause conflicts.
If some other mod loads jQuery indiscriminately that may cause conflicts too.
I've installed your mob with the file you provided.
On this thread you can see Spoilers not working http://www.shadecrest.com/forum/index.php?topic=224.0
My Mods
1. Aeva ~ Auto-Embed Video & Audio
3. SMF Gallery Lite 3.1.1
5. SMF Multi Quote 1.1.3
6. Tapatalk SMF 2.0 RC4/RC5/Final Plugin 3.0.1
7. Ad Managment 3.0.1
8. Simple Spoiler 1.0.3
9. Last Active On MemberList
10. Enhanced PM Popup 1.0.1
11. Member Color Link 3.1
Does your browser has JavaScript enable?
I visited the page you link with Opera, FF, chrome and (gulp) IE and it works on all of them.
Try with a different browser or make sure your browser has JavaScript enable.
Quote from: Suki on January 22, 2012, 11:44:20 PM
Does your browser has JavaScript enable?
I visited the page you link with Opera, FF, chrome and (gulp) IE and it works on all of them.
Try with a different browser or make sure your browser has JavaScript enable.
Looks like Java is disabled in Chrome for me as it works in FireFox. Thank you so much.
Edit: I just checked I do have java enabled in Chrome. Very strange. I wonder if it's because I have Java 7 and not 6.
There is no way to prevent viewing the spoilered content until the page is fully loaded?
Maybe using display:none or visibility:hidden at start, and changing it on load? or something else...
Cool and cute mod!
Oh, btw... now I see that clicking on it to show/hide... it is like the content div shakes a bit to the right... like growing and the decreasing a few pixels (not a lot, but you can see it moving and returning)...
Any idea about that? maybe I can change a width somewhere or something similar?
Yes I'll add somce css to hide the div in the nxet version.
The "shaking" is due the way .toggle() works, maybe I should chose another animation instead.
Hey, I absolutely love how your spoiler looks, but I can't seem to get it to work? :o
theslacker.net/forum/
there is a link to a thread in my forum.
:edit It would not let me post the entire link, so it's
Slackers United »
General Category »
Off Topic »
Official Funny Picture Thread
That's where some spoilers are posted and it doesn't seem to be hiding the pictures at all..
It's just saying "spoiler" and it posts the picture. I'm not sure how to fix it :( can you help? thank you in advance!
Do you have a Subs-SimpleSpoiler.php file in the Sources directory?
Quote from: luuuciano on February 06, 2012, 02:11:25 AM
Do you have a Subs-SimpleSpoiler.php file in the Sources directory?
yes, I let it auto install and everything seems to be installed correctly .. that's why I'm confused
Erm.. my mods seem to be not working again >.< When i click to spoiler the content
[spoiler]
contents
[\spoiler]
it turned out in the post is
contents
-without the word spoilers, is like the spoilers not even exist-
how to solve that >.<
Sorry for troubling you again >.<
@telemus @eric1234
If you added some more juery script then probably something else is breaking the call to jquery, this happens when other mods call jquery indiscriminately with out cheking if it is already loaded.
You only need to call jquery once, remove all other calls.
Well... it is like function spoiler_header() is not working there... no headers added
http://theslacker.net/forum/index.php?topic=48.0
I have tried and tried, I ended up running another test forum, and it works fine there, so I have replaced every single file from the default forum to this one, and it STILL doesn't work. I only have simpleportal and this mod running. I replaced all themes, and it doesn't work on any of them.. even replaced all core files
edit:
after replacing all the files, it now shows
Spoiler
<content>
but the button is missing, so again, it looks like jquery isnt being called..
So may i know how to remove other calls? >.<
@telemus there is no button, it's a link not a button, are yu sure you are suing this mod? it appears that you are using another mod already.
@eric1234 you need to knoe what ohter mods that load jquery you installed.
Quote from: Suki on February 08, 2012, 08:54:33 AM
@telemus there is no button, it's a link not a button, are yu sure you are suing this mod? it appears that you are using another mod already.
@eric1234 you need to knoe what ohter mods that load jquery you installed.
Erm, one of the mods that i recently installed is your FAQ (Frequently Asked Questions) mods @.@
I believe it got Jquery ... @.@
No, that mod does not add the jquery library, it uses pure JavaScript
Quote from: Suki on February 08, 2012, 12:01:55 PM
No, that mod does not add the jquery library, it uses pure JavaScript
er..got any tips on how can i know which mods contained jquery? :'(
Check the parser of those mods or ask the mod author, I cannot possible know which mods do you have installed.
I have checked the parser of all the 60 mods , apparently only Simple Spoiler and ResizeImagesToFitScreen( http://custom.simplemachines.org/mods/index.php?mod=1769 ) uses Jquery. Besides that, i felt kinda weird, i thought last time you already helped me solve the issue between Simple Spoiler and Resize mods? How come the problem reoccur again :-\
Again, I don't know, I don't know your site nor the mods you have installed, If the mod was working fine and then it suddenly broke then you have to check what exactly did you do before the mod broke.
The mod do not just magically stop working, if it is not jquery then check for whatever mod that uses $context['html_headers'] as this mod uses this as well, perhaps some other mod author incorrectly re-wrote that variable instead of appending the content.
Whuah , again check inside parser? @.@
Can you have a look of my forum as well?
My Webpage (http://www.anixekai.com/forum/index.php)
>.<
share a link to a spoiler example
Quote from: Suki on February 13, 2012, 09:26:47 AM
Again, I don't know, I don't know your site nor the mods you have installed, If the mod was working fine and then it suddenly broke then you have to check what exactly did you do before the mod broke.
The mod do not just magically stop working, if it is not jquery then check for whatever mod that uses $context['html_headers'] as this mod uses this as well, perhaps some other mod author incorrectly re-wrote that variable instead of appending the content.
Mind to have a check in my forum? :( I give you admin position to check. :'(
I don't have the time to check your site, sorry, if the mod was working then something that you installed later broke it, you need to check what exactly did you install or what did you do.
If it was some other mod that replaces the entire $context['html_headers'] then try to move all the JavaScript code directly to your Index.template.php
May i know where is the entire $context['html_headers'] located? How can i find them? >.<
Sources/Subs-SimpleSpoiler.php
I see. Thank you ! :)
$context['html_headers'] .= '
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
jQuery(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>';
It looked fine to me O.O
It 's fine... the problem is not there... the problem maybe is with another code that uses $context['html_headers'] the same as I do, but instead of appending the content: $context['html_headers'].= they just replace the entire var: $context['html_headers'] =
Just move that code to your Index.template.php on the <head> tag.
You mean move this code to Index template?
$context['html_headers'] .= '
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
jQuery(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>';
Quote from: eric1234 on February 21, 2012, 01:56:25 PM
You mean move this code to Index template?
$context['html_headers'] .= '
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
jQuery(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>';
Yup, that's the code :)
Don't put the exact same code, just the javascript bits:
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
jQuery(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>
inside the echo statement with the closing head tag:
echo '
</head>
replace with:
echo '<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' [<a href="#" class="spoiler_toggle_link">\' + ' . JavaScriptEscape($txt['spoiler_show']) . ' + \'</a>]\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
is_visible = !is_visible;
jQuery(this).html((!is_visible) ? ' . JavaScriptEscape($txt['spoiler_show']) . ' : ' . JavaScriptEscape($txt['spoiler_hide']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'slow\');
return false;
});
});
// ]]></script>
or just attach your theme's index.template.php file here...
Very useful and fun twist. Thanks
Erm..this is my default index.template.php >.<
This is my template's index.template.php
So sorry for troubling you all >.< The rest of my template's index.template.php, i will research and put them in myself : )
use this one
? I don't get it, the file you uploaded will only work with the specific theme, you cannot use it with another theme.
Love the mod and have been using it for a while. I noticed a while back that I had already called jquery this mod was adding another version of it to my headers (older versions too). There should be a miscellaneous mod setting to turn off adding jquery to the header.
Also why are you including the css file when you don't use it?
css file?
The mod does check if you already have jquery loaded, f not, then it loads jquery from Google, if you already have jquery then the mod doesn't load anything.
I can't add a setting for that since is not something I can have control over it.
Quote from: Suki on February 25, 2012, 05:04:34 PM
css file?
The mod does check if you already have jquery loaded, f not, then it loads jquery from Google, if you already have jquery then the mod doesn't load anything.
I can't add a setting for that since is not something I can have control over it.
I guess MLM means that there are several <script src="jquerylink" /> codes added in his header.
Quote from: Suki on February 25, 2012, 05:04:34 PM
css file?
The mod does check if you already have jquery loaded, f not, then it loads jquery from Google, if you already have jquery then the mod doesn't load anything.
I can't add a setting for that since is not something I can have control over it.
Yes you can, I did have jquery loaded from the google cdn already but it was still loading it. and I had to have noConflict going...
All you would have to add is a check modsetting in the admin cp and just say
if($modSettings['simple_spoiler_call_js'])
around the header parts you have in Subs-SimpleSpoiler.php
I know how to add a setting and I told you is not necessary... this script checks for jquery already:
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
if it is loaded already then it does nothing and doesn't load anything.
there is no need to add any setting for that, the mod does it automatically.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.minus.com%2FjrYuZj5YM9pkQ.png&hash=e4e6bbcf0d7fecc859c8e3eef079eaabab8c08a1)
After i use the index.template.php , the problem still persisit >.< Oh my, really sorry for troubling you
do you have another spoiler mod installed?
can you post a link to a topic with an spoiler.
Nope, i dun have any other Spoiler mod installed in the forum
I has edited the post. All the 3 spoilers were images.
The thread (http://www.anixekai.com/forum/index.php?topic=1818.msg10666#msg10666)
Original thread message
[spoiler][img width=600 height=359]http://i1071.photobucket.com/albums/u509/dinomice31/IMAG0407.jpg[/img][/spoiler]
[spoiler][img]http://3.bp.blogspot.com/-drs8z_B31-o/TdebhK6T1cI/AAAAAAAAB-w/-yMk7j6cmek/s400/ccc7.jpg[/img][/spoiler]
[spoiler][img]http://1.bp.blogspot.com/-b2bpZUxCKRQ/TxpL3VxP93I/AAAAAAAAPj4/RegYUOJfvDQ/s400/gereja%2Bterbesar%2Basia%2Bbom321%2B%25289%2529.jpg[/img][/spoiler]
Mmmm, today I realiced that simple spoiler do not works (maybe at some places only)
For example here: http://ikers.com.ar/index.php/topic,6586.msg103179.html#msg103179
The spoiler is showed as:
Spoiler
No leiste acaso que es ALTAS Cumbres???
@eric1234, @luuuciano change in Sources/Subs-SimpleSpoiler.php
$context['html_headers'] .=
with this:
echo
I do not understand... just an "echo"? is that ok?
BTW... the spoiler, on the ecample url I have posted yesterday... it WORKS now!
Really odd.... maybe the google jquery was not available for some time? mmm
Perhaps it was the google CDN.
by changing $context['html_headers'] .= 'code';
to echo 'code';
the mod will bypass the $context['html_headers'] var, it's just to make sure the problem resides on $context['html_headers'], it is not a solution since it will print JavaScript code before the doctype declaration
Erm, i had changed the code like what you instructed :)
The thing is getting better but still, when i wanna put the spoiler on images, sometimes it works, sometimes it don't and the whole system seem like little laggy. >.<
however, it works fine when i spoiler texts.
Please has a look at the attachment, it was screenshot from the thread that i gave you in the previous post.
the reason it is slow is because you are loading big images, not because of the spoiler.
Quote from: Suki on March 04, 2012, 02:12:30 PM
the reason it is slow is because you are loading big images, not because of the spoiler.
i see. but how come sometime when i click on it, no picture been shown ? :)
You're using the spoiler inside a blockquote and it seems that you modified the script somehow
Nice mod :) Dutch translation:
<?php
global $txt;
$txt['spoiler_show'] = 'Toon';
$txt['spoiler_hide'] = 'Verberg';
$txt['spoiler_desc'] = 'Spoiler';
?>
Quote from: Suki on March 05, 2012, 10:03:59 AM
You're using the spoiler inside a blockquote and it seems that you modified the script somehow
block quote? @.@ and what script you mean >.<
Erm..any idea how to remove the "Spoiler []" :)
What exactly did you do?
install and change the codes base on ur direction >.<
Did you install it more than 2 times?
Did you have any other mods that uses jquery?
I install it more than 2 times
no more, i remove the auto resize image mod, so now the simple spoiler works fine :)
Suki, to avoid conflicts it would be better to use something like this:
$context['html_headers'] .= '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
jQuery.noConflict();
jQuery(document).ready(function($) {
BTW, I just realized that texts are not changing properly on nested spoilers... funny (show/hide)
Yeah, nested spoilers are a pain, I'm seriously thinking on ditch the jquery effect and just offer a pure JavaScript spoiler
the spoiler works fine but not the words :-\
which words?
do you use another language besides English?
These words
Spoiler []
Spoiler []
refer to the attachments
Nope, i only use English >.<
any errors on your error log? it seems the mod is installed 2 or more times
Yeah got , mainly this 2 errors
8: Undefined index: spoiler_hideFile: /home/anixekai/public_html/forum/Themes/default/languages/Who.english.php (html_above sub template - eval?)
Line: 197
8: Undefined index: spoiler_showFile: /home/anixekai/public_html/forum/Themes/default/languages/Who.english.php (html_above sub template - eval?)
Line: 191
I installed it more than 1 time Q.Q
Can you try disabling template evaluation, clean the error log and post the new errors?
May i know how to disable template evaluation? @.@
You mean clean all the error log? :)
Quote from: eric1234 on March 15, 2012, 01:19:16 PM
May i know how to disable template evaluation? @.@
You mean clean all the error log? :)
You can disable it by:
Admin > Configuration > Server Settings > "Disable evaluation of templates"
And yes, clean your whole error log.
Done
Got 7 errors but mostly the spoiler errors repeated, which is line 197 and 191. While 1 pretty enable filters.
http://www.anixekai.com/forum/index.php?action=admin;area=logs;sa=errorlog;desc
8: Undefined index: spoiler_show
File: /home/anixekai/public_html/forum/Themes/zentoa_20/index.template.php
Line: 191
http://www.anixekai.com/forum/index.php?action=admin;area=logs;sa=errorlog;desc
8: Undefined index: spoiler_show
File: /home/anixekai/public_html/forum/Themes/zentoa_20/index.template.php
Line: 197
http://www.anixekai.com/forum/index.php?topic=1054.msg8891
8: Undefined index: pretty_enable_filters
File: /home/anixekai/public_html/forum/Sources/Display.php
Line: 74
The third one isn't realted to this mod, most likely related to pretty urls.
The first 2 are because you don't have the proper txt strings in your language files, Open your Modifications.language.php file and add this:
$txt['spoiler_show'] = 'Show';
$txt['spoiler_hide'] = 'Hide';
$txt['spoiler_desc'] = 'Spoiler';
before the ?> tag, like this:
$txt['spoiler_show'] = 'Show';
$txt['spoiler_hide'] = 'Hide';
$txt['spoiler_desc'] = 'Spoiler';
?>
Ok, after i uninstall and reinstall again the Spoiler, it seem to be work fine now
Hopefully in future will not have any more problem , because i am still playing and discovering the forum >.<
Thank you so much ^^
I'm going to re-write this one completely and offer some more options, perhaps a pure css option, a pure JavaScript and a jQuery option.
Perhaps offer a way to customize the look and feel of the spoiler, offer a button or something like that.
Quote from: Suki on March 19, 2012, 03:33:52 PM
I'm going to re-write this one completely and offer some more options, perhaps a pure css option, a pure JavaScript and a jQuery option.
Perhaps offer a way to customize the look and feel of the spoiler, offer a button or something like that.
Whoah, it roughly takes u how long to write it? O.O
Hopefully it will got a more elegent feel ! ^^
I don't know the exact time it will take to re-write it, it depends on how much free time I will have, currently my work schedule is pretty unstable so I really don't know.
Quote from: Suki on March 19, 2012, 07:00:47 PM
I don't know the exact time it will take to re-write it, it depends on how much free time I will have, currently my work schedule is pretty unstable so I really don't know.
I see. Still , thank you very much ^^
Is there any way to make this work properly in preview too?
No because this mod doesn't work with the DOM.
Suki, recently I have updated to php 5.4.3 on a VPS, after that some links on ADK Portal did not work, so I downgraded it to 5.3.11...
In the mean time an user told me that the spoiler did not work neither... I could not test it (when the system was using php 5.4.3...
But I remember that you said that simple spoiler needed php 5.x... maybe something changed on latest versions of php, breaking something?
Well, this mod is very simple, I doubt php 5.4 has anything to do with the mod being broken, perhaps the CDN was down or an issue with multiple JavaScript's scripts.
What was the error exactly? does the spoiler bbc button didn't appear?
Strange.
I think i have the same problem (luuuciano).
I used simple spoiler on my Nginx 1.0.4 + PHP fpm 5.3.6,I have no problem.
I have simple spoiler on another apache server with PHP 5.3.10 with no problem.
Now, I have updated my nginx server to Nginx 1.2.0 + PHP fpm 5.4.1, and the spoiler mod doesn't work anymore.(Like 2 other mod doesn't show some link in admin panel thank-o-tomatic and premium Advanced prefix mod of Nibogo).
These are all mod that use hook integration.
simplespoiler doesn't show any bouton and the BBC code is not parsed, all the files and database data is put, there is only one jquery appel and the javascript code is show on the source page.
Are you sure PH 5.4 branch doesn't cause prob ?
I can give you a admin acces if you want see.
Yeah, it is indeed an issue with php 5.4 and how it passes values by reference.
Possibly, possibly not.
In this mod, and likely others, the function signature itself does not indicate that the value should be received by reference, but it's passed as such and as such in 5.3.x it works.
Now, if you modified the function signatures to expect references, my understanding is that it would no longer be call-time by reference but in fact be passed by reference even in 5.4. I haven't verified this, however, but it would be worth trying.
To try it, for this od, edit Subs-SimpleSpoiler.php:
function spoiler_bbc_add_code($codes)
function spoiler_bbc_add_code(&$codes)
and
function spoiler_bbc_add_button($buttons)
function spoiler_bbc_add_button(&$buttons)
And AIUI that should fix the problem.
Hi, Arantor
Your tip fix the problem for me. \o/ (I am happy because i do a lot of test with different version of php, without APC, etc and i don't understand this issue)
I don't understand what you say but it's work.
I think there a some mod with the same problem. I'll talk to Nibogo for this Advanced topic prefix (the mod doesn't show the admin panel link).
And thank-o-tomatic don't show thank post in profil and no link in the admin panel. All this issue is since i have update PHP in 5.4 branch.
I have do the same thing in Sub-ThankYou with :
function ThanYou_add_index_actions(&$actionArray)
function ThanYou_add_admin_areas(&$adminAreas)
function ThankYou_add_profile_areas(&$profileAreas)
function ThankYou_add_profile_modify(&$p)
And it's OK now.
Thank you for this mod, Suki, but I had to uninstall it as it was preventing Preview working when editing post, and also was making font size change in different places. I hope you will be able to fix these issues then I will try again.
The mod doesn't work on preview but doesn't prevent the preview to work.
The font size change is usually related to a bad edit in some files, this cannot happen with this mod since it doesn't modify any file at all.
Can't really fix something that I don't understand, if you could please provide as much details as possible, such as your smf version, then I can help.
I have smf 2.0.2 and when you are editing post and click Preview button it just says "Fetching preview..." forever and the preview never displays. Upon uninstalling this mod, it immediately started working again. And the font sizes went back to how they were.
Thank you for this mod, Suki :)
I've tried this mod, played with it, and arrived to the results I was looking for in my localhost config. There were no problems in localhost, but after installing this mod in my remote hosted forum, it presented some issues:
First it didn't work; only showed the supposedly hided content all the time. No language text strings showed, and it seems that it wasn't calling properly to jquery script.
I managed to solve this modifying Subs-SimpleSpoiler.php, but, though it did work, then came a 2nd problem which is something related to what happened to the last user, IngeJones:
The font size changed; it became bigger than what it used to be.
I'm attaching 2 files that I modified: Subs-SimpleSpoiler.php and SimpleSpoiler.english.php
Thanks in advance! I'll really like to keep using this mod!
What php version are you using?
Try with the new version uploaded a few days ago.
I couldn't reproduce this on any of my local boards with 5.2.x and my server with 5.3.x
Quote from: Suki on June 05, 2012, 08:18:30 AM
What php version are you using?
Try with the new version uploaded a few days ago.
I couldn't reproduce this on any of my local boards with 5.2.x and my server with 5.3.x
5.2.17
Make sure you also download SimpleSpoiler.english.php because it's relevant to the modifications I made for the Subs-SimpleSpoiler.php, if you wanna test it.
Don't know if I'm able to update the PHP version, I'm afraid :-\. I'll ask my hosting service to do it, but it's free of charge, so, you know, maybe they'll ask me to upgrade to a premium plan -.-
I could make it work by replacing the whole spoiler_header() function to this:
function spoiler_header()
{
global $txt, $context;
echo '
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="http://code.jquery.com/jquery.min.js"%3E%3C/script%3E\'))</script>
<script type="text/javascript"><!-- // --><![CDATA[
jQuery(document).ready(function() {
var is_visible = false;
jQuery(\'.spoiler_toggle\').prev().append(\' <a href="#" class="spoiler_toggle_link" style="text-decoration:none;color:#4E392F;">\' + ' . JavaScriptEscape($txt['spoiler']) . ' + \'</a><em>' . $txt['spoiler_sh'] . '</em>\');
jQuery(\'.spoiler_toggle\').hide();
jQuery(\'a.spoiler_toggle_link\').click(function() {
jQuery(this).html(' . JavaScriptEscape($txt['spoiler']) . ');
jQuery(this).parent().next(\'.spoiler_toggle\').toggle(\'fast\');
return false;
});
});
// ]]></script>';
}
With that modification it seems to work, but then the font size becames bigger in other forum areas, as I said in my previous message.
Also, I forgot to mention that I added the following to index.css:
.spoiler_toggle{border:1px solid #8d7147;padding:4px 8px;margin-top:8px;border-radius:6px;background:url("../images/theme/windowbg3.jpg") repeat 0 0;}
.spoiler_toggle_link{background:#D9C59D;border-radius:12px;cursor:pointer;padding:4px 9px;border:2px solid #8D7147;box-shadow:0 1px 2px rgba(0, 0, 0, 0.25) inset, 0 1px 0 #F4DDB6;font:italic bold 12px/2.1em Arial,sans-serif;margin-right:8px;}
Thanks for your time!
EDIT: Just to add some extra info, I even tried moving the spoiler_header() function to index.template.php, with same results.
Sorry for double posting, and I'm not trying to be insistent, but do you were able to test the files that I attached, Suki?
Thanks for your time!
Just remove this parts:
static $header_done = false;
if ($header_done)
return;
$header_done = true;
It didn't work :'(.
Only worked on the local test forum, but not over the online server :'(.
Seems like I have to try another spoiler mod :(
Fell free to try other mods, this isn't the only one.
Is it just me, or does this not support images? I tried entering an image into the spoiler tags, although when clicking 'show' nothing appears. Works fine on the post preview.
Do you got any url with an example?
The mod waits until the whole page gets ready then it hides the content, if the image is big, then it will be visible until the your browser finish to download the image and the whole page.
This URL here for example (with the [img] tags of course); [spoiler]http://weknowmemes.com/wp-content/uploads/2012/06/a-sandwich-maybe.jpg[/spoiler]
It shows up perfectly fine on post preview, although doesn't load on the actual post.
I actually need an url to a topic in your forum where the spoiler is been used.
Oh sorry, misunderstood you.
Here you go; http://www.velocity-server.com/forums/index.php?topic=352.msg9750#msg9750
That image url do not load... http://weknowmemes.com/wp-content/uploads/2012/06/a-sandwich-maybe.jpg not now, at least
Maybe http://weknowmemes.com is down?
Quote from: luuuciano on June 16, 2012, 10:22:10 PM
That image url do not load... http://weknowmemes.com/wp-content/uploads/2012/06/a-sandwich-maybe.jpg not now, at least
Maybe http://weknowmemes.com is down?
It loads fine on my end. Tried it with other images as well, nothing works.
I've actually figured out the problem. The mod Resize Images To Fit Screen (http://custom.simplemachines.org/mods/index.php?mod=1769) was interfering with the spoiler tags from showing the images. Any idea how that could be preventable without disabling the mod? Or is there any better large image handling mods out that work with the Spoiler mod?
Thanks!
I don't know how that mod works or how it affects images, it shouldn't interfere with this mod, all this mod does is ad a div tag around the content to be hide, it doesn't modify the content at all.
Perhaps it's a jquery conflict, the reize mod does the work on load meanwhile this mod does it on document ready.
Very big problem here with your mod
http://www.simplemachines.org/community/index.php?topic=480902.new#new
i hope it helps :)
???
Please provide full details, otherwise I won't even attempt to look at it...
Anyway, there is a bazillion of other spoiler mods out there, this one was a very good way to learn hooks, it has fulfilled its purpose.
Is there an updated version of this mod? Current download is breaking things in 2.0.17. :(
Please be more specific, what do you mean by breaking?
Can't install?
Doesn't add the BBC button?
Is there a JS error?
Are you using https?
I tested it on SMF 2.0.7 https://missallsunday.com/smf20/index.php?topic=1.msg2#msg2
And since I'm on https I had to change the http call to avoid mixed content errors, will commit a fix for it but other than that it works as intented.
It breaks quick edit on client forum, 2.0.17 clean install, http. Quick edit opens but doesn't save, just sits there until refresh, then the edit posts. Replicated on http 2.0.17 test install. It also enlarges font size on board index. No errors. Very strange, as it doesn't change any files and has its own Subs- file.
New release:
Remove jQuery, uses pure JavaScript now.
Add support for DOM changes made by onQuickEdit
Move JavaScript code to its own file.
@Sir Osis of Liver
I have no idea why it enlarged the font size. Rather than trying to figure it out why I re-made the whole thing in vanilla JS.
https://github.com/MissAllSunday/SimpleSpoiler/releases/tag/v2.0
Give it a try, it doesn't use jQuery anymore and uses css animations instead so the fadeIn animation isn't as smooth (or supported on old browsers) as jQuery's.
Works fine in all themes. Thanks, Suki.
Hi,
@Suki thanks for the mod :)
I have seen a strange issue :
When using spoiler tag, in preview, it's OK but after posting, I'm getting :
Spoiler [Show][Show]
You can see a duplicate entry (the first one, the click does nothing) but the second one, it works to display spoiler content.
Do you have an idea why ?
Btw, I have also added the French language but without it, it's the same.
SMF version 2.0.18.
Thanks.
I have found why it happens, it's too difficult to change for me to adapt, it's because there is specific mod in theme that make double button.
Will figure out later.
Thanks.