Make a document library that with links to filesystem - sharepoint-2007

I want to make a "master" list or document library on our sharepoint site of links that point to various documents on across our different sites but also ones located in the filesystem eg. \someshare\somefile
I would like have to have the ability to sort these links in folders. I know I can use a list and set the group by columns, but that only gives me a folder structure that is 2 levels deep.
The "Link to Document" content type that can be added to a docoument library works fine for point to documents in sharepoint, but it requres that the url starts with http or https. Is there any way to add a link to a document library that will point to files located on a network share? Note: Due to some large file sizes uploading these files to sharepoint is not an option.
Thanks in advance.

For anyone who has this same problem I found an excellent and simple solution here: http://os.com/blog/linking-to-file-shares-from-sharepoint-document-libraries
Basically it involves modifying one of your layout files to accept file:// at the start of a link.
EDIT:
That link has dissapeared so here is the fix:
Find the file newlink.aspx on your Sharepoint web server(s). Located here by default: Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\newlink.aspx
Whenever making any changes to layout files I recommend creating a backup of the just in case.
Add the following function to the script section:
function HasValidUrlPrefix_Override(url)
{
var urlLower=url.toLowerCase();
if (-1==urlLower.search(“^http://”) && -1==urlLower.search(“^https://”) && -1==urlLower.search(“^file://”))
return false;
return true;
}
Now you have you to change the ValidateInput() and TestDir() functions to call the function you just added. Change every instance of HasValidUrlPrefix(folderUrl) to HasValidUrlPrefix_Override(folderUrl). There should be 2 instances to change. On my original unedited file they were lines 43 and 62.
Save the changes and run iisreset.

Related

Can you create URLs for files in sphinx regardless of where they are saved?

Can you change the location of 'rst' files in sphinx without changing their URIs? I'm working on a documentation where we want to move some files to different folders, without changing the URIs:
For Example: If you create a sphinx project with $ sphinx-quickstart and add some files and folders:
index.rst
/tutorials/howToFoo.rst
/scripts/
With the toctree in in index.rst looking like that:
.. toctree::
:maxdepth: 1
:caption: Processing:
:glob:
scripts/*
tutorials/*
Then after building the project with make html, you have a link in your browser as seen here: tutorials/howToFoo.html
If you want to save the the file in a different folder:
index.rst
/tutorials/
/scripts/howToFoo.rst
Then the URL of your file howToFoo.rst changes depending on where it is saved:
scripts/howToFoo.html.
This is a problem because I don't want links to tutorials or scripts to break.
As the project aims to include many people, it will be very probable that there will be changes in the file structure in the future.
Now my question: Can you create a setup where you can move the files without having to write redirects to their new location, every time you move them?
For Cross Referencing inside of Sphinx this is solved for example with targets, explained here:
https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html#automatically-label-sections
But this doesn't help me because the link in the browser still stays the same.
What I want is a link SomeNeverchangingLinkFor_howToFoo.html regardless of where the file howToFoo.rst is saved.

Absolute path for img and js excluding project folder name Visual Web Dev

I've this little but annoying issue in my project in Visual Web Developer 2010 Express. I'm developing a website with .aspx files located in a large folder structure i.e. www.domain.com/group1/type1/somefile.aspx, the root folder contains a "styles" (for css), "images" and "js" (for javascripts) folder. I've read a lot about base tag, absolute and relative path today. Finally I realized "absolute path" is the best choice for me.
The main problem is that when I preview (locally) my site in browser the absolute links for image, css, and js are not working, I'm using src="/js/gl.jquery.js" which I believe is correct and will work online.
The source code of the page for the javascript says http://localhost:61700/js/gl.jquery.js, when I switch to relative path script src="../../../js/gl.jquery.js" and preview the website, it works fine, and the source code for the javascript path says http://localhost:61700/ProjectName/js/gl.jquery.js (Notice Visual Studio added the ProjectName in the path) So I'm taking my guess that when the project goes online (on a main domain) it will work correctly, but right now I need to keep developing locally without this issue. Is there a way to fix this in Visual Web Developer? maybe some tag for the web.config file that I can remove when goes online, or some website property?
I know a quick solution will be develop with the relative path, and modify the code when goes online to absolute path, but I'm looking for some cleaner method, as aditional information I didn't choose base tag because I read cause troubles with anchors links (href=xx.html#question3) and I need to use them at some big files. And avoid the relative path because it's possible that the company ask me to move some files in the future and I don't wanna be updating relative paths.
Thanks a Lot!
Problem solved! This is the solution I found Thanks to ScottGu's Blog.
I quote the main thing:
when opened a web-site and run the project, VWD launch and run the built-in web-server using a virtual app path that equals the project’s root directory name. For example: if you have a project named “Foo”, it will launch and run in the built-in web-server as http://localhost:1234/Foo/Default.aspx.
One downside to this is that it makes it hard to fully qualify things like static CSS and image files within your site (for example: using root qualified paths like /images/myphoto.jpg or /css/mycss.css). Note that you can use the “~” app path trick for dynamic resources – but static resources still end up being a pain (js, css, images files.) (This was my issue)
Here is the guy entire post: Click Here
Here is the main solution:
1) Using the solution explorer within Visual Studio, select the web-site project node, (the one with the World icon)
2) There is a properties named "Virtual path" at the bottom. Change the "virtual path" setting it to / to run as a root web-site.
And that's it, setting up the / I can manage my files easily.

Create a combined view list in SharePoint 2007

I like to have a main page Web part with a link to each one of the shared documents in our portal.
The problem is that they are from different libraries and also I want the SharePoint to keep track of check in and check outs of the files. When I use, Content Editor to add the links, and then click on the list, it download a copy of file and saved changes do not change the original document.
I thought about creating a modified view in that specific library and filter out just one file. Then put that file in the front page. But, the first problem is that the file is 2 or 3 level deep in hierarchy. Also, even if I manage to do that, what should I do about different files in different libraries?
Please Advise

How to pass parameter to exe downloaded from web?

I have .Net desktop app which users can download from my website. I want to customize this app to per user basis.
Is there way to modify exe before downloading, just to change few strings with appropriate for the users downloading ?
Or it is possible to pass command line parameters to this exe via URL ?
The .exe file needs to be customized for it to behave differently for certain downloads.
Skip below to find the solution I found tolerable.
Add section to the .EXE file – Not ideal.
The .exe file has sections one after the other. You could add a section with your data in it, which the executable would then read. This requires you to modify (have access to) the source code of the executable for it to do anything meaningful with the data. Also getting familiar with the .exe file format and modifying it on the web server side as well al playing with it in the program's source code is somewhat tedious.
Change resources section of the .EXE file – Not ideal.
A dedicated "resources" section exists in the executable. You could add custom strings or blob of data to it. Same cons as the first one.
Overwrite data in the .EXE at a fixed position – Passable.
Have the executable read data from itself from a fixed position in the file, which is overwritten with the customization data when serving the .exe file. Requires modifying the executable's source code.
Append data to the .EXE – Passable.
Append data to the executable. Again, reading it and doing anything special with it requires the executable itself doing so.
☑ Wrap the .EXE in another .EXE and append your data to it – Tolerable.
Create a program to which the original executable and the custom data will be appended to. When this custom program is then executed, it will extract the embedded executable and launch it with the custom data as it arguments.
This kind of a bundle-executable is also easy to produce on most server-side (scripting) languages. When the download is requested, the server sends the wrapper-exe, the original exe, the customized data and of course some statically-sized data fields denoting the sizes of both of those data blocks so it can extract them.
Cons: Requires such a wrapper program to be created, unless someone already has.
Related links:
1. Best practices to let my web users download custom .exe from my site using PHP
2. Modifying executable upon download (Like Ninite)
If the application is ClickOnce deployed, passing URL parameters is an option in the ClickOnce options dialog. However, I have not yet used this feature.
EDIT
You might want to change some user settings in your configuration depending on the user that actually runs the application. You could also make sure this is done only once per user by adding an appropriate SettingsNeedUpdate setting you set to true after the initial initialization.
Example:
Add new setting "Option1", "Option2" and "SettingsNeedUpdate" which are user settings. In Main you could add something like:
...
try
{
if (Properties.Settings.Default.SettingsNeedUpdate)
{
Properties.Settings.Default.Option1 = ...;
Properties.Settings.Default.Option2 = ...;
Properties.Settings.Default.SettingsNeedUpdate = false;
Properties.Settings.Default.Save();
}
}
catch (Exception exp)
{
...
}
...
You could write a library which can modify an assembly resources (here string table).
This library could benefit from reflection.
When a user asks for your file, asp.net page could customize the exe (using your library) and send it to client.
Not like that, No.
You could however automatically zip (on your server) your exe with a custom app.config file for each user.
Update
Point your download location to a custom HttpHandler that zips together your exe (using http://www.sharpdevelop.net/OpenSource/SharpZipLib/) with a generated (for the current user) application configuration file ( http://generally.wordpress.com/2007/09/27/using-appconfig-for-user-defined-runtime-parameters/).
The user then unzips the two files (MyApp.exe & MyApp.exe.config) to any location and run MyApp.exe.
This method does not work if you have an installer.

why have most of the files in a dreamweaver site been put into a directory called 'upload'?

I cleaned up someone's style sheet for a Dreamweaver site, by editing the css directly, and now the secretary is having trouble using her old template.
Most of the files in her site reside in subdirectories of the 'upload' directory. For example, I would have expected to see the stylesheet in
../assets/css/ etc.
but in fact I'm finding it in
../upload/assets/css/ etc.
In addition to assets, I am also finding Templates and images as subdirectories of 'upload'.
Do you know why this 'upload' directory was used?
I am considering two possible approaches.
(1) Make sure everything needed is in ../upload/ and remove the subdirectories that are directly in the root directory
(2) Edit the template to remove all references to ../upload/
Note that (2) appeals to me because the file structure will be simpler; but I wonder if the client has some sort of extension in her Dreamweaver that causes everything she ftp's to be put into the 'upload' directory.
Note that so far I have copied my cleaned up css file over to ../upload/assets/ as a short-term solution. But they want to be able to make changes to their template, and add new pages, on their own in future.
Thanks.
The likely problem is how she has her FTP remote settings specified. It appears that it now points to the upload folder rather than the web root. Or, it could be that her FTP user account is tied to the upload folder rather than the web root.

Resources