Posts

Showing posts from March, 2009

Updating a List's "Modified By/Created By" Properties

Here is a piece of code that can be used in Powershell to update the Modified By and Created By properities on a list. This is helpful if you move content using Sushi or other tool and they don't get updated. We tried to use Sushi to update this information, but found that you couldn't do it. [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") # Change the URL to your site $SPSite = New-Object Microsoft.SharePoint.SPSite(" http://source/presidentscorner/ ") $SPWeb = $SPSite.OpenWeb() $SPList = $SPWeb.Lists["Comments"] $SPListItemCollection = $SPList.Items foreach ($ListItem in $SPListItemCollection) { # Make sure you are updating the correct item in the list if ($ListItem.ID -eq 4) { # Change the User ID and Name to who you want shown. # If the user doesn't exist in the Web collection then added them as a visitor and get their ID. You can then delete them # from the group and e...

SharePoint Branding

Things to set in CSS when creating a branded site based on BlackVertical.master: .html - background-color = color of background you want to see .body - background-color = white. Necessary due to ActiveX control being used for datasheet view on lists. The color you specify for the body will also be used for the spreadsheet. .ms-main - background-color = same color used for .body. This will probably be best to be white. The issue here is that when you get to the admin pages the .html value will come through any transparent layers. add form#aspnetForm - background-color = This will be the same color as your .html style. This will cover the background color of your .body so that you will finally see the color background you were looking for.