create new tag
, view all tags

SlashFilenamePluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on SlashFilenamePlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on SlashFilenamePlugin

To Do List for next version

  • Definite
    • remove hard coded vars, add pref vars to topic
    • add generic defaults to pref vars
    • package plugin as zip
  • Maybe's
    • improve handling of spaces?
  • Wish list
    • IE will ask, "Save, Open, Cancel" for files, even registered types (i.e. word .doc), even for 'trusted' sites. Fix this (don't prompt user) for trusted sites.

Known Issues

  • Add yours here. I'm sure there are some. Regexs are funny animals.

Doesn't play well with TWikiBeta. The path in every URL is interepted as a filename and displayed. As a result every URL is broken and the TWiki site is unusable. -- DeanCording - 28 May 2004

Dean, change

to 0 to prevent this plugin from changing every url -- JoseVenceslau - 06 Feb 2005

Comments, Anyone?

I vave this installed on twiki 2003-Jul-01, Apache-win32 & perl-cygwin and so far it is working very well indeed. Thanks Jonathan!

I have one question at the moment, an offtopic one at that: is it possible to set up IE so that it won't give the "Open, Save or Cancel" dialog when clicking on a registered document type, and only for Trusted Sites?. E.g. can I say don't prompt for .xls & .doc when connected to http://local-intranet-server/ but do ask for any other site?

-- MattWilkie - 22 Jul 2003

I think it's very much on topic. I noticed the same thing. Not sure what the fix or workaround might be. I added it to the wishlist above.

Also. It would be far better to open certain docs in their viewers and not in their full apps (ex: .doc opens with word viewer, .ppt opens with ppt viewer, .vsd opens with visio viewer, etc-- instead of the slower opening in the full app). Or, optionally open the doc within the browser (using plugin) instead of launching the app. The fix for this involves client-side instructions for setting up the mime types to use these viewer-apps/plugins. Unverified cut & pasted instructions follow, to be added to plugin docs.

Configuring a Browser To Read Excel or Word files

The instructions listed below are for configuring Netscape Navigator to read MS Word or MS Excel files. The procedure for other Web browser's is similar.

  • From the Options menu, choose General Preferences.
  • Select the Helpers tab.
  • Click on the Create New Type button
  • In the Configure Mime Type dialog box, type "application" in the Mime Type text box. Type "msword" in the Mime Subtype text box when configuring for Word . (Type "msexcel" in the Mime Subtype text box when configuring for Excel.) Choose OK.
  • In the File Extensions text box, type "doc" (for Word) or "xls" (for Excel).
  • Select the "Launch the Application" option.
  • Click on the Browse button. The "Select an Appropriate Viewer" box will appear and the file directory will be displayed
  • If you have Microsoft Excel or Word installed on your system, browse to the directory and subdirectory that contains the executable command for starting Excel (excel.exe) or Word (winword.exe).
  • If you do not have Microsoft Excel or Word installed AND you downloaded the free Word Viewer and/or Excel Viewer, browse to the directory and subdirectory that contains the Word Viewer (wordview.exe) or Excel Viewer (xlview.exe) program.
  • Once you locate the proper directory, double click on the executable file for the program.
  • The command line for launching the program will appear in the "Launch the Application" text box along with its associated icon at the left of the text box. Choose OK to complete the configuration.

Now when you click on a document file type whose extension ends with ".doc," the Word Viewer (or MS Word) will automatically launch or when clicking on a document file type whose extension ends with ".xls," the Excel Viewer (or MS Excel) will be launched.

To use the external app or internal plugin for IE, do the following (follow exactly for Win9x; for Win2k or WinXP, instructions are similar but not exact).

  • Open Windows Explorer. (Not Internet Explorer)
  • Click "View"
  • Select "Folder Options"
  • Select the "File Types" Tab.
  • Scroll down to: "Microsoft Word Document"
  • Select "Edit"
  • There are four check boxes near the bottom. Uncheck the lower right box: "Browse in Same Window" to launch the program; or, check it to use the browser plugin to view the document.

-- JonathanCline - 30 Jul 2003

I tried to fill in the PluginsAppraisal for this plugin but something in the page creation template is all screwed up and it wouldn't work for me. Twiki.org is way too slow and responsive to try and troubleshoot it right now so I'm adding my thoughts to the dev topic for now.

This is very nearly a must have plugin for our intranet. However there are some significant usability issues which I would like to see solved at some point.

  • it's too agressive. There needs to be an easy way to say not fileslash this text phrase
  • the ALL UPPERCASE STUFF IS TOO MUCH IN YOUR FACE. Using mono text instead would be much nicer. Or maybe css could be used to do small caps or something.

Haven't tried this plugin on CairoRelease.

-- MattWilkie - 03 Dec 2004

Firefox is a lot stricter about how file: is handled. Using this plugin, if I put //server/dir/foo/bar/baz.txt in a topic, then in IE this will link properly. It will fail silently in Firefox. I haven't done exhaustive testing on this, and am only reporting high level symptoms I'm seeing. I'm not a URI/Perl-ite, so am not quite sure how the plugin is generating the file: URI. Again, no problems experienced using IE as client brower, but fails silently in Firefox.

-- SteveAnthony - 15 Feb 2005

Steve: This is a security issue. Firefox by default restricts direct file system access. You can change that:

  • in Firefox type about:config
  • change security.checkloaduri to "false"

-- PeterSchaich - 07 Apr 2005

checked .zip into CVS

-- WillNorris - 19 Jul 2005

Small bug: when the very first thing in a topic is a slashfilename, it isn't converted into a link. Test case:

  1. Create new page
  2. Just enter C:\link\to\file.txt and Save
  3. Voila

-- JosMaccabiani - 09 Aug 2005

BUG: Sometimes it displays all the links in the topic name and all the references to the topic name.

For example:

In the configuration section under Mount Point I specified the following.

'filer:', 'file://///filer.domain.com/'

Then in a TWiki page with topic name NewTopic I put


This works fine but for some reasons it also put that link next to the topic name and all reference to the topic.

it displays "filer:folder/subfoler "> NewTopic"

The link still links to NewTopic but the display text is wrong.

This seems to only happen when a topic is blank or that there is nothing before the slashfilename links.

I am not sure where this bug is coming from - Please help - thanks in advance.

-- AnanSiharath - 27 Sep 2005

This doesn't work in multiple web. Has anyone try this in multiple web?

-- AnanSiharath - 28 Sep 2005

I ran across the same problem that DeanCording mentions in Known Issues above. By default the plugin modifies all links that contain /twiki/, making a huge mess of most TWiki installations.

I would suggest that the plugin be shipped with $EnableShareMap and $EnableMountMap set to 0 by default. At the very least remove the /twiki/ entry from %Mounts.

This is a wonderful plugin, but it could use some better defaults. Good work, we'll get a lot of use out of this one at work.

-- JasonHill - 14 Jan 2006

>Steve: This is a security issue. Firefox by
>default restricts direct file system access.
>You can change that:
> * in Firefox type about:config
> * change security.checkloaduri to "false"

This seems to work on my Firefox 1.07 installation, but for machines at my site that have the most recent version of Firefox installed (1.5) this fix doesn't seem to work. Any ideas on how else to get over this hurdle?

-- KenCapelli - 16 Feb 2006

Looks like there is a fix, here:


-- KenCapelli - 17 Feb 2006

I did try installing this plugin and found that the uri does not re-write right.

For example,

1) a internal drive path: c:\test\test.doc is re-written to <a href="file:///c:/test\test.doc"><a href="file:///C:/TEST\TEST.DOC">C:/TEST\TEST.DOC</a></a>

(Should get rid of one <a href/> pair)

2) a share: \\dropboxes\DROPBOX_README.txt is re-written to <a href="file:////cnet3/dropboxes\DROPBOX_README.txt">//cnet3/dropboxes\DROPBOX_README.txt</a> (href has to be file:///// so it can be redirected by FireFox)

Interestingly, the same re-written can work in IE. No matter how hard I've tried applying the above mentioned fixes, FireFox is just silently ignored my clicks & nothing can be brought up, while things can work perfectly fine in IE.

Please advise

-- XinhuanZheng - 17 Feb 2006

Minor comments compared to the above:

  • Why does the installation instruction table have the same file listed twice
  • Why not package up the plugin topic text with the distro, instead of making people create the page.

-- MartinGregory - 20 Dec 2006

I changed the ModificationPolicy of this extension from ContactAuthorFirst to PleaseFeelFreeToModify due to inactivity. Anyone please feel free to work on this extension.

-- PeterThoeny - 2012-12-03

Edit | Attach | Watch | Print version | History: r25 < r24 < r23 < r22 < r21 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r25 - 2012-12-03 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.