Enable site/web specific theme elements and branding

Filed Under (Uncategorized) by Boris Gomiunik on 08-05-2009

I’ve had an interesting challenge recently. I’ve needed to create a custom site theme where certain subwebs would have their “identifiers” in design. What I mean by that: The site collection would have a specific theme applied, but in certain subwebs you should have the option of changing the banner for example.

The solution is actually quite simple:

When creating a theme you have to customize the theme.css file. Instead of putting all your class and id css definitions in theme.css, create additional CSS – for example main.css and put all of them there. Next, in theme.css import that file and right after this import, import another css in a document library (for example customCSS). So the whole scenario would be as follows:

theme.css

/*Main theme css*/
@import url('main.css');
/*enable custom styling*/
@import url('../../customCSS/custom.css');

main.css

/*all your CSS styling here*/

and in the (sub)webs where you need custom styling just create a document library called customCSS and inside put custom.css where you override the styles in main.css

Here’s an example:

Default theme:

image

main.css

td.ms-bannerContainer {
    border-bottom: 1px solid #326666;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 100px;
    background: #ece9e4 url('header.jpg') no-repeat left bottom;
}

Customized theme

image

main.css

td.ms-bannerContainer {
border-bottom: 1px solid #326666;
	padding-left: 0px;
	padding-right: 0px;
	padding-bottom: 100px;
	background: #ece9e4 url('header.jpg') no-repeat left bottom;
}

../../customCSS/custom.css

td.ms-bannerContainer {
     background: #ece9e4 url('header.jpg') no-repeat left bottom;
}

Service Pack 2 available and promising!

Filed Under (Uncategorized) by Boris Gomiunik on 29-04-2009

If you’re reading this, head over to windows update and start downloading the Office system service pack 2 (available from yesterday – 28th apr). Then you can continue here. I was just going through list of bugs that SP2 fixes (xslx) in Office system and especially in SharePoint Designer (Thanks, Joel for posting link). Just to name couple of which I was already writing about and also wanted to blog about:

  • “After you back up a SharePoint Server site that spans multiple CMP files by using SharePoint Designer, you cannot restore the Web site.”
  • “Custom list forms do not support attachments.”
  • “Editing a page that contains Web parts that participate in Web part connections causes the connections to be broken.”
  • “When you restore a SharePoint site from an STP site template, data views are broken because of errors in the GUID.”
  • “When you use a data form against a SharePoint Server list that uses lookup fields, SharePoint Server does not submit the form correctly if the lookup source has 20 or more values.”
  • “You cannot successfully configure a Web part connection that contains a SharePoint Server filtering Web part.”

And tons more. In the Excel with changes you can find links to all other updates in Office and Office servers SP2.

Sign in link / button

Filed Under (Uncategorized) by Boris Gomiunik on 21-10-2008

If you don’t want the users to have the “Sign in” button only in the top right corner of the page or if you’re using custom master pages, you might want to add a Sign in button. The code is very simple:

<a href=”/_layouts/authenticate.aspx” onclick=”document.location=’/_layouts/authenticate.aspx?Source=’+document.location.href; return false;”>Sign in</a>

Ofcourse replace the “Sign in” text with text / image of your choice.

Oznake ponudnika Technorati:

Where have I disappeared?

Filed Under (Uncategorized) by Boris Gomiunik on 27-06-2008

It’s been a while since I was blogging here. I haven’t disappeared from the face of the earth. I’ve made quite some progress and discoveries, so keep tuned in the future.

Mainly I’ve been working on some projects..

1. The Biggest one: SharePoint Simple CMS
Enables you to have a beautiful web design over your WSS site and really easy-to-edit contents of websites. Jose has already prepared some videos.

 

Thanks also to Mike Gannotti for a nice review.

2. The other – personal:
Even though he’s small… he’s quite a big project :)

In the SharePoint I’ve come up with quite some tricks, so stay tuned.

Learn SilverLight on Lynda

Filed Under (Uncategorized) by Boris Gomiunik on 08-05-2008

A quickie: If you want to learn to create SilverLight applications, Lynda has published free video training for it. The whole course is available for free.

Click here to start learning.

Oznake ponudnika Technorati: ,,

Access server different server with certain host name – build a new site while current still exists

Filed Under (Uncategorized) by Boris Gomiunik on 14-08-2007

The upgrade from Windows SharePoint Services 2.0 to 3.0 gave us in the company the opportunity to reconstruct some of the sites. The issue was that while the new site in WSS3 was in development, the site in the current server would stay active.

With version 2 this wouldn’t be a problem. While having the existing www.site.com we’d create a new SharePoint site with the same host header and add a host header like new.site.com and work on it using new.site.com, while the DNS server is still pointing to the old site with www.site.com. At the end you just need to change dns for www.site.com.

The challenge comes with the version 3.0, because it’s bound to host headers. Therefore it’s best to work with the original host header from beginning. So how to build a website on a new server with a host header www.site.com while the other one still exists?

One alternative is already described in one of my previous posts.

The second alternative is to set up a DNS server to point to the new IP with the existing domain and use it like primary dns server on the development computer. Not practical – just to sacrifice the whole DNS server for one site.

My friend Miha – who in my oppinion should have a blog for all the great stuff that he advised me untill now – showed me even a better alternative. The third – best – alternative is that you trick your Windows XP or Windows Vista that www.site.com is on a certain IP – therefore server. Let’s say for example that the existing site www.b4business.si is on IP 123.123.123.123. And the new server where we want to develop the site is on IP 123.123.123.321.

All we need to do is to edit the hosts file, which is located in c:\windows\system32\drivers\etc folder. At the end add the hostname (domain) and desired IP. – like in the picture below:

In Vista you have to have administrative rights to edit that file. After you’ve updated the hosts file, flush the DNS resolver cache (Start –> Run –> ipconfig /flushdns) and the the hosts file overrides any dns. Now you can edit the www.b4business.si on a new server.

When the site is ready, change the DNS to point to the new site and don’t forget to remove the entry in hosts file.

Update: I’ve had the path to the file wrong. Now it’s ok.

Create favicon online

Filed Under (Uncategorized) by Boris Gomiunik on 08-04-2007

Usually for websites we just have to create the favicon only once. So it’s a bit of unuseful to download and install extra software for this (even though we can make the icons with paint.net)

For one time ocasion you can draw or create the icon from an image file online. Here’s an online icon-maker.

SharePoint list view filtered by ID

Filed Under (Uncategorized) by Boris Gomiunik on 26-02-2007

For some time now I was experimenting with the SharePoint Blog template. Did you notice, how when viewing the post under permalink you also have the related comments?

Being curious I continued to research, found that there are no web part connections. But when editing the web part current view, I’ve discovered a beautiful thing!

Now there is besides [Today] and [Me] that you can use for filter value, also [ID]. Perfect for making display forms and related contents. So now in new SharePoint you can filter also by ID passed in URL parameter.

Let me run that through again: First when setting up a list view, set up the filter with the following value: ID is equal to [ID]

When the list view is set, now you can use the ID parameter in the listview:

And the list view is going to display the item with that ID.

Protect your email from spammers

Filed Under (Uncategorized) by Boris Gomiunik on 24-02-2007

If you’ve suddenly started to receive a lot of spam, check if you’ve written your email address somewhere on the Web. This can be dangerous, a published email address on the Internet can be harvested by special bots. There are ways to protect yourself and still publish the email so anyone can write you without a hassle.

If you’re a FrontPage user, you can use a good plugin – Jimco Spam Spoiler. (There are other useful plugins for FP there also)

Other solutions for encrypting your email from harvest bots are:

http://www.wbwip.com/wbw/emailencoder.html
http://w2.syronex.com/jmr/safemailto/
http://automaticlabs.com/products/enkoderform
http://www.seoconsultants.com/tools/email/ 
http://www.ohlone.cc.ca.us/org/webcenter/emailencoder.html

Thanks Jose for sending me the links above.

SharePoint Designer watches over our code?

Filed Under (Uncategorized) by Boris Gomiunik on 20-02-2007

Today I was making some custom scripting for one of our customers. And after finishing the code, I saved it and tried to preview… And nothing happened. Double-, triple- checked the code and all should be in order… Then at the end I’ve discovered some interesting feature or bug which tries to fix the code.

In the video below pay special attention to what happens to the </script> tag after I save the document.

The video is a bit fuzzy because of resizing, but Yes! The </script> tag automatically disappears even though it should be there. Probably calling the dvt_1.body template between confused the designer.

Anyone know a fix or how to turn this feature off? Right now I opened the site in FrontPage and there it doesn’t care. :)

ads
ads
ads