A database for my data

From: Ally17 Nov 2008 22:05
To: ANT_THOMAS 6 of 158
Right, are you talking about the server and the browser being on the same computer? If so what you're talking about could, in theory, work... if Apache is running under the right username. Maybe. I've never tried it because it's mental.
From: ANT_THOMAS17 Nov 2008 22:11
To: Peter (BOUGHTONP) 7 of 158

My later posts might explain it better, but I'll explain again.

 

Clicking a link to a file will give the options to Save As or Open With. Since I don't want to save it, and opening with just sticks the file in a temp directory this isn't what I want. With the success of opening the file being dependent on the other files in the folder it just wouldn't work.

 

Like I've said. I'd like to click a link that opens a program installed on the computer telling it to open a certain file, that file will be local meaning directory access is fine.

 

I'll probably make two versions/an option for the webinterface. One for home and one for uni. Where the home version will link to the NMR data saved on my server which is essentially a local link since the drive in question is mapped as Z whereas at uni they're a network address:

 

\\vol5\vol3\NMR................\2008-10-21-AB-26\10\fid

From: ANT_THOMAS17 Nov 2008 22:13
To: Ally 8 of 158

No, but yes. At home the data is on the server which is on the same network, with the drive mapped to the computers using it.

 

At uni the computers are on the same network but it is a network address instead of a mapped drive, but a fully accessible directory structure.

 

 

 

Edit : Oh, the data (spectra folders) will be stored both at Uni and Home. Meaning full directory access is possible from both and they will be independant from each other.

EDITED: 17 Nov 2008 22:14 by ANT_THOMAS
From: ANT_THOMAS17 Nov 2008 22:16
To: ALL9 of 158

Right. I have realised some possible confusion.

 

Database will be on my XP server in the attic.

 

The NMR data is on both my personal server at home and the fileserver at uni.

 

Computers at home have this data accessible via a mapped Z drive.
Computers at uni have this data accessible via \\vol5\vol3\NMR................\2008-10-21-AB-26\10\fid

 


Hope this clears that up.

From: Peter (BOUGHTONP)17 Nov 2008 22:18
To: ANT_THOMAS 10 of 158
I think I'm getting an inkling of what you're trying to do, but still a little confused. If I'm understanding right, then the following should work.

Pick a few letters, to use as the extension.

Then, in a directory associate that extension with SpinWorks (Tools>Folder Options>File Types) by setting the default open action to the SW application.

Then, you can simply do stuff like this:
code:
<a href="Z:\Docs\Uni\MPhil\NMR\2008-10-21-AB-26\10\fid.my_sw_ext">blah</a>

...and the browser will open the local copy of the file, rather than saving a temporary copy.

Actually, you might need "file://z:/Docs/Uni/.../10/fid.my_sw_ext" instead... can't remember if the first will work or not.

Also, for uni you'll need to use SUBST to map the network path to drive Z - assuming you want to use the same links for both locations.
Otherwise you'll have to do:
code:
<a href="file://fdgdfg/dfg/fid.my_sw_ext">home</a> <a href="\\dsmfkdsm\dsfsd\dsf\fid.my_sw_ext">uni</a>
for everything, which may or not be desirable?
EDITED: 17 Nov 2008 22:22 by BOUGHTONP
From: Peter (BOUGHTONP)17 Nov 2008 22:22
To: ANT_THOMAS 11 of 158
(I just edited my post a bit after you read it.)
From: ANT_THOMAS17 Nov 2008 22:31
To: Peter (BOUGHTONP) 12 of 158

Right, ok.

 

I was hoping that giving the files an extension then just associating Spinworks with that extension might help.

 

Also, having two different links for home and uni is absolutely fine.

 

I've just opened Z:\Docs\Uni\MPhil\NMR\2008-10-21-AB-26\10\fid.fid (after renaming it) from the Firefox address bar, it gives me the option to open the file with Spinworks and it works as I want it to. So that's good news. As does doing the \\server\d$\Docs\... version.

 

BUT...Another stumbling block will be that renaming the uni copy and giving it a file extension could be a problem and something I'd like to avoid doing

From: Peter (BOUGHTONP)17 Nov 2008 22:40
To: ANT_THOMAS 13 of 158
Hmmm, well I don't know if you can associate no-file-extension with an application.
You could give it a try if you really wanted, but personally I'd be paranoid about it having unintended consequences.

If you don't have an extension and just link to the file, you'll get the dialog asking you what application to use... so it should still work, it'll just be an irritating extra step.
From: ANT_THOMAS17 Nov 2008 23:02
To: Peter (BOUGHTONP) 14 of 158

I'll give it a go without the file extension for the uni link and see if it even offers to open it.

 

If it works then the extra step isn't really a problem since it'll be the lesser of two evils whilst being part of a huge benefit.

 

With the database I'll be giving myself a far better way to see what data I have available and it also means not clicking through a directory structure which is about 10 folders deep on a slow network.

From: ANT_THOMAS18 Nov 2008 01:47
To: ALL15 of 158

Right.

 

Setup the DB, pushing and pulling data to and from it easy enough.

 

One problem. I can generate a link which is correct

 

"file:///Z:/Docs/Uni/MPhil/NMR/2008-10-09-AB-49/10/fid"

 

But when I click it nothing happens, whereas if I copy and paste it to the address bar and press enter it gives me the open file dialog as I want.

 

Why does the link refuse to work?

From: ANT_THOMAS18 Nov 2008 01:52
To: ALL16 of 158

If I give it an extension it makes no difference.

 

I've just tried it in IE7 and without an extension it opens the dialog box asking to either save or go online to find an app that can do it, but not to pick an app of my own. With an extension you can choose the app, then tell it not to ask again so it just opens any .fid file in Spinworks straight away. For once IE wants to work properly instead of Firefox :(

From: andy18 Nov 2008 01:53
To: ANT_THOMAS 17 of 158
try setting the link's target="_blank"?
From: steve18 Nov 2008 03:10
To: ANT_THOMAS 18 of 158
It is probably a security thing.

It is a security thing.

http://kb.mozillazine.org/Links_to_local_pages_don't_work#Disabling_the_Security_Check

Read there to turn it off x
From: steve18 Nov 2008 03:12
To: steve 19 of 158
Although it's looking like you might need to enter individual paths into the prefs which would make you go mad :(

https://addons.mozilla.org/en-US/firefox/addon/281

That seems to be an addon that does what you need to Firefox. Although I read somewhere that you still need to use the context menu as opposed to just clicking :C
From: steve18 Nov 2008 03:14
To: ALL20 of 158
}}}}}}}}}} Applications that treat you like a moron with no not-a-moron option {{{{{{{{{

}}}}}}}}}} Anyone who points out Firefox is open source {{{{{{{{{{{

{{{ Sandwich Toasters }}}
From: ANT_THOMAS18 Nov 2008 23:07
To: ALL21 of 158
I've looked further into things and I think the PHP command "exec" is what I might need to use, but, I can't figure out how to get it to work as a link :C
From: Dan (HERMAND)18 Nov 2008 23:16
To: ANT_THOMAS 22 of 158

WIthout reading the thread much (on mobile) exec lets you run a command on the server (as opposed to the client).

 

To do it as a link just pass a variable through. sanitise it though, to stop people running anything on your server.

From: ANT_THOMAS18 Nov 2008 23:18
To: Dan (HERMAND) 23 of 158
Ah, not what I want then. Command needs to be run client side.
From: steve18 Nov 2008 23:20
To: ANT_THOMAS 24 of 158
PC Format coverdisks used to use some form of magic to make the browser run an .exe installer without complaining. It was discussed on the first Delphi PCF forum.

HTH :$
From: Peter (BOUGHTONP)18 Nov 2008 23:59
To: ALL25 of 158
Oooh - investigate HTA - that lets you execute shell commands and also connect to servers.

Assuming uni machines don't block it.