News:

Join the Facebook Fan Page.

Main Menu

Simple Spoiler

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

Previous topic - Next topic

eric1234

Erm..this is my default index.template.php >.<


eric1234

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 : )


Suki

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

eric1234


Suki

?  I don't get it,  the file you uploaded will only work with the specific theme, you cannot use it with another theme.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

MLM

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?

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Suki

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

NanoSector

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.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

MLM

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

My Themes:

My Mods:

Unsolved Threads:
  • None atm...

Suki

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

eric1234



After i use the index.template.php , the problem still persisit >.< Oh my, really sorry for troubling you

Suki

do you have another spoiler mod installed?

can you post a link to a topic with an spoiler.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

eric1234

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

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]

luuuciano

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???
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Suki

@eric1234, @luuuciano  change in Sources/Subs-SimpleSpoiler.php

$context['html_headers'] .=

with this:

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

luuuciano

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
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Suki

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

eric1234

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.


Suki

the reason it is slow is because you are loading big images, not because of the spoiler.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

eric1234

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 ?  :)

Advertisement: