Download | Usage | Functions | Examples | Revision History
The DP_SharePoint_ReplaceLinks library provides the ability to seamlessly use link protocols normally filtered by SharePoint 2007 in wiki pages and content editor web parts. It was created to support
- Can be included directly into Content Editor Web Parts (which can then be saved as reusable Web Parts and added to Wiki pages).
- Allows for any scheme (protocol) (Notes, RTSP, etc.) to be used within SharePoint content
- Adds special support for Lotus Sametime prescence awareness.
The extension has been tested successfully on Internet Explorer 6+, Firefox 1+ and Opera 9+ and SharePoint 2007.
DP_SharePoint_ReplaceLinks.zip, 2.05kb Zip-Format Archive
Importing the Library
The library must be imported before it is used. To import the library use the <script> tag. For example:
Your path may vary depending on the location of the script on your server. The library can be imported directly before use (most common when lacking administrator access) or added to a common component (if admin/editing rights are available).
Using the Library
Assuming the library has been imported you can run the function at any time:
This will search for specially formatted “news” links and, if found, alter them in place immediately.
The simplest way to use the function is to add a Content Editor Web Part to the bottom of your page (wiki or custom page) that both loads and runs the function similar to the following:
If you’d like to load the function earlier you can leverage the built-in SharePoint functionality to run the function after the “onload” event triggers:
See the Example section for more information how to format the links.
There is only one function currently available in the library, the dpSP_ReplaceLinks function:
This function, when run, will search the host page for specially formatted links using the “news://” protocol and alter them, in-place, to support otherwise filtered URLs.
This method has no arguments:
Null. The function returns no value.
Links are created in the following format: news://*NewProtocol*Address. Once run the funtion will replace “news” with whatever appears between the asterisks in the link and asterisks and new protocol will be deleted. Some examples:
news://*notes*DFGTA001/175479E7006436WS7//3G6EF1B738547906F3652476D000225EER news://*FMP7*127.0.0.1/MyDatabase news://*rtsp*www.youtube.com/somefile.3gp
Sametime Presence Awareness Links
For those people unfortunate enough to be subjected to Lotus Sametime the function can provide intergrated presence awareness. For this to function SameTime must be installed on the client machine. The following example demonstrate how to format such links:
April 14, 2012
- Initial Release.