Month: September 2007 (Page 1 of 4)
Update on 2024-08-21: Seems that ZapThink no longer exists 🙁
using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using System.Web.UI.WebControls;
namespace WebPartLister
{
public class WebPartLister : System.Web.UI.WebControls.WebParts.WebPart
{
BulletedList list;
protected override void CreateChildControls()
{
list = new BulletedList();
WebPartZoneCollection zones = this.WebPartManager.Zones;
foreach (WebPartZone zone in zones)
{
WebPartCollection webparts = zone.WebParts;
foreach (WebPart webpart in webparts)
{
list.Items.Add(
string.Format(“{0} ({1}), {2}”,
webpart.Title, webpart.GetType().Name,
zone.DisplayTitle));
}
}
this.Controls.Add(list);
}
protected override void Render(HtmlTextWriter writer)
{
EnsureChildControls();
list.RenderControl(writer);
}
}
}
Margin=’8px’>
<TextBlock
Foreground=’#17365D’
Background=’White’
FontFamily=’Cambria’><Bold>Windows Presentation Foundation</Bold> is installed!</TextBlock>
</Viewbox>
Here’s a list of completely awesome tutorials on how to use PowerShell to control the Sharepoint API:
- SharePoint/PowerShell 1: Make me a portal
- SharePoint/PowerShell 2: Add some Users to Active Directory, maybe 1, maybe 500
- SharePoint/PowerShell 3: Now add the users to SharePoint
- SharePoint/PowerShell 4: Adding the Portal Areas
- SharePoint/PowerShell 5: Importing the Area’s content
- SharePoint/PowerShell 6: Approving all Publishing Pages
Cross posting from Andrew Connell for later reference:
Announcing three CodePlex projects for community WCM code samples
Cross posted on Spencer Harbar’s Blog.
We (Andrew Connell & Spencer Harbar) would like to announce three new CodePlex projects created to enable the community to share examples of useful Publishing site elements built using the Web Content Management features of Office SharePoint Server 2007. Initially these projects contain a number of commonly used MCMS 2002 Placeholder controls converted for use within MOSS Publishing sites which have been graciously donated by Microsoft. Over time these samples will be augmented and enhanced. Future plans include the consolidation and alignment of deployment mechanisms of all code samples in all projects.
All the CodePlex projects listed below are released under the most permissive Microsoft license (Ms-PL) which means that you can do virtually anything you want with these code samples.
Many of the code samples include a MS Word document explaining the process of developing the code sample as well as deployment instructions.
The projects (and the included code samples) are broken down as follows:
SharePoint 2007 WCM Field Controls
A collection of sample Field Controls for use within Publishing Sites built using Office SharePoint Server 2007’s Web Content Management features.
- MultimediaFieldControl: Custom field type and control allowing content authors to specify a URL, width and height of a media file (SWF, PDF, WMV, MPEG, AVI, MPG, MOV) and renders the display of the control with the appropriate ActiveX control markup.
SharePoint 2007 WCM Web Parts
A collection of sample Web Parts for use within Publishing Sites built using Office SharePoint Server 2007’s Web Content Management features.
- FAQWebPart: Web Part that allows business users to contribute to a frequently asked questions list which is rendered with DHTML allowing users to expand/collapse each FAQ item.
- RandomFlashMovieWebPart: Web Part that allows a content author to select one or more Flash movies from a SharePoint library. The Web Part will then display one of the Flash movies, at random, in display mode.
- ThumbnailWebPart: Content authors can specify a SharePoint library containing images that the Web Part will generate thumbnails for. It allows content authors to specify the size, sort order and the number of thumbnails to be displayed in one row.
SharePoint 2007 WCM Utilities
A collection of useful utilities for Publishing Sites built using Office SharePoint Server 2007’s Web Content Management features.
- METATagsGenerator: This ASP.NET 2.0 server control renders HTML <META> tags for each field in the current page’s content type.
- PropertyBagFeature: Allows content authors to modify values within the property bag of pages… similar to the custom properties provided in MCMS 2002.
- SharePointSSLHttpModule: Makes it easy for developers to SSL enable certain parts of a MOSS 2007 WCM Publishing site.