Extension talk:JSpoiler

Latest comment: 10 years ago by 89.222.167.6 in topic Video embedding not working

this does not work!

Undefined variable

edit

Getting this error:

 Notice:  Undefined variable: frame in /var/www/zavtra.bezslabostei.ru/extensions/JSpoiler/JSpoiler.php on line 109

--SimonLitt (talk) 07:34, 17 February 2013 (UTC)Reply

Fixed the problem by adding the line "$frame = "";" between "global $defaultText;" and "$outputObj = $parser->recursiveTagParse( $input, $frame );". So that's how my code looks like:

global $defaultText;
$frame = "";
$outputObj = $parser->recursiveTagParse( $input, $frame );

--Aduril (talk) 11:42, 4 March 2013 (UTC)Reply

Undefined index

edit

Getting this error:

 Notice: Undefined index: text in /var/www/northisup/mediawiki/extensions/spoiler.php on line 110

This problem can be fixed by replacing

if ($argv["text"] == "") {

with

if (empty($argv["text"])) {

--Gary Anderson 22:54, 14 February 2010 (UTC)Reply

Break list

edit
  • When using a numbered list, it breaks. How to solve the problem?

Problems with reference-extension

edit

Hey, i have problems with this and the cite.php-extension(for the references).

If i have a spoiler after a reference the reference will not be displayed.

What can i do?

Solved

edit

Now i just use the Collapsible Tables. They are FAR better.

Parser issue

edit

At mediawiki 1.17 I get the following error:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/.../includes/parser/ParserOptions.php on line 292

I fix it by replacing following lines

$localParser = new Parser();
$outputObj = $localParser->parse($text, $parser->mTitle, $parser->mOptions);
...
$output .= $outputObj->getText() . "\n";

to

$outputObj = $parser->recursiveTagParse($text);
...
$output .= $outputObj . "\n";

--SimonLitt 12:57, 8 September 2011 (UTC)Reply

-

edit

How can I download this extension for my MW1.16 if there isn't any link provided? Another question: For what reason is the instruction how to install it if noone can download it? 178.183.175.31 22:32, 15 May 2012 (UTC)Reply

My mistake, I can download by manual copying a code to a php file. But more easier would be to provide a "pack" of necessary files to download (IMO).
178.183.175.31 22:40, 15 May 2012 (UTC)Reply
edit
  • add z-index : $spoilerCSS = "border: 1px solid black; background-color: #EEEEF2; padding: 5px 15px;position:absolute;z-index:100;";
  • change block to inline : styleObject.display = 'inline';\n" .
  • delete ALL newLine in renderSpoiler function:
  • litlle bug: spoiler appears on side. It can be fixed by setting 0px to css-left or css-top ... or both...

(Sorry for bad english)

Video embedding not working

edit

Hi.

I have installed JSpoiler 1.2 and Mediawiki 1.22. Also using EmbedVideo and WidgetsFramework exstensions. Notifies you that since version 1.2 video under spoiler has stopped working.

Example code

<spoiler text="">{{YouTube:id=-gJTtAyoaQk|width=392|height=220}}</spoiler>

With JSpoiler 1.1 everything works fine.

--89.222.167.6 06:36, 10 January 2014 (UTC)Reply

Signatures not working

edit

Hi, nice extension! We had a problem with signatures, which remained as ~~~~ when enclosed within spoiler tags, which was a problem for us. I found out it was due to this bug in Mediawiki, but that if you are able to edit your mediawiki source then you can fix it by implementing the solution pointed to in comment 80. This requires the change to Parser.php specified on that page. (You do not need to change CoreTagHooks.php as shown. That is to get the gallery tag to work better.) You then modify the setHook line in JSpoiler.php to

$wgParser->setHook( "spoiler", "renderSpoiler" , array('preSaveTrans' => true));

and then signatures work.

Return to "JSpoiler" page.