Thursday, August 14, 2008

Hide/Remove "Create Blog" Link on My Site

Customizing MOSS 2007 My Sites is generally a tedious task and should not be approached lightly. Having worked through a number of My Site customization issues with a client only to drop them at the end in favor of a standard My Site template, I can personally vouch that it can (and will) be a painful task.

The grand-daddy of all posts about customizing My Sites is by Steve Peschka - warning, not light reading. Another warning - Steve tells you NOT to customize any of the .aspx pages or onet.xml on the file system for fear of being in unsupported state. He's right, but remember - as long as you backup the original files, you can always revert back to them (and into supported state) at a moment's notice. As a practice, always backup server files before you make any changes to them.

With that said, I recently had to modify the My Site template for a client to remove the "Create Blog" link from the upper right corner of the My Site page. In a non-customized MOSS instance, the tabbed "Create Blog" link appears for any newly created My Site and only goes away after the user has clicked on it and created a blog. Since we did not want users creating blogs, we disabled sub-site creation permission for the entire web application containing My Sites, but that did not remove the link. Removing sub-site creation permission accomplished our goal of preventing users from creating any subsites, including blogs, but the link to create blog did not go away, and when clicked, resulted in an un-friendly error message.

The way to hide this link is to edit the default.aspx file found on the 12-hive under Template/SiteTemplates/SPSPERS directory. Again, before editing this file, make sure you made a backup copy. In default.aspx file, find the following text and remove it completely, including the brackets:

spswc:createblogbutton class="ms-toolbar" id="TBBCreateBlogButton" runat="server" showimageandtext="false"/

Save the file and run the IIS reset command. Presto - the "Create Blog" link is now gone!

4 comments:

Unknown said...

Hi Alex,
I am new to SharePoint and I was asked to turn off My Site's Survey. Please show me how.
I found the line to turn off Blog as you have shown but can't find anything similiar for turning off Survey. Your help will be very appreciated.
Thanks,
Gary

Unknown said...

that did not work at all

Unknown said...

Acting deals with very delicate emotions. It is not putting up a mask. Each time an actor acts he
does not hide; he exposes himself. See the link below for more info.


#hide
www.ufgop.org

Unknown said...

Life is full of many challenges. Challenges that will make you or break you depending on how you handle it. Visit my site for more updates. God Bless to your site.

n8fan.net

www.n8fan.net