Notepad ++

Get it today! A really really helpful extension of Notepad. Things you have been longing for đŸ™‚ The simplicity of Notepad but extended with functions like comparison (love it), intellisense (just select the code language you are using and it will color the tags…), line number etc etc. Lovely!! Get it here:
http://sourceforge.net/projects/notepad-plus/

Happy coding đŸ™‚

Share this blog post:

Change the “Sign in” text

If you want to change the “Sign in” link text on a Sharepoint page, then do this:

Open the beloved folder C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATECONTROLTEMPLATES

Open “Welcome.ascx” and go to the end of the file
Change the tag:

SharePoint:ApplicationPageLink runat=”server” id=”ExplicitLogin”
ApplicationPageFileName=”Authenticate.aspx” AppendCurrentPageUrl=true
Text=”<%$Resources:wss,login_pagetitle%>” style=”display:none” Visible=”false” />

to this:

SharePoint:ApplicationPageLink runat=”server” id=”ExplicitLogin”
ApplicationPageFileName=”Authenticate.aspx” AppendCurrentPageUrl=true
Text=”Your text here” style=”display:none” Visible=”false” />

Share this blog post:

No defined path – MySite

If you get an error message saying that MySite cannot be created due to a missing tag in the URL or error in the defined managed path, then you have to do this:

Open Central Administration
Application Management
Define managed paths
Add the path, like “personnel”

Share this blog post:

Stylesheets that are used in MOSS

I do a lot of CSS changes to my sites, I find that easier and quicker than to rebuild themes or site definitions and stuff.

MOSS 2007 uses the following css files:

controls.css
HtmlEditorCustomStyles.css
HtmlEditorTableFormats.css
portal.css
core.css

When you create a WSS site, the following CSS files are used:

portal.css
core.css

MySite

portal.css
core.css

Share this blog post:

Anonymous access with Publishing portal

When you activate anonymous access on a site and you would like your anonymous users to be able to publish an item to a list, then you cannot use the template “Publishing portal”. Why? Don’t know! You must use the template “Team Site” for this to work! I noticed this when I had activated anonymous access but never got rid of the login-prompt! So.. I created a new site and used the template “TeamSite” and enabled anonymous access on it, then voila – an anonymous user was able to post an item to my list without being prompted with the login! Strange….

Share this blog post:

Remove the “Powered by…” in InfoPath forms

In this folder (the one and only.. right?) “C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATELAYOUTSINC” is a file that is called “ifsmain.css”. This stylesheet file controls how a web form built by InfoPath is displayed. If you want to remove the logo “powered by InfoPath services” that is displayed in the bottom of every web form then write “display:none” or color the text tag to the same as your background color.

Share this blog post:

Create a new search scope

This is very useful. Say you have several web sites and you don’t want to display the same search results on every web site – only the results relevant to the current site! Do this:

Open Central Administration
Open your SSP
Click on “Search settings” and then “Content sources”.
There is a list of current content sources, there might just be only one:

Anyway, click “New content source”
Fill in the following fields like this
“Name of the Content Source” = your web site name
“Content Source Type”
“Start Addresses or Applications” (if you choose the Business Data option)
” Crawl Settings and Schedules”
I always enter the name of my content source to the name of the site, it makes it easy to know where it is applied đŸ™‚
The start address is the URL of my site, for example http://mysite.se/

If the content source is a public site then you may not have to index the site so often. I usually run the Incremental Crawl each hour or so instead.
Now save your settings and perform a Full Crawl on your new Content Source.
When that is done, go back to “Search Settings” and select “View Scopes”:

This page shows what scopes this SSP handles. Add a new scope and call it the same name as your content source, ie “mysite”. Now, you have to add some rules to your scope:

Click on “Add rules” and add the following:

I checked the “Content Source” so that I could select my content source “mysite”. Then I checked “Include” because I want all info on this site to be returned in the search results. Now you have to update your new scope.

Click on “Start update now” from the Search settings page.
When the update is ready, you have to associate the scope to your site. Go to Site Settings on your site, click on “Search Scopes” under “Site Collection Administration”. Click on the “Search Dropdown” link:

Now all available scopes are shown including our new scope:

Select your new scope – wow! Uncheck the other scopes, we do not want them on this site.
Your list should now look like this:

Now try your site search. When I did this, other search results STILL showed up. To change this, click on “Edit page” and select “Modify shared webpart” on your search result page. There is a field called “Scope” and even if there is no list to select your scope from, you can simply write in the name of your scope, like “mysite”.

Now when you perform a new search, only results from your site will be displayed!
Share this blog post:

Event id 7888 in Eventviewer

A while ago I got a lot of error messages in Event Viewer on our MOSS server. I found the following solution:

run stsadm -o sync -DeleteOldDatabases 0

and the message disappears.
What it does is enter the table “sitesynch” on the SQL server and deletes connections to any old Sharepoint config database that you may have on your server.

The entire message:

A runtime exception was detected. Details follow.
Message: A duplicate site ID 3b2fa192-1efb-4715-970f-2e550122faf0(
https://xxxx) was found. This might be caused by restoring a content database from one server farm into a different server farm without first removing the original database and then running stsadm -o preparetomove. If this is the cause, the stsadm -o preparetomove command can be used with the -OldContentDB command line option to resolve this issue.
Techinal Details:
Microsoft.Office.Server.UserProfiles.ProfileSynchronizationDuplicateSiteIDException: A duplicate site ID 3b2fa192-1efb-4715-970f-2e550122faf0(
https://xxx) was found. This might be caused by restoring a content database from one server farm into a different server farm without first removing the original database and then running stsadm -o preparetomove. If this is the cause, the stsadm -o preparetomove command can be used with the -OldContentDB command line option to resolve this issue.
at Microsoft.Office.Server.UserProfiles.ContentDBSynchronizer.RegisterSitesForSynch(Guid[] rgGuid, Int32 nGuids, Object dummy)
at Microsoft.Office.Server.UserProfiles.SynchCollection`2.FlushAdds()
at Microsoft.Office.Server.UserProfiles.SynchCollection`2.Add(T objAdd)
at Microsoft.Office.Server.UserProfiles.ContentDBSynchronizer.AddRemoveSites(String strFirstChangeToken, SPChangeToken lastChangeToken)
at Microsoft.Office.Server.UserProfiles.ContentDBSynchronizer.SynchContentDB()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)

Share this blog post:

Install IFilter on MOSS

How to install the PDF iFilter so that pdf files are searchable (and given an icon too)

Download the latest Adobe PDF IFilter from http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611
Stop the IIS service
Run the Adobe PDF IFilter Setup on your MOSS server
Copy the ICPDF.GIF file (search your server) to “C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TemplateImages”
Open “C:Program FilesCommon FilesMicrosoft SharedWeb server extensions12TemplateXmlDOCICON.XML”
Add the following to the .pdf type:
Run iisreset
Add the .pdf file type in the following list:
Open Central Administration, Shared Services Administration (SSP), Search Settings and select File Type
Add the new filetype pdf
Perform a fullcrawl of your content source

Share this blog post:

Useful STSADM commands

path to STSADM is
cd C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN

addcontentdb
stsadm -o addcontentdb -url URL [-databaseserver servername] –databasename databasename [-DatabaseUser username -DatabasePassword password] [-SiteWarning number] [-SiteMaximum number] [-SearchServer servername]

stsadm -o addcontentdb -url http://srv007:42464 -databasename Sharepoi1_SITE

stsadm.exe -o restore -url http://srv007:24003 -filename c:backupmigrera-SRV005-ComSolut1_SITE.SPB

create a new site using a template in another language (in this case… surprise, Swedish!!)
stsadm.exe -o createweb -url http://server:port/sitename
-lcid 1053

export a site with version history and security remained
stsadm.exe -o export -url http://url/site -filename c:backupsiteds.bak -includeusersecurity -haltonfatalerror -versions 4

import a site with version history and security remained
stsadm.exe -o import -url http://url/site -filename c:backupsiteds.bak -includeusersecurity -haltonfatalerror -updateversions 1

Share this blog post: