Difference between revisions of "Talk:File Link Extension"

From assela Pathirana
Jump to navigationJump to search
(Good idea. Won't work.)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Corrupted File ==
It's impossible for me to uncompress the downloaded folder
I've tried several tools ( winzi, winrar, simplyzip ect) to uncompress your file.
Is there another source to dowload the file from?
Greetz, --[[User:JCBehre|JCBehre]] 10:35, 25 June 2008 (GMT)
== Correction ==
the<pre><nowiki>
the<pre><nowiki>
#settings for fileLinkExtension
#settings for fileLinkExtension
Line 135: Line 142:
</pre>
</pre>
I tried the guy's suggestion for MW 1.9, but this made no difference.
I tried the guy's suggestion for MW 1.9, but this made no difference.
----
Hi!
I've had no problem with it in MW 1.10 but I get exactly the same error-messages as above when I try to use it in MW 1.11.0. :-(
Could somebody please look into it, because if I cannot get this extension to work, I cannot update my wiki to MW 1.11.0
Thanks!
--[[User:Kawo|Kawo]] 23:19, 15 January 2008 (JST)


== Obviously ==
== Obviously ==


Obviously noone cares to update this extension.
Obviously noone cares to update this extension.
This extension really is a hack, and a hack that doesnt work in later versions of MW.
This extension really is a flaky hack, and a hack that doesnt work in later versions of MW.
 
== Good idea. Won't work.  ==
 
The main problem here is that the browsers strip off path information before letting the DOM handler see it. In other words, you can browse for the file, but the directory information will be lost, and you'll end up just with the file name.
 
If anyone has different browser experiences (I'm using FF 3.0), let me know.
 
Fixing the problems with MW 1.11+ isn't a problem. Just have the function "return true;" at the very end in the extension file. But the above problem isn't solvable, AFAIK. --[[User:Otheus|Otheus]] 13:43, 9 July 2008 (GMT)

Latest revision as of 13:44, 9 July 2008

Corrupted File

It's impossible for me to uncompress the downloaded folder I've tried several tools ( winzi, winrar, simplyzip ect) to uncompress your file. Is there another source to dowload the file from? Greetz, --JCBehre 10:35, 25 June 2008 (GMT)

Correction

the

#settings for fileLinkExtension
$wgFilelinkExtensionPath = "extensions/FilelinkExtension";
include("$IP/$wgFilelinkExtensionPath/FilelinkExtension.php");
#end settings for fileLinkExtension

should be

#settings for fileLinkExtension
$wgFilelinkExtensionPath = "extensions/FileLinkExtension";
include("$IP/$wgFilelinkExtensionPath/FileLinkExtension.php");
#end settings for fileLinkExtension

(note the uppercase "L" in "FileLinkExtension") with the provided pathes

also there is a minor glitch:
the file:///-icon is showing up two times on the edit page, but showing up not at all at the "show preview" page. my skills in programming php and js are nearly zero, so any help would be highly appreciated. --Mel999 19:08, 4 May 2006 (JST)

now it's perfect, thank you very much! --Mel999 01:12, 15 September 2006 (JST)


another issue had come up here: I see the "some problem with FileLinkExtension"-alert very often, mainly with newly created pages, but cannot reproduce it at 100% :-(
i commented out the update and the preview mode changes, but didn't help. would there be a workaround to not show the annoying alert?


btw: you probably did mixup some of your extensions ;-) imho it should be

function filelinkDo (&$parser, &$text){
 global $wgRequest;
 global $wgFilelinkExtensionPath;

instead of

function addbuttonDo (&$parser, &$text){ 
 global $wgRequest;
 global $wgAddButtonExtensionPath;

--Mel999 17:16, 18 September 2006 (JST)

Corrupted file for 0.2.tar.gz?

When I download and untar the FileLinkExtension.0.2.tar.gz, it appears to be corrupted. Here's my anonymized session transcript:

user@host extensions $ md5sum *.gz
4480583ab11f8eff909831d2fdc6f86b  FileLinkExtension.tar.gz
2a7bca5f8fdb81b261a8015b68a90a85  Image FileLinkExtension.0.2.tar.gz
user@host extensions $ gzip -d Image\ FileLinkExtension.0.2.tar.gz
user@host extensions $ tar -xvf Image\ FileLinkExtension.0.2.tar
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors
user@host extensions $

The FileLinkExtension.tar.gz can be untarred OK. I've also tried to untar the 0.2.tar.gz file using WinZip, but I get a similar error message.

some problem with FileLinkExtension

a "Solution" to the "Problem" could be to comment out the alert function ;0). I can not see any Problem with the extension in my Wiki, so i choosed to comment out the alert function.

edit "mainfile.js" search for

alert("some problem with FileLinkExtension");

...replace with ...

//alert("some problem with FileLinkExtension");

br Patrik


The problem-message only occurs when I put the button into the preview-mode. Perhaps this will help finding the cause of the problem.

I used Patrik's "solution", so I don't see the message anymore, but I'd like to know what caused it to appear in the first place. ;)

--Kawo 22:25, 20 July 2007 (JST)

extension-directory of current version

The lines for LocalSettings.php should look like this for the current version of the extension

#settings for fileLinkExtension
$wgFilelinkExtensionPath = "extensions/FileLinkExtension.0.2";
include("$IP/$wgFilelinkExtensionPath/FileLinkExtension.php");
#end settings for fileLinkExtension

--Kawo 22:20, 20 July 2007 (JST)

Extension doesn't work on MediaWiki v1.9+

Howdy good folk. Thanks for this extension - i'm using it in an internal company Wiki. Found a bug in the code which seems to crop up for MediaWiki Version 1.9+. The extension throws an error, expecting a return value from fileLinkDo, called by ParserBeforeTidy.

Fixed this by replacing:

#########new part###########
 static $done=0;
 if ( $done ) { 
   return;
 }
 $done=1;

with

#########new part###########
 static $done=0;
 if ( $done ) { 
   return true;
 }
 $done=1;


... and adding a return false; (instead of return;) to the else section as below

 }else{
   //Either not an edit attempt, or not logged in 
   //Do nothing be silent without bothering innocent visitors. 
   return false;
 }

Otherwise, awesome extension. This will be handy because I'm trying to get Wiki doco happening in a rusted-on Sharepoint shop!

This extension doesnt seem to work on MW 1.10

Hi guys.
Id love to be able to use this extension on MW 1.10, but it just keels over.
When I load a page, the page loads fine, its only when going to Edit a page, it throws an exception.
Here is the output:

Internal error
Detected bug in an extension! Hook filelinkDo failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:

#0 /var/www/html/mediawiki/includes/Parser.php(332): wfRunHooks('ParserBeforeTid...', Array)
#1 /var/www/html/mediawiki/includes/OutputPage.php(357): Parser->parse(''''Warning:''' ...', Object(Title), Object(ParserOptions), true, true, NULL)
#2 /var/www/html/mediawiki/includes/OutputPage.php(334): OutputPage->addWikiTextTitle(''''Warning:''' ...', Object(Title), true)
#3 /var/www/html/mediawiki/includes/EditPage.php(995): OutputPage->addWikiText(''''Warning:''' ...')
#4 /var/www/html/mediawiki/includes/EditPage.php(433): EditPage->showEditForm()
#5 /var/www/html/mediawiki/includes/EditPage.php(285): EditPage->edit()
#6 /var/www/html/mediawiki/includes/Wiki.php(437): EditPage->submit()
#7 /var/www/html/mediawiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#8 /var/www/html/mediawiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#9 {main}

I tried the guy's suggestion for MW 1.9, but this made no difference.


Hi!

I've had no problem with it in MW 1.10 but I get exactly the same error-messages as above when I try to use it in MW 1.11.0. :-(

Could somebody please look into it, because if I cannot get this extension to work, I cannot update my wiki to MW 1.11.0

Thanks!

--Kawo 23:19, 15 January 2008 (JST)

Obviously

Obviously noone cares to update this extension. This extension really is a flaky hack, and a hack that doesnt work in later versions of MW.

Good idea. Won't work.

The main problem here is that the browsers strip off path information before letting the DOM handler see it. In other words, you can browse for the file, but the directory information will be lost, and you'll end up just with the file name.

If anyone has different browser experiences (I'm using FF 3.0), let me know.

Fixing the problems with MW 1.11+ isn't a problem. Just have the function "return true;" at the very end in the extension file. But the above problem isn't solvable, AFAIK. --Otheus 13:43, 9 July 2008 (GMT)