SPSFAQ
SharePoint Server Frequently Asked Questions
affiliate links


Buy a sponsored link

You could have a link to your website on every page of SPSFAQ.


Customising SharePoint

SPSFAQ030120 - What is the best way to resolve document state? - 0 Comments - stephencummins - Sun, Dec 16th, 2001 - Customisation
I've been thinking about what is the best and the fastest way to resolve document state.

I came to this conclusion: best way is to use operationsallowed-property.
Each state have different allowed operations:

First time checked out document (version 0.0, never checked in) has same allowed operations like document that have been checked out several times
but in different order:
checkin, tahodelete, tahoecopy, tahoemove

Checked Out (at least one or more time checked in and then checked out) has:
checkin, tahoecopy, tahoedelete, tahoemove, undocheckout

Checked In has:
checkout, finalapprove, publish, tahoecopy, tahoedelete, tahoemove

Pending Approval has:
approve, cancel, finalapprove, reject, tahoecopy

Published has:
checkout, tahoecopy, tahoedelete, tahoemove

To look allowed operations in each state you can see that its enough to take first to value from operationsallowed-property and resolve document state like function below:


Function GetDocumentState(DocumentURL)

Set oDoc = CreateObject("CDO.KnowledgeDocument") ' let's late bind
DocumentState = "Unknown"

oDoc.DataSource.open DocumentURL
OperationsAllowedArray =
oDoc.Property("urn:schemas-microsoft-com:publishing:operationsallowed")

' Set first two allowed operations
FirstTwoOperations = OperationsAllowedArray(0) &
OperationsAllowedArray(1)

' determine document state
If FirstTwoOperations = "checkoutfinalapprove" Then
DocumentState = "Checked In"

ElseIf FirstTwoOperations = "checkintahoecopy" Or FirstTwoOperations =
"checkintahoedelete" Then
DocumentState = "Checked Out"

ElseIf FirstTwoOperations = "approvecancel" Then
DocumentState = "Pending Approval"

ElseIf FirstTwoOperations = "checkouttahoecopy" Then
DocumentState = "Published"
End If

' return state
GetDocumentState = DocumentState

End Function

- Pasi Heinonen -
SPSFAQ030119 - What is an iFilter? - 0 Comments - stephencummins - Fri, Dec 14th, 2001 - Customisation
IFilter is a Microsoft specification for filtering text. If you have any files that are not Microsoft fromat; eg .zip, pdf or rtf, you'll have to install the relevant iFilter.
Further information can be found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/indexsrv/ixrefint_9sfm.asp

And they can be found on http://www.sharepointcode.com
SPSFAQ030118 - How do I make my first web part? - 0 Comments - stephencummins - Fri, Dec 14th, 2001 - Customisation
To make your first Web Part, just open your SharePoint Portal (logged on as Coordinator) Click "Content" then at the bottom of the page, "Create a new web part" then stick some html in the box entitled: Embedded content. (This content will be used when the above link is not available or not specified): for example <p>hello world</p>

Save twice and there you are!
SPSFAQ030117 - How do I go about using the SPS built in functions? - 0 Comments - stephencummins - Thu, Dec 13th, 2001 - Customisation
TahoeUtils.asp is a large collection of internal script
functions and subs used by SPS to do most tasks. This is everything from promoting/demoting properties to/from Office to the SPS store to simply checking which of 2 numbers are the highest.

Some of the functions in TahoeUtils.asp are not easy to reuse, but you have quite usable features available right there like GetWorkspaceURL() and so on. You can take a closer look at what functions you can leverage from by looking into the file itself.

http://[SERVERNAMER]/WORKSPACENAME]/portal/resources/tahoeUtils.asp

TahoeUtils is includes in "DashboardExtensions.vbs". This is the place for you to put your own functions to make them easily reusable across the workspace. As the DashboardExtensions.vbs file is included in the Dashboard factory, you always have all functions from both DashboardExtensions.vbs and TahoeUtils.asp available to call from your VBScript webparts - everywhere in the workspace!

There are two more interesting files that you also have
available. These are dbedit.vbs and wpedit.vbs. The first one can be sued for things like creatng dashboards just by submitting a form to it. I postet an example of this the other day. THe wpedit.vbs is used in the same way, but for creating webparts on the fly.

This is just an short overview of what you can do by
digging into the SPS core. The flexibility is great but
you should also act carefully as you are now exploiting the functions that makes your SPS server do what it does.

Don't change anything! :-)

andersbs@microsoft.com
SPSFAQ030116 - Can I send an email from a Web Part? - 0 Comments - stephencummins - Thu, Dec 13th, 2001 - Customisation
If you just want to send some email from your webpart,
the easiest way is to use a CDO.Message object. See Tom Rizzo's book on Outlook and Exchange Development to get code examples or simply go to msdn.microsoft.com.

Another way to get that kind of functionality is to let
you "Category Request" Webpart create a new item in a special folder for every request, and programmatically create a subscription on that folder for the people that should get notified. If you would use an enhanced folder for that functionality you would even get a mechanism for approving catagory requests for free. :-) andersbs@microsoft.com
SPSFAQ030115 - Can I use my own Style sheet? - 0 Comments - stephencummins - Thu, Dec 13th, 2001 - Customisation
Logged on as Coordinator, click "Settings" then from the dropdown entitled "Use this style sheet:" select "Custom". This will give you a form field where you can enter the name your style sheet. You then put it in the /Portal/Resources Directory by mapping to it as a web folder. This is a hidden folder so if you don't see it change your folder options in view | folder options..., view tab. This the default path for .gifs and .css files (thanks to andersbs@microsoft.com fo r this tip)
SPSFAQ030114 - Can I get a Web Part to read from a database, then select an item from it, which shows the results in another Web Part? - 0 Comments - stephencummins - Wed, Dec 12th, 2001 - Customisation
The SQL Digital Dashboard Resource Kit (see downloads) has an example of this. ASP pages with iFrames in them are the best way to encapsulate the code.
SPSFAQ030113 - Where can I find a script that converts CHM to seperated HTML files? - 0 Comments - stephencummins - Wed, Dec 12th, 2001 - Customisation
Since SharePoint can't index CHM's convert them to HTML:

http://www.helpware.net/FAR

Michael Greth (Microsoft MVP)

Page 22 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

Search options
Search for
   
In fields
   
In category
   
Dated in
   

links
subscribe
Get the latest posts via email:

quick search
Search via Google:

random books


Copyright © SPSFAQ.com, Stephen Cummins Limited, All Rights Reserved