User talk:Malvineous

Skins for all Users
How do i make this Skin: Vector-DarkCSS the default for all users, even at login?

Hi, was wondering if you could help me with an extension I'm working on (as your Extension:FlvHandler seems to be the only extension I've seen using ImageBeforeProduceHTML hooks successfully, and that's where I have a problem). I'm trying to make the wiki display XCF images as multipage-documents. Now, my webserver is already configured such that requesting /images/f/f5/imagename.xcf/layername.png will pull a layer out of an XCF file; I've written an ImageBeforeProduceHTML function which generates javascript to request all the layers and display them as a stack. But I can't figure out how to force this to be called ... including an just gives me a text link to File:filename.xcf, and my hook function isn't called.

Do I need to implement the ImageHandler too? I can't seem to find any comprehensible documentation on that class, so any help would be much appreciated. -- 81.151.233.20 17:25, 23 May 2011 (UTC)


 * Hmm, it has been a while since I looked at this. I think ImageBeforeProduceHTML is only called before an tag is generated - so if you get a (red) text link to File::filename.xcf there would be no tag, and hence no call to ImageBeforeProduceHTML.  I would guess that yes, you do need to implement an ImageHandler.  This might not be such a bad thing, as it would mean you can then use .xcf files in other places (e.g. image galleries) if you make your ImageHandler generate a thumbnail.  Or you could take the easy way out and make the ImageHandler generate a blank image so that ImageBeforeProduceHTML will be called, but the .xcf file will just appear as a blank image if it's used somewhere else (e.g. actually visiting the uploaded file's preview page.) -- Malvineous 22:36, 23 May 2011 (UTC)


 * Thanks, I was guessing it'd be something like that. I'll have to try and get my head around ImageHandler I guess ... but it seems like an awful lot of extra effort (do you know if there's some way to just output the URI of the actual image as blah.xcf.png instead of blah.xcf and let mod_conversion handle the actual image processing?)
 * Or maybe I'd be better off using the ImageHandler from Extension:Xcf ... only just found that.
 * Many thanks -- 62.49.26.154 14:28, 24 May 2011 (UTC)


 * Well, still working on this ... I'm not sure what methods are missing from my ImageHandler class, and I can't find any coherent documentation on it. Did you have some? I've implemented every part I can understand, but [[Image:blah.xcf]] on any page still gets rendered as a (blue) text link to File:blah.xcf; and the thumbnail on the image page is still the "blank page" icon it used for unknown filetypes. I've tried inserting breadcrumbs (statements that log to a db table) in both the ImageBeforeProduceHTML hook, and all over the ImageHandler class, and none of my methods are even being called. I'm completely clueless here -- 90.215.170.74 21:34, 4 June 2011 (UTC)


 * It's difficult to say what the problem is without seeing the code. Perhaps you're not registering the hook correctly, so MediaWiki doesn't know it is supposed to call your code?  I didn't end up using any documentation, I just looked at the SVG handler that comes with MediaWiki and copied what I needed from there.  FlvHandler is probably a bit simpler, so all I can suggest is comparing your code against FlvHandler (particularly the part where it registers all the classes with the core code) to make sure you haven't omitted any steps. -- Malvineous 00:28, 5 June 2011 (UTC)

MassEditRegex
Hey Malvineous. Please look at Extension_talk:MassEditRegex. Regards, SVG 09:39, 2 August 2011 (UTC)
 * Thanks, I have been keeping an eye on the page but I just haven't had the time to sit down and figure out a proper fix! -- Malvineous 11:04, 2 August 2011 (UTC)

Starts with blank window, ffmpeg not working
I have two problems with this extension:

1.) When I start the video, I can hear the sound, but instead of the video there is only a white screen. When I pause the video and resume it, then the video plays normal.

2.) ffmpeg is installed and configured correctly imho, but it does not create thumbs, I only see fileicon.

Any advice is appreciated.


 * If you can hear sound then the extension is working, maybe Flash isn't installed properly. I'm not sure why ffmpeg isn't producing the thumbs, but some versions are not compatible with the various switches.  Try running the same ffmpeg command manually and see if you get any errors. -- Malvineous 09:50, 9 October 2011 (UTC)


 * I just installed the newest Flash plugin but without any effect: still my browsers (Firefox, Safari, Opera) are showing a blank window overlayed with fileicon and playing only the sound when I click the first time on the start button. When I pause the video and resume it, everything is ok: the overlayed fileicon disappears and the video is shown correctly. I use the newest flowplayer 3.2.7. Also ffmpeg is still not working within FLVHandler; on the command line it runs fine and generates a thumbnail as desired. I use the newest ffmpeg on a Debian server. FLVHandler is new - fetched yesterday via SVN. My MediaWiki is also up to date. Is there something wrong with the playlist parameter and config of flowplayer?


 * One problem is solved - the blank screen: The flv was not created correctly; I created it locally unter MacOS with ffmpeg and it seemed to be fine. Now I created it on my linux server with ffmpeg and the option -g 30 and flvtool2 -U. Now the video starts correctly within the flowplayer. But the creation of the preview thumb and the correct sizing of the video is still lacking, ffmpeg seems not to be called by FlvHandler at all.


 * You have to use the exact same ffmpeg command as FLVHandler otherwise you won't know whether it works properly. The command used is ffmpeg -vcodec png -i $input -ss 0 -vframes 1 -s $widthx$height -f image2 $output You should also confirm you can upload images, as it will fail if the images directory is not writable by the webserver. -- Malvineous 22:31, 11 October 2011 (UTC)


 * You can also try setting Manual:$wgDebugLogFile to see any error messages produced by FLVHandler. -- Malvineous 22:36, 11 October 2011 (UTC)


 * As already written the generation of thumbnails on the command line works without any problems. I replaced $input with /tmp/test.flv and $output with /tmp/test.png and it worked on the command line. Upload of images is no problem, I already uploaded several hundreds of images in this wiki. The only FlvHandler related output of debug is:
 * probes is Array
 * [ffmpeg] => Array
 * [cmd] => $path/ffmpeg -i $input
 * [regex] => /Stream.*Video.* (\d+)x(\d+),/
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.
 * [regex] => /Stream.*Video.* (\d+)x(\d+),/
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.


 * Can you confirm you are using the exact same ffmpeg command? It's just that you said it works with the "-g 30" option but FLVHandler does not use this option so I am unsure whether you are just running ffmpeg with minimal parameters or whether you are using the exact same parameters as FLVHandler.  It is possible if the probe to get the size fails then $width and $height are not correctly replaced, leading to an invalid ffmpeg command line.  Maybe you could insert an 'echo' statement before FLVHandler runs ffmpeg to see the exact command line after all the parameters have been replaced? -- Malvineous 22:25, 12 October 2011 (UTC)


 * Yes, I can confirm that I use the exact same ffmpeg command: ffmpeg -i /tmp/test.flv -ss 0 -vframes 1 -s 320x200 -f image2 /tmp/test.png entered on the command line generates the thumbnail. As I wrote above I use "-g 30" for the creation of the *.flv out of a *.m4v on the command line, not within FLVHandler. The probe fails and width and height are replaced by the values of $wgMinFLVSize. I'm unsure in which file at which line to put which echo command.


 * The function getImageSize in FlvImageHandler.php isn't called at all as I just found out. I put in several debug output lines but nothing is written out to the debug log file. The function isEnabled returns true. When I upload jpg or png files, there is no problem at all.


 * Firstly, *please* use the preview button and try to avoid saving until you're sure you have nothing more to add. If you look at the history of this page there are dozens of edits from you, one for every change you made, and I get an e-mail for each and every change which is clogging up my inbox!
 * Secondly, looking at the code again, the debug message you posted above is in the isEnabled function so the extension seems to be active. However the lack of other debug messages suggests that none of the other functions are being called, and that is somewhat baffling.  You should have debug messages that include the command run both when probing to extract the movie dimensions and again when extracting the preview frame.  Do you have any FLVHandler settings in your LocalSettings.php or only the include line?  Unfortunately I have no idea why it isn't working.  I have only tested it up to MediaWiki 1.16.2 so it's possible it has broken in a newer release.  Any chance you can try it with MW 1.16.x?  That would at least explain whether it's your config or MediaWiki at fault. -- Malvineous 11:14, 13 October 2011 (UTC)


 * My settings in LocalSettings.php are:
 * include_once("$IP/extensions/FlvHandler/FlvHandler.php");
 * $wgFlashPlayer = '/extensions/FlvHandler/flowplayer/flowplayer-3.2.7.swf';
 * $wgMinFLVSize = array(320,240);
 * I'm using MediaWiki 1.17.0. I have no older version running.


 * Is there any chance to get an updated version of this extension, which runs fine with MediaWiki 1.17.0?


 * I have just upgraded my wikis to 1.17.0 and FlvHandler works fine. The version of ffmpeg on my web host was new enough that I had to change the command line, so I have just committed that as r4, you can download it from the extension page.  I can confirm that r4 does work perfectly with MW 1.17.0 - both thumbnail generation and video embedding.  I have updated the requirements and troubleshooting pages, so please re-read them first if you are still having problems. -- Malvineous 01:47, 5 November 2011 (UTC)


 * I did as you wrote - without success. I also tested: [[Image:Somefile.flv|thumb|320px]] ; I get neither a thumbnail nor some error messages - MediaWiki just shows Image:Somefile.flv (I inserted the name of an existing file of course).


 * If it displays the filename in red then it means you haven't uploaded it yet, or the extension is not enabled. -- Malvineous 11:26, 5 November 2011 (UTC)


 * The filename is displayed in blue, the file exists and the video is played when I omit |thumb|320px, so the extension is enabled.


 * Do thumbnails work for other images? (i.e. are the correct permissions set on the folder?) Can you set $wgDebugLog and post the result, or e-mail it to malvineous@shikadi.net if you don't want it to go public? -- Malvineous 11:38, 5 November 2011 (UTC)


 * Image handling and thumbnailing works fine for *.jpg and *.png images. I just sent you a part of a debug log via mail.

MassEditRegex r5 with MW 1.18
Hi Malvineous, thanks for the Extension MassEditRegex. In the description you wrote for MW-Version 1.18+ there's a relase r5, but i don't find it to download (only r4)? With r4 + MW 1.18 i get only a white page after applying, even if i use only one page. Can you help me? Thanks
 * Hi, looks like I forgot to update the version number. The correct download is the 'trunk' version, the filename should have "r109642" in it somewhere.  Not sure why the 1.18 download gives you the older version, I'll have to look into that. -- Malvineous 00:03, 21 January 2012 (UTC)

MassEditRegex not work
Hi Malvineous. My wiki does not works with your extension. My version is:


 * MediaWiki 	1.18.0
 * PHP 	5.2.17 (apache2handler)
 * MySQL 	5.0.77

I tried to download both 1.18.x version (r90287) and trunk version (r109692). But I get only a blank page after applying, even if I only edit one page. Can you help me? Thanks -- 113.172.89.133 18:24, 27 January 2012 (UTC)


 * Sorry for the delay in replying. Unfortunately there seem to be a number of issues with the edit API and MW 1.18+ so I intend to rewrite that part of the extension so that it no longer uses the API.  This should speed up page editing too.  Please keep an eye on the extension's page and try the next version as hopefully that one will work. -- Malvineous 11:04, 7 February 2012 (UTC)

Dear Malvineous,

I can't wait to use your MassEditRegex extension, unfortunately I have the same problem than the user above (blank page after applying).

Could you give us an indication when you might be able to provide an updated version?

Many thanks for your great work so far!

--Sochin67 (talk) 15:01, 7 March 2012 (UTC)
 * Hi, sorry, unfortunately I don't have any plans to update it just yet (too many other things to do!) Once I upgrade to MW 1.19 I will hopefully get a chance to update it. -- Malvineous (talk) 12:47, 28 April 2012 (UTC)
 * I had the same problem and I checked my apache error_log after clicking the "Execute" button. The class "DerivativeRequest" ist not implemented in MediaWiki v1.18.x but the MassEditRegex Extension uses it. (The DerivativeRequest class extends the FauxRequest class). I'm currently working on a company Wiki and I did not want to update to version 1.19.x cause I updated to version 1.18.2 one month ago. But back to the issue: I downloaded MW-v1.19.2 and copied the "DerivativeRequest" class definition from /includes/WebRequest.php to my WebRequest.php in Version 1.18.2 and it works! The only problem is that you will get the "PHP Notice: Undefined index: gettoken in /includes/api/ApiMain.php" notice in your Apache error_log. --Schrotteh (talk) 11:45, 5 September 2012 (UTC)