Monday, January 24, 2011

Changing Links List In SharePoint 2007 To Open In New Browser Window

I was recently looking for the easiest way to modify the links list in SharePoint 2007 to open the links in a new window.  In my case, every link in a links list points to an external site, so they should all be opening a new browser window.

There were a couple custom features I found, but most required modifying (or replacing) the existing links lists, something that I did not want to do.  Anyway, here's how to make the change (note:  I modified the original files, this probably isn't a best practice, and the changes could be lost by updates from Microsoft).

First, open the schema file for the links list feature.  In my case, it was located at:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\LinksList\Links\schema.xml

In this file there should be two instances of the following:

<Column Name="URL" HTMLEncode="TRUE" /><HTML><![CDATA[">]]></HTML>

Replace them both with this:

<Column Name="URL" HTMLEncode="TRUE" /><HTML><![CDATA[" target="_blank">]]></HTML>

Then restart IIS (or just the application's worker process), and now all the links in your links lists should open a new browser window!

Full Width Rich Text Editor

It can be a little frustrating in SharePoint when the "Rich Text Editor" on the edit page of Wiki's, Blogs, or on certain lists is set to fixed column width.  I certainly find it easier to blog in a fullscreen-width editor!

Here's the CSS to make it happen (warning, this syntax applies to ALL rich text editors!).   The first does all normal forms and wikis:

#onetIDListForm, #onetIDListForm .ms-formbody, #onetIDListForm iframe[title="Rich Text Editor"]{
width:100% !important;
}

And this does the same for Blogs!

.ms-formbody span span div iframe, .ms-formbody span span table.ms-long{
width:100%; text-align:left;
}
Hope this helps.

Wednesday, January 5, 2011

How to change mapping to FQDN in Sharepoint

 

FQDN = Fully Qualified Domain Name

When you install Sharepoint Services (WSS) 3.0 or Sharpoint Portal Server (MOSS) 2007, by default, the website would have address like http://[servername], even if your fqdn is servername.microsoft.com. So what happens is, it's possible not being able to access the Sharepoint Site from the Intranet when you type http://[ServerName].microsoft.com because the site is not mapped to FQDN.

It took me while to find out how to change this but here it is.

  • Go to Central Administration of your Sharepoint site on the server (NOT FROM REMOTE Machine), e.g http://localhost:1234 (whatever is the port for your Central Administration website). If you don't know what it is, look under IIS. Remember, you have to be an Admin to be able to do this.
  • Click on the "Operations" tab from top left corner.
  • Select "Alternate access mappings" under "Global Configuration" block.
  • Select your website (usually http://servername) in the Internal URL from the list.
  • Now simple change your value for URL protocol, host and port Textbox (now it should be http://servername.microsoft.com and click Ok. That's it! You may have to restart the IIS.