![]() |
SPSFAQ SharePoint Server Frequently Asked Questions |
|
Customising SharePoint
SPSFAQ030148 - Can anyone point me to some resources or code samples for programatically searching SPS for files? Israel Derdik - 0 Comments - stephencummins - Sun, May 5th, 2002 - Customisation Definitely start with the SDK. You can download the SDK at
http://www.microsoft.com/sharepoint/downloads/tools/SDK.asp. You should also check out the kStore Explorer at (http://www.kcura.com). It includes an extensive query processor, that allows you to easily write and execute queries against SPS. Also includes sample query templates to get you familiar with SPS SQL syntax. Andrew The following code fires a query using WebDAV to the document store. It uses search object from the dashboard framework. You can use this code in a web part. If you look in the SPS SDK and look for 'SELECT' for example, you will find extensive info about SQL full-text extensions. This should help you on the way. Dim objHq : Set objHq = New CHTTPQuery objHq.IsAsync = True ' The last parameter indicates whether a content index is used. objHq.StartSearchQuery strQuery, 0, -1, -1, False objHq.WaitForQueryCompletion strResult = objHq.QueryResults Nikander Bruggeman Margriet Bruggeman SPSFAQ030147 - I would like to learn how I can develop for SPS, can somebody tell me where to start? Jeroen De Brabander - 0 Comments - stephencummins - Sun, May 5th, 2002 - Customisation Maybe try something like this:
- Learn about web parts and the vbscript functions in the framework. - Learn about XML and XSL. - Learn about the DDSC object. - Learn about WebDAV SQL. - Learn about PKMCDO. - Learn about WSS schemas. - Learn about events. - Learn about form registrations. - Learn about folder views. - Learn about workflow applications. We would advice you to buy the book from Digital Press about SPS: Microsoft SharePoint Portal Server: Building Knowledge Sharing Applications -- by Kevin Laahs Nikander Bruggeman Margriet Bruggeman SPSFAQ030146 - What's a good way to edit the style of the default dashboard? - 0 Comments - stephencummins - Sat, Apr 27th, 2002 - Customisation There is a good configuration tool from microsoft called chameleon. I think it will be released in the next version of SPS but you can request it free from your local ms office. It is a strait forward utility that lets you select colors, fonts, look-and-feel of everypart of your dashboard including adding your own company logo.
kaj You can get a demo here, assuming it's the same product... http://www.frontlook.com/chameleon/chameleon.asp Stephen Cummins SPSFAQ030145 - How can an XML file be loaded using a VBscript Web Part? - 0 Comments - stephencummins - Sat, Apr 27th, 2002 - Customisation Function GetContent(node)
Dim oDom Set oDOM = CreateXMLDOMObject() oDOM.Load Server.MapPath("gary.xml") GetContent=oDom.xml end function Gary A. Bushey SPSFAQ030144 - Does anyone know how I can declare my own functions in a VbScript part? Anshul - 0 Comments - stephencummins - Thu, Apr 11th, 2002 - Customisation You can only have the getContent function in a webpart. If you want other functions, place them in an ASP file, with <%%> or whatever around them, and use the DashboardExtensions.vbs file to include them.
Mark Munson SPSFAQ030143 - Is there any way to decide if a given document url resides in a smart or normal folder? Christof - 0 Comments - stephencummins - Thu, Apr 11th, 2002 - Customisation Check out the "DAV:contentclass" property of the folder (foldername can be accessed via the "DAV:parentname" property of the document). I think its value for smartfolders is : "urn:content-classes:smartfolder". For 'normal' folders the value is urn:content-classes:knowledgefolder").
Chris SPSFAQ030142 - What is the defaut page (asp file) of the home page created by SPS i.e. http://server name/workspace name/page? Anne - 0 Comments - stephencummins - Fri, Apr 5th, 2002 - Customisation The default page is dashboard.asp. This page generates all dashboards and finds the web parts in them. Don't expect something similar like normal web applications, you won't find the default page in IIS. The default page in SPS is found using a mechanism called forms registrations.
Nikander Bruggeman Margriet Bruggeman SPSFAQ030141 - I've been developing web parts and customizing SPS and I'm starting to think about how to package my code. What can I do? - 0 Comments - stephencummins - Fri, Apr 5th, 2002 - Customisation 1. How do I package resources with my web parts. I know about the possibility of the "<web part name>_files" folder and the
Resource element of the web part XML. But can you give an example of how this works out in practice? What is the precise schema defintion of the Resource element. Can I edit it from Office XP Dev.? How do I import the web part and its resources into a dashboard? 2. I have a HTML web part, which includes a CSS file by using a client-side include (standard HTML LINK tag). If I use the URL http://localhost/... in the href attribute I get en error, but if I use the URL http://mymachinename/... it works. Is this a proxy problem? From a deployment point of view I would prefer using "localhost" instead of hardcoding the machine name. 3. Is there a token replacement mechanism for obtaining the current workspace name in a HTML web part? Morten Pedersen 1. As you've found, you place the resources in the _files directory; you reference those files using the _WPR_ token: <img src="_WPR_/image.jpg">. During development, I sometimes find it convenient to create a _WPR_ directory so that I can develop the webpart w/o it being in SharePoint. 2. Since this is an HTML webpart "localhost" is always the client machine, not the SharePoint Server box; for "localhost" to work you need to have IIS running on the same machine that is running IE. I suspect this isn't really what you want. 3. I don't think there is a replacement token, but you can easily parse it out of window.location var g_WorkspaceUrl; var g_DocumentsUrl; function onload_WPQ_() { // This function is run when this Web Part is first loaded by the Digital Dashboard var url = location.href; if (url.match(/(https?:\/\/[^/]+\/[^/]+)\//i)) { g_WorkspaceUrl = RegExp.$1; g_DocumentsUrl = g_WorkspaceUrl + "/Documents/"; } } Dan Page 18 of 24 - Jump to: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||