MW1.15 Not Working - Images on top of each other

Jump to: navigation, search

Fix, works on MW 1.18 and SG 1.1h,
in SmoothGalleryClass.php find (line 283):

$outputPage->addScript( '<script src="' . $extensionpath . '/scripts/mootools.uncompressed.js" type="text/javascript"></script>' );
$outputPage->addScript( '<script src="' . $extensionpath . '/scripts/jd.gallery.js" type="text/javascript"></script>' );
$outputPage->addScript( '<script src="' . $extensionpath . '/scripts/HistoryManager.js" type="text/javascript"></script>' );

and replace it with:

$outputPage->addHeadItem( 'smgal1','<script src="' . $extensionpath . '/scripts/mootools.uncompressed.js" type="text/javascript"></script>' );
$outputPage->addHeadItem( 'smgal2','<script src="' . $extensionpath . '/scripts/jd.gallery.js" type="text/javascript"></script>' );
$outputPage->addHeadItem( 'smgal3','<script src="' . $extensionpath . '/scripts/HistoryManager.js" type="text/javascript"></script>' );

pass parameters fix, in SmoothGallery.php (line 112):

function initSmoothGalleryTag( $input, $argv, $parser ) {
        $output = initSmoothGallery( $input, $args, $parser );
 
        return $output;
}

replace

function initSmoothGalleryTag( $input, $argv, $parser ) {
        $output = initSmoothGallery( $input, $argv, $parser );
 
        return $output;
}
Zck 22:52, 6 February 2012 (UTC)22:52, 6 February 2012

Zck, actually your patch did not work completely for me. What worked was the hybrid approach fixing function initSmoothGalleryTag(), as suggested by you, and patching SmoothGalleryClass.php as suggested by me.

My configuration: MW 1.17, SG 1.1h

Umoenks12:05, 7 February 2012
 

Great job Zck! Your Fix is working fine in Version MW 1.18.1, SG 1.1h. I didn't need to add Umoenks fix.

Regards Norbert

194.15.135.1209:58, 16 February 2012

Maybe I should update to MW 1.18.x ;)

Umoenks (talk)14:34, 16 February 2012
 

Zck your pass parameter fix has two blocks of code with the SAME code in each block.

function initSmoothGalleryTag( $input, $argv, $parser ) {

       $output = initSmoothGallery( $input, $argv, $parser );

       return $output;

}

for both. Is one supposed to be different?

166.122.75.1821:53, 6 March 2012

Yes, one is different. ;) Watch out the $argv parameter. In the second case, it is

$output = initSmoothGallery( $input, $argv, $parser );

instead of

$output = initSmoothGallery( $input, $args, $parser );

which apparently won't work at all.

Umoenks (talk)08:24, 7 March 2012
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox