Create your own search control

I was looking for a way to get rid of the icon gosearch.gif in the Search Area in SharePoint:
There is no way to replace the image with a css class, the only thing you can do is hide it with a new class that is called td.sbgo img and add the display:none to it.

So you must create a new feature, which is really easy.

Copy the OSearchBasicFeature folder in the Feature directory in the 12 hive.

Rename to whatever you like, LisesSearch is fine =)

Edit the feature.xml file and add a new GUID (link here)

Edit the SearchArea.xml file and add the path to your own search button (I put an image in the IMAGES folder, actually I created a new folder beneath it where I put my own search image):

Rename the Control Id in this file to something else like “LisesSearch”

Install and activate the feature

stsadm -o installfeature -filename LisesSearchfeature.xml
stsadm -o activatefeature -id “YourGUIDhere” -url http://yoursitehere/

Now, in your masterpage just edit the Control Id of the aspcontentholder “PlaceHolderSearchArea” to your own Id (in this example LisesSearch).
Now (after some branding on the sbcell and sbgo classes) the search should have your own buttons:

Share this blog post:

And now – a commercial break :)

My good friend Tobias Zimmergren has released his awesome Forum product for SharePoint.
I hereby quote Tozit himself:
“The TOZIT SharePoint Discussion Forum solution is a product, or set of products, that makes the discussions in SharePoint become very intuitive and user friendly. It also adds on a bunch of features that doesn’t normally exist in SharePoint’s built-in discussion lists”
Have a look here, it looks really cool!!

Share this blog post:

Add a link inside the webdeleted page

One annoying thing when you delete a site in SharePoint is the page that you are directed to after the deletion, the webdeleted.aspx. For me it is easy, since I know that you must go up into the URL and delete from a certain slash to get back to the site above, but for the user… no not as easy.

So I thought that putting a link that redirects you up one level OR a link that simply closes the window would be great. Well it was easy made and delivers a really good result as well – if I may say so myself, and yes I may! 😀

Remember to copy this page before editing it. And yes it will be overwritten maybe, but those are a few lines, not that hard to remember if that might happen. AND yes I want it to be used on ALL sites.

Find the webdeleted.aspx page
Copy and paste a copy inside the folder, just to be safe 🙂
Open the file in good old Notepad
Add the two following simple links above the last /font tag. One link is a javascript that closes the window and the other link brings you back to the site above and that is done with ../../ tag:

Do NOT enter an entire path, only relative URLs! What this link does, is redirecting you back one level up to the parent site. That will work from any starting point. Now your “Delete web” looks like this instead of a blank page:

Share this blog post:

Simple redirect script

If you want to redirect your users to another URL when they press the “Save” button inside a list form, then just add the following in the link to the form:


I usually use relative url’s as in the example, but you may also write the whole URL of course…


Share this blog post:

IE 8 and compatibility view

I installed Internet Explorer 8 yesterday – yeah a bit late, I know 🙂 Entered a customers site that I have built on MOSS and paniced a little when I found out that the drop down menus where… white!! No, not again. Not another strange issue with my customized drop down menu… the last time I had issues with the menu was in the Safari browser and then I had to do this. …. Hm, then I thought about a setting that I had checked when installing IE 8 and that was the compatibility view setting. That if a site has been built for older versions then you could enable this view to make the site look better (well, in my case – worse!). So by simply disable the compatibility view, the drop down menus looked alright again. Phew….

This is how the drop down menu looked like while the browser had Compatibility View enabled:

There is a new button to the left of “Refresh” in your address bar when you enable this view:

When you enable it, it gives you the following message:

I simply clicked on the button for Compatibility View and the menu looked normal again:

So I right clicked on the toolbar in IE 8 and disabled the compatibility view.

Share this blog post:

Edit the welcome-dropdown menu

If you want to remove the “MySettings” from the user dropdown menu (up in the right corner of a sharepoint page) so that it looks like this instead:

Then go to folder:C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATECONTROLTEMPLATES
Make a copy of welcome.ascx!
Then open the file Welcome.ascx in Notepad
Add the following attribute to each element you wish to hide:Visible=”False”
For example:

SharePoint:MenuItemTemplate runat=”server” id=”ID_PersonalInformation”
Description=”(%$Resources:wss,personalactions_personalinformationdescription%)” MenuGroupId=”100″


Share this blog post:

Activate flyouts in WSS 3 menu

If you want to activate your TopNavigation with flyouts, edit the following code in your masterpage (I am not able to enter code directly onto the page so that is why I always must create an image of code in my blog, irritating. Click on it for larger image):

Share this blog post:

Deep dive into InfoPath

I am on new and thrilling territories right now, not really sure what I am doing but it’s getting clearer and clearer… My mission is to place a button in an InfoPath form, with code behind that transforms the xml file into a PDF file and then inserts itself into a mail and of course – sends the mail 🙂 Easy I thought, someone must have done that before. Googled it, found one article. And I have tried to follow it, but since I am not a developer there were some “issues” that needed to be understood first. Finally I have produced some code thanks to VS, VSTA, Notepad (i love Notepad btw :)), and some hacking into web.config and other shit. So now, wow, tried to execute my code and – nothing happens. Or, something happens, but it just seems to reload or tries to run the code but no PDF is created. So I think I have to make sure that the dll files are listed in web.config and that my itext-dll is registered. To be continued, the whole code will be published here if I ever make it 🙂 I really miss my dev pro’s at work now….

Share this blog post:

CQWP that displays date

I got a request from a customer that wanted the Content Query Web Part to display Created (or Modified, whatevah) date along with the title. Why isn’t there a function for this already, and why why can’t you select any column you want to display in the web part? I’m not so impressed by this web part as you can tell 🙂 Well nevermind, moving on! I googled and found this nice description:
But instead of editing the itemstyle.xsl in Sharepoint Designer I copied the file and renamed it to itemstyle_lise.xsl and did all the customization in that file. Just to be sure that those customizations wont be lost in case of an upgrade or some other catastrophic scenario were all your work is lost! I am sure my Lise-file wont be overwritten 🙂

I added the CQWP to a page, exported it, opened it in Notepad and added some extra lines in it:

The above line points to my customized xsl stylesheet

The above line declares which default item style that should be displayed in the web part and I named my xsl template “Datum” inside the xsl file.

Saved the file as something else like “Datum.webpart” and imported it to the Sharepoint page, and now the webpart displayed my list with Date and Title.

Now you have your own customized web part and it wont effect the “default” web part:

Now to the deployment, and it’s here where my coding skills sucks – or are non existent to be honest – and therefore I always look for the quick & dirty solution at first and then maybe… I’ll ask my MVP collegue (yeah, he sits right next to me at the office – pure luxury) but that’s not the first thing I’ll do since I want to learn by doing. Trial and error, lovely. So my first thought is to upload it to the Web Part gallery under Site Actions, and put it in a group called “Lises web parts” or something.

The next, and real, step is to deploy it as a feature (I’ve been told by the dev pro’s here) and I will give it a shot!

Share this blog post:

A new fresh attempt with the BDC

I have tried this before, but with no result, to actually get data from Dynamics NAV straight into Sharepoint using the BDC catalog. It seemed so easy, just create the ADF file and import it in Central Administration and youre ready to read from your business system. Not quite.. So today I did a new attempt using the BDC application from Microsoft (downloaded it here). I have tried the BDC Metaman before, but today I used this app which comes with the SDK:

Quite easy to install and setup and even enter the connection string:


I added the table I wanted data from and exported the xml file and imported it to Sharepoint. I got an error about the profile page:

Could not create profile page for Entity NaB Solutions AB$Contact. The error is: Cannot create a new connection to closed Web Part “g_f9c81dbd_bdf8_4935_a3f3_6558836696df”.

Went into my Sharepoint site and created a column that is of type Business Data and it was empty. Access? No, I’m the admin. I probably need to configure some more, and look into the error I got.

To be continued…

Share this blog post: