Archive

Archive for September, 2010

Using jQuery in SharePoint to Display Notifications for Open Tasks

September 30, 2010 Leave a comment

Very cool way to display notifications for Open Tasks in SharePoint.  Thanks to Jan Tielens Blog.

http://weblogs.asp.net/jan/archive/2009/05/07/using-jquery-in-sharepoint-to-display-notifications-for-open-tasks.aspx

Using the JQuery JGrowl script

http://www.stanlemon.net/projects/jgrowl.html

Enjoy!

How to freeze the left column on the SharePoint Gantt Calendar

September 30, 2010 8 comments

To freeze the left column on the SharePoint Gantt Calendar follow these steps.  You need atleast designer rights on the page to do this.

1.  On your SharePoint Gantt Calendar page, edit your page and add the Content Editor Web Part to your page.
2.  Edit the Content Editor Web Part and click the “Source Editor…” button
3.  Inside the source editor copy and paste the following CSS style code below.

<style>
.ms-ganttInnerTable{
z-index:10;
}
 
.ms-ganttOuterTable{
empty-cells: show;
}
 
.ms-ganttMajorTimeUnitHeaderCell {
writing-mode: rl-tb;
vertical-align: top;
top: expression(this.offsetParent.scrollTop);
position: relative;
z-index: 15;
column-span: 1;
background-color: white;
width: 16px;
}
 
.ms-ganttTitleCell{
left: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft);
position: relative;
z-index: 20;
background-color: white;
}
 
.ms-ganttTitleHeaderCell{
top: expression(this.offsetParent.scrollTop);
left: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft);
position: relative;
background-color: white;
z-index: 30;
}
 
.ms-ganttDetailTimeUnitRow {
position: relative;
top: expression(this.offsetParent.scrollTop);
background-color: white;
}
</style>

4.   Apply and save your changes.
5.  Now when you scroll to the right to view all the events on the SharePoint Gantt Calendar the left side column will be froze and inplace.

Enjoy!

Creating custom Permissions in SharePoint

September 30, 2010 Leave a comment

I’m writing this blog to basically remind myself on how easy it is to create custom permissions in SharePoint.  I often forget some of the easiest administration processes within SharePoint.  More often than none i’m tasked to create custom SharePoint permissions to only allow certain groups or people specific permissions such as only having the right to add or update list items or documents but not have the right to delete them.  This custom permission is probably the most wanted by many of my clients.

To accomplish this on the SharePoint site/page you would like to have custom SharePoint permissions:

1.  Click on Site Actions -> Site Settings -> Advanced Permissions
2.  Click Settings drop down select Permission Levels
3.  Click the Add a Permission Level button
4.  Give the new Permission a name and check the boxes next to the custom permission you would like to set.
5.  *Note* some permissions require others to be enabled so checking off certain permissions will result in others being checked off automatically
6.  Select permissions for List Permissions, Site Permissions, Personal Permissions.
7.  Click the Create button. 
8.  New permission is created!
9.  Go back to the Permissions for your site/page and click the Add button, select the group or person who will be applied this permission level
10.  Select the custom permission you created!
11.  Boom!  Now that group or person only have those permissions.

Adding a favicon.ico to MOSS 2007

September 30, 2010 3 comments

To add a favicon.ico image to MOSS 2007 is a really simple process.  For those that don’t know what a favicon is, its the little icon that is displayed in your internet browsers address bar next to the address of your site.  So instead of the little I.E icon or Firefox icon you could have a custom Icon displayed for your SharePoint portal. 

To accomplish this follow these steps:
1.  Find an image you would like to use as your favicon.ico
2.  Next step is creating the favicon.ico.  There are tons of websites out there that will automatically generate the favicon.ico image for you.  I typically use http://www.favicon.cc .
3.  Once you are satisfied with your favicon.ico save it.
4.  Next upload your favicon.ico image into an image library somewhere onto SharePoint.  I created an Image library called PublishingImages on the root level of the SharePoint portal.  You can name your Image library anything you like.
5.  Next you will need to modify (using SharePoint Designer) or download/copy the default.master page.  I prefer to download the default.master page.
6.  To download the default.master page make sure you are on the top level site on SharePoint, click on Site Actions -> Site Settings -> Modify All Site Settings 
7.  Under the Galleries section select Master pages and page layouts.
8.  In the Master Page Gallery look for the default.master page.  Click on the default.master page and go down and hover over the Send To
9.  Select Download a copy and select the destination to download the file.
10.  Once the default.master page is downloaded, open it up using anytype of editor.  I use Notepad.
11.  Right click, open with Notepad or choose the program you prefer to use.
12.  Look for the closing </head> tag and right before this tag place this line:

<link rel=”shortcut icon” href=”/PublishingImages /favicon.ico” />

13.  Make sure the href points to the correct Image library for whatever you called it.
14.  Save and close the default.master page.
15.  Now go back to the Master Page Gallery page on SharePoint, click the upload button, browse to the default.master page you just modified and upload it.
16.  You should now see your customized favicon.ico image in your web browsers address bar.

Enjoy!

Update the Days-To-Show-New-Icon in SharePoint

September 24, 2010 Leave a comment

If for whatever reason you would like to update the display time of the SharePoint !NEW icon when you upload a new document library on SharePoint, you can do this by using the STSADM.exe tool.

On your SharePoint Server browse to:
c:\program files\common files\microsoft shared\webserver extentions\12\bin  directory

Once there run this command:
stsadm.exe -o setproperty -pn days-to-show-new-icon -pv [number_of_days] -url [servername]

By default the !NEW icon is set for 2 days, if you would like to set it for longer just specify how long in the [number_of_days] attribute, if you don’t want to see the icon at all just put (zer0).

Update Database Schema on SharePoint Server and SQL Server Database

September 24, 2010 Leave a comment

I’ve ran into this problem numerous of times, and this usually happens when there are new IAVA’s or security patches installed onto the SharePoint server to address vulnerabilities.  After applying these IAVAs or patchs and rebooting the  SharePoint server your portal site might error out with this message: 

Unable to Connect To Configuration Database.

If you check your event logs you might run across this error: 

“The Schema Version 3.0.149.0 of the database is not consistant with the expected database schema version 3.0.151.0.  Connections to this database from the server have been blocked to avoid data loss, upgrade the web front end or the content database to ensure that these versions match.”

—– To fix this problem on the web front end (Sharepoint Server): 

1.  Start -> run -> cmd

2.  At the command prompt browse to:

C:\Program Files\common files\web server extensions\12\bin

3.  Once at the C:\Program Files\common Files\Microsoft Shared\web server extensions\12\bin

directory run this command:

psconfig -cmd upgrade -inplace b2b -wait force

4.  This will upgrade the database schema on the Sharepoint server with the SQL server.

5.  Attempt to browse the portal again.  This should fix the inconsistant database schema issues.

Fixing the Unable to connect publishing custom string handler for output caching. IIS instance id [id] Server Error

September 23, 2010 Leave a comment

If you are getting “Unable to connect publishing custom string handler for output caching“ error in your event log  on your SharePoint server then it is because of a custom web service you have installed on your Sharepoint server. Reason for this error is that you have a web part or custom SharePoint application on your portal page which uses the custom web service.  Since Sharepoint uses output caching for the web pages to optimize the rendering experience and fast delivery of unchanged pages therefore, publishing infrastructure of Sharepoint tries to access the web service through your web part and due to any issue in your service, it starts generating this error. 

To fix this problem.

Edit the web.config  file of  your custom web service (DO NOT edit your Sharepoint Web application web.config) and make sure you have following under httpModules node which is located under system.web node.

<remove name=“PublishingHttpModule“ />

Save and close the web.config file.  Check your event logs on the SharePoint server (you might have to refresh) you should no longer see this event.