News:

Wondering if this will always be free?  See why free is better.

Main Menu

Simple Spoiler

Started by Suki, January 28, 2011, 06:50:55 PM

Previous topic - Next topic

XiFiCt69

Of course, it's 3w.avaonline.es [nofollow]

Try to see the Topic number 40. We use a lot of Spoilers there.

Thank you in advance!

Suki

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>
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

XiFiCt69

#42
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.

Omar Hawk

German Translation.

And: Please make it work with 2.0RC5. ;)

Suki

This mod has been updated for RC5, it will work on RC4 and RC5, also added german translation thanks to Omar Hawk
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Eudemon

#45
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

Suki

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.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Eudemon

sure, some instructions would help

thx

Suki

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']
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Eudemon

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

!RFAN

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

Suki

@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>
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Quexinos

#52
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

Suki

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
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

cabolivar

#54
Im having problems :S

1. Spoiler doesn't work (SMF 2.0 RC4)
2. Trying unistalling
3. Unistalling page (Completely empty)

Thanks a lot ;)

Suki

you are using an old version, read the topic, I posted instructions on how to uninstall
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

cabolivar

Pues si lo desinstalé y lo volví a instalar pero no funciona, está igual.

Suki

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

cabolivar

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

Suki

why is not working?  do you have another mod that calls jquery in the head tags?   url to your forum?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: