![]() |
SPSFAQ SharePoint Server Frequently Asked Questions |
|
Customising SharePoint
SPSFAQ030192 - Can I have a Web Part that is a basic hit counter? - 0 Comments - stephencummins - Mon, Oct 28th, 2002 - Customisation First, right-click to download the following file and save it with a ASP extension. Copy it into a Directory your Readers have write access to.
Next, create a Web Part by clicking Content in the top right-hand corner of the screen and then the "create new web part" link at the bottom of the page. In "advanced settings" specify the path for the source of this web part. And you're done! http://www.spsfaq.com/downloads/hitcount Remember to right-click and save target as... SPSFAQ030191 - How do you copy a category or a profile from one workspace to another workspace using PKMCDO? - 0 Comments - stephencummins - Mon, Oct 28th, 2002 - Customisation Dim oCat As PKMCDO.KnowledgeCategoryFolder
oCat = New PKMCDO.KnowledgeCategoryFolder() Dim connSource As ADODB.Connection = New ADODB.Connection () Dim connDest As ADODB.Connection = New ADODB.Connection() oCat.DataSource.Open (catSourceFullPath,connSource,PKMCDO.ConnectModeEnum.adMode Read) oCat.datasource.saveto (catDestFullPath,connDest,PKMCDO.ConnectModeEnum.adModeRead Write, PKMCDO.RecordCreateOptionsEnum.adCreateOverwrite) singhua SPSFAQ030190 - Do you have a best practice in creating a development environment for developing SPS web parts? - 0 Comments - stephencummins - Mon, Oct 28th, 2002 - Customisation In our opinion the best way to go nowadays would be to use Visual Studio.NET. If you go this way you don't have any SPS integration, something which will change radically in the next version of SPS. XP Developer is our view a great tool when you work alone on a project but not when you work in teams, you won't find any source code control tools when using Office XP
Developer. If you want to use the library functions in the SPS framework you should choose Interdev as development tool and create non isolated web parts. Since the library of the framework isn't really documented we feel you gain more by choosing the superior .NET development environment. A thing you shouldn't give up however is the ability to pass context information via the web part and dashboard configuration parts. You could either pass this info via a query string to your aspx pages or retrieve the values of those properties from within your .NET pages. Nikander Bruggeman Margriet Bruggeman SPSFAQ030189 - How can I avoid first time users having to download the DDSC? - 0 Comments - stephencummins - Mon, Sep 9th, 2002 - Customisation The download is controlled by dbview_ie.xsl and error messages by dbcontent.xml for my purpose, I've just commented the lines from 31 to 43 in dbview_ie.xsl
Basically without this DDSC.class, the client can't perform those actions: - add new section to a dashboard - minimize a section - delete a section As all those actions must be done in most cases by the administrator, this is really not useful to bother all clients with such a messy download. SPSFAQ030188 - How can I make a Web Part to be only viewable and usable by coordinators? Tim - 0 Comments - stephencummins - Mon, Sep 9th, 2002 - Customisation How can I make a Web Part to be only viewable and usable by coordinators. Tim
'This code snippet removes this webpart for non coordinators. Dim boolIsCoordinator boolIsCoordinator = TestRights(ReadParameterFromGetOrPost("DataUrl"), 4) If not boolIsCoordinator Then node.SelectSingleNode("IsIncluded").Text = "0" Exit Function End If I added it in the 'GetContent' function, almost at the beginning and it works fine. Tim SPSFAQ030187 - How do I only show the create and edit links on a web part to coordinators of the workspace? Dave W. - 0 Comments - stephencummins - Mon, Sep 9th, 2002 - Customisation Here's a little code snippet you can put around the part that has to be only accessable (and thus viewable) by coordinators:
'This code snippet checks if you are a coordinator or not and shows a piece of code only to coordinators. Dim boolIsCoordinator boolIsCoordinator = TestRights(ReadParameterFromGetOrPost("DataUrl"), 4) If boolIsCoordinator Then 'Put your coordinator specific code here End If 'End of snippet Tim SPSFAQ030186 - How do I set the Document Upload form's default to publish instead of check-in when adding a document? - 0 Comments - stephencummins - Mon, Sep 9th, 2002 - Customisation Find the file Uploadfile.asp in your Portal/resources directory.
Goto line 183 and you'll see the following: If (fVersioningEnabled) And (strPortalCmd = "uploadnewdoc") Then Response.Write GenerateInputFormRadioButtonFieldHtml("CheckInOrPublish", "CheckInOrPublish", "CheckIn", True, L_UploadPageUploadNewCheckInTheDocumentRadioButtonLabel_TEXT, L_UploadPageUploadNewCheckInTheDocumentRadioButtonDescription_TEXT, Empty) Response.Write GenerateInputFormRadioButtonFieldHtml("CheckInOrPublish", "CheckInOrPublish", "Publish", False, L_UploadPageUploadNewPublishTheDocumentRadioButtonLabel_TEXT, L_UploadPageUploadNewPublishTheDocumentRadioButtonDescription_TEXT, Empty) End If Change it to read: If (fVersioningEnabled) And (strPortalCmd = "uploadnewdoc") Then Response.Write GenerateInputFormRadioButtonFieldHtml("CheckInOrPublish", "CheckInOrPublish", "CheckIn", False, L_UploadPageUploadNewCheckInTheDocumentRadioButtonLabel_TEXT, L_UploadPageUploadNewCheckInTheDocumentRadioButtonDescription_TEXT, Empty) Response.Write GenerateInputFormRadioButtonFieldHtml("CheckInOrPublish", "CheckInOrPublish", "Publish", True, L_UploadPageUploadNewPublishTheDocumentRadioButtonLabel_TEXT, L_UploadPageUploadNewPublishTheDocumentRadioButtonDescription_TEXT, Empty) End If (swapped the true & false statements around) Tony Bierman SPSFAQ030185 - How do I create workflow applications in SPS? - 0 Comments - stephencummins - Mon, Sep 2nd, 2002 - Customisation We've been promising people here in the SPS newsgroups we'd post a link to our article which explains how to create workflow applications in SPS.
Go to: http://www.sharepointd2d.com Then go to the 'Admin/Developer Tips' area, then click ' Development' and finally scroll down to the title 'Creating Folder Views and Workflow Applications'. Nikander Bruggeman Margriet Bruggeman Page 13 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 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||