Tuesday, December 15, 2009
SharePoint Breadcrumb Oddity
It turns out that some of the default publishing layouts "blank" the placeholder I was using to control the breadcrumb navigation. Once I inserted my own and moved the place holder somewhere esle, everything was fine.
Odd...
Thursday, December 10, 2009
Creating a site banner with the Content Editor Web Part
NOTE: This article is intended for people who are really, really, really picky about the look and feel of their SharePoint site (like me). I am going to show a level of detail that is unimportant to 95% of the population.
For those of you with web design experience, you have probably created splash pages and page banners for other websites and may want to add one to your SharePoint site. There are several ways to create a banner for your site - the simplest is to just create an image and then use the Image View Web Part. You can use Paint.NET, GIMP, or other image editing software to create a GIF, PNG, or JPG image that you then upload and display.
However, an image is a fixed-width image that may or may not line up with other things on the page. Also, if you need to change the text or change the width, you have to fire up the image editor (again), change the text (again), export the image to PNG (again), upload it (again), and then repeat for every little adjustment. This especially annoying for typos - but maybe that is just my problem.
There are probably some of you saying "If I was going my own page, I would just put a background image behind a table or something, and then put text in front" which means you can change the text as without using an image editor. But you can't do that with SharePoint - or can you?
Actually, you can - if you are a little bit careful.
You can use a Content Editor Web Part to display something close to raw HTML code. There are only a couple of things you need to keep in mind:
- Close your tags PERFECTLY - if you open something, close it. Do not leave an un-closed row, table, SPAN, or DIV.
- Match your tags PERFECTLY - don't close something you didn't open. SharePoint has a lot of nested tables so if your code has an extra </table> tag, things can get very interesting.
Now, I will show you an example. For this site, I knew that I, as a site collection administrator, had a large number of tags across the top of the screen and I knew that a regular visitor would not. So, what I saw would be different than a regular visitor. In order to accommodate that, I wanted a banner that "expanded" to the left and right to fill the space of the column.
First, I created an image and "faded" to one site to a solid color. I use Paint.NET for my image editor because it is open source and quite flexible. Paint.NET also gives me the hex code for the color I used on the image. I can simply copy and paste the color code into my CSS markup.
In this example, I created a image that is designed to displayed on the right and is tall enough to not need repeating vertically. Upload the image to a document library on your site and copy the full URL to this image - you will need it in your CSS markup, too.
Create a new text file and start out with a simple table layout:
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=100%>
</td>
</tr>
</table>
This table layout gives you table with a single cell. If you are an HTML or CSS purist, you probably hate me right now since I am using tables to control page layout. However, SharePoint runs on nested tables so it simply easier to keep going with the existing system.
Next, you need to add inline CSS to the TD tag to add your background image. Here is the markup I used to push the image to the right:
<td
style="background-image: url([Insert your path]/PublishingImages/banner.png) ;
background-repeat: no-repeat;
background-position: right;
background-color: #E5E5E5;"
width=100%>
In line CSS needs to be enclosed in a single string. Each specification needs to be terminated with a semi-colon.
background-image: url(PATH); - you need to enter the path to the image you uploaded.
background-repeat: no-repeat; - will show the image once. There are other options available if your image needs to be repeated to form a pattern
background-position: right; - should be self explanatory. There are other options available.
background-color: #E5E5E5; - this is the light grey that is my "fade" color. This is what allows the cell to change width but still look like a single item.
Then, I added text into the cell. I added inline formatting for my text as well, but that is completely optional.
<p style="font: small-caps bold 1.5em; padding: 10px; ">Redesign and Improve - 2009</p>
<p style="font: bold 2.0em; padding: 10px;">IT Portal v2.0</p>
Then, save the text file to a document library on the site just like you did for the image file and copy the full URL the text file, too. Edit your page and add a new Content Editor Web Part. Use the option to point to the text file that you just uploaded.
There are a couple of advantages of using the text file instead of just entering HTML straight into the Content Editor Web Part:
- If you delete a text file, it goes to the site recycle bin. If you delete a Content Editor Web Part, it is permanently deleted.
- You can enable versions in the document library, you can roll back changes
- You can reuse the HTML code in a text file on many pages.
Wednesday, December 09, 2009
Found a great SharePoint CSS reference
CSS Reference Chart for SharePoint 2007 (Microsoft Office SharePoint Server 2007 and Windows SharePoint Services v3)
She has a bunch of other articles about branding and CSS tricks on her blog as well. Definately going to bookmark that one.
Wednesday, December 02, 2009
Things have been busy
Monday, November 16, 2009
Found a used book store in 白金台(Shirokanedai)
Monday, November 09, 2009
Tokyo Winter vs. Seattle Winter
Tuesday, August 25, 2009
Changing the link on the top of a web part
When you insert a web part into your SharePoint site, the title of web part is formatted to be a hyperlink to the list, document library, or other SharePoint item that you used for the web part. Some web parts don't have links by default but all web parts can have it. You can also customize where that link points to.
For example, you have a confogired a filtered view of the list to use as a web part. By default, the title of the web part is linked to the default view of the underlying list, not the filtered view I used. If you want people the click the title bar to go you a different view than the default you can.
- Select Modify Shared Web Part
- Scroll down to the advanced section
- Look for a field labeled Title URL.
- It probably points to the default view such as AllItems.ASPX. If I want to point it to a different view, just copy and paste URL to the filtered view into that field and hit OK.
Tuesday, August 11, 2009
Two earthquakes
Hopefully, there won't be any others any time soon. Since our building is only two years old, it should do okay in an earthquake, but I'm not interested in finding that out first hand.
Monday, June 22, 2009
Making SharePoint not look like SharePoint: An Odyssey - Part 1
Regardless, I am going to walk you through the way I did it. I doubt this is the best for everyone but this is low-code/minimum complexity way to create custom master page. In this project, I attempted to mimic an existing, public facing website for an internal portal. I did this by adding one customized master page, one CSS file, and a handful of graphics. I made no custom JavaScript and never fired up Visual Studio – this was done entirely from SharePoint Designer 2007.
After reading a lot of books and how to articles, I decided on some general rules for anyone tackling this for the first time:
Do not modify the basic SharePoint objects. Open and save as but do not just directly edit the default CSS styles, master pages, or graphics. It is highly likely that service packs or other upgrades will overwrite your changes. Also, it is sometimes hard to go back.
Double check your backups before you start. You have a pretty good chance to really screw things up so make sure you are backed up and run a test restore before you get started.
Never delete a
Don’t start from scratch. There is Microsoft TechNet article that tells you how to create an empty master page and you can design to your heart’s content. If you are new to this, like I was, “green field” development is tempting but just say NO. Open an existing master page and save as. You get some junk you don’t want but you will start with something that works.
SharePoint likes nested tables - live with it. I know that current web design treats nested tables as the dark spawn of Satan that leads to ultimate damnation but, unfortunately, SharePoint behaves better with nested tables. I am not sure why that is the case, but much of the pre-installed web components appear to assume that you are in nested tables where their CSS formatting is going to be isolated from the rest of the page. When the different styles become intermixed, you get some very entertaining results.
Test the Edit Page functions often. When trying to get the branding to look right, create the look, tweak the CSS, adjust the graphics, and take a look at the final page. Do yourself a big, big favor and select “Modify Web Part”, “Edit Page”, or any other site administrator function on the page. You may have accidentally shrunk, hidden, or mangled the toolbars that people need to actually get work done.
Monday, June 01, 2009
SharePoint Customization and Branding
Whenever you want to change look and feel of a website, you normally want to adjust the CSS files that control it. Cascading Style Sheets are relatively straight forward and seem to behave logically. For example, you can have multiple definition of a paragraph and whichever style is applied last wins. It would seem that if you added your own CSS link, tweaked the settings you want, you wouldn’t make any changes to the preinstalled files. That way, patches and upgrades wouldn’t destroy your work - simple, right?
However, SharePoint has a big problem with this. The key problem with custom branding for SharePoint is that a large part of the functionality in SharePoint is defined by the CORE.CSS style sheet. No problem, right? You just need to add another CSS file below it in the header, and you’re done. Well, actually, it is not that simple. Unfortunately, the way that SharePoint builds the pages, the CORE.CSS file is always last - thus making it always be dominant.
Looking at the Clever Workarounds pages, it looked like getting around that would be very, very complicated. However, in reading the comments, there seemed like their might be a good way around it. Here is the comment (edited slightly for length):
Remember the Cascading part of cascading style sheets and the specificity of each rule. It doesn’t matter if your css rule appears before or after core.css If you want your rule to win you make it more specific. I have used this approach since SharePoint 2001 and have never had any problems. I place a unique, short ID attribute on my body element in the master page. Example Then when I find a rule that I want to override that core.css is currently rendering I create a duplicate rule in my stylesheet but place #dm in front of the rule. So for example .ms-WPHeader in core.css becomes #dm .ms-WPHeader in my stylesheet. Now that I have a more specific rule my style rule wins. Works every time … and it requires no custom code or major modifications to SharePoint.
So, I gave this a shot:
- You create your own CSS page and link to it.
- At the body level, inside a table tag, or whatever makes since, add the ID tag (the commenter used DM for his example but it can be anything)
- View your pages and see what CORE.CSS styles need changing
- The internet explorer Developer Toolbar is very useful for this
- In your custom CSS page, create rule with the same name and add the #ID in front of the definition
- Save and refresh – repeat as necessary.
Doing some development work
Recently, I’ve doing some development work instead of my more normal systems administration work. I’ve always done VBScript scripting of administration tasks, started fooling with PowerShell, and have always been messing around with websites but I’ve been going past that, recently. I’ve had a couple of things I’ve been working on:
- Creating custom “look and feel” to SharePoint sites
- Creating web parts for SharePoint sites
- Creating a C# web application for linking an outsourced CRM system to Groove
- Creating a C# console application to read three different calendars and then create a survey questionnaire based on information inside the meeting
It has been a real challenge I’m going to try and write some posts based on what I learned. For those of you with real developer experience, you will probably laugh over some of the things I had trouble with. Hopefully, if there is any other sysadmin that needs to do some quick prototype code, they can benefit from my experiments.
Tuesday, April 21, 2009
Thoughts on Japan
- Our condo has 24x7 automated lockers. When a delivery comes and we're not home, they put the box in this locker and code in our address. We can open it with this special card when we get home. You can use that locker to send boxed and dry cleaning, too, and they auto-bill our credit card.
- Chiho found a company called Yoshikei ヨシケイ千葉 that does grocery delivery. The offer a menu of four meals per day and you order whichever one you like and they deliver the pre-measured ingredients to your day. There is almost no additional cost and there is no wastage.
- We have a bread store at our train station and at a nearby grocery store that is way better than anything you'd find in Seattle. All of the French people in my office say that Japanese bakeries are as good as Paris bakeries - some are even better.
- Most utility bills can be paid by direct bank deposit but you can pay all the others at any convenience store - with immediate credit for payment and no additional fee.
And that is just a short list. I will add some of the nice things in Japanese houses later.
Found an answer to my SharePoint question
Now, for my next project is to figure out how to get that to work without the Enterprise Search site, since that template is not available.
Thursday, April 09, 2009
Clever Workarounds
It is spring in Tokyo now
Monday, April 06, 2009
Indexing PDF files with SharePoint
Bought a Netbook
EMOBILE's service is Tokyo is really pretty good and they offer 7.3mbs connections. I routinely speed test mine at over 5mbs which seems very good to me. The coverage area is cities only, not up on the mountains, but it covers all of the areas we are likely to travel.
Friday, April 03, 2009
Is Microsoft's technical documentation gettting worse?
I wanted to find out just a few things:
- Is virtualization supported (hyper-v or vmware)
- If so, which roles are good candidates for virtualization
- As you move from simple to complex or small to big, which role can be combined onto one server and which should never be.
Wednesday, March 25, 2009
Finally got my Japanese drivers' license
Wednesday, March 18, 2009
Nice step-by-step for Outlook passwords
Odd ball error on SharePoint
With MOSS 2007, there is a default search page, _layouts/OSSSearchResults.aspx and you just paste in that URL into the Simple Search web part or the Advanced Search web part. The first page of results will display just fine using either web part. However, the "next page" link fails for the Advanced Web Part.
When you use the Simple Search web part, you get a long URL:
/_layouts/OSSSearchResults.aspx?k=test&cs=This%20Site&u=http....
K = the info you put into simple search
CS = scope for the search
When you hit next, the JavaScript appends more stuff to the URL and off you go - no problems at all.
/_layouts/OSSSearchResults.aspx?k=test&cs=This%20Site&u=http....&start1=11
The advanced search does not format a long URL. When you hit Next, you get a blank page. I have been looking through everything I can find about this web part and I have gotten nothing out of it. It seems that 90% of developers out there roll their own search web parts instead of use Microsoft's. Even on the office.microsoft.com search, the top articles are how to make your own.
Come on... can't I just used the built in one?
Friday, March 13, 2009
Crackberry withdrawl...
Switched my commute around
It made me realize how well-connected the Tokyo area actually is. I have three different ways to get to work that get me there about the same time plus a couple of alternates that are little slower. I have a half dozen different ways of getting to work that do not involve a single car. Coming from Seattle, that is kind of a shock. I suppose that Seattle is getting better, and I know that Seattle is smaller, but still...
Wednesday, March 04, 2009
Week numbers
We did have some fun this year, though. The ISO standard for week numbering did not match the USA formatting for week numbers so we had a little be of conflict this week.
Tuesday, March 03, 2009
Training in Nagoya
Tuesday, February 17, 2009
Japanese Drivers License
If you are from Europe, Australia, Hong Kong, or another half-dozen countries, this is a simple paperwork process. Those lucky people do not have to take any tests. Americans do have to take a written and practical driving test, though. Based on what I could research on the Internet, this is because drivers licenses are issued by the states and not the federal government so Japan cannot create a single, unified rule for all American drivers licenses. Americans still have a paperwork process to go through, though. You have to get your driver’s license translated at the Japan Automobile Federation (JAF) and then bring that, your foreigner registration card (外国人登録証明書 gaikokujin tōroku shōmeisho), a new photo, and passport to your local office. They will take the paperwork, give you a quick eye-test, give you the written test, and get you an appointment for the driving test.
The written test is ultra, ultra simple. It was a ten question, true or false test and you were allowed to miss two questions. The questions were so easy that you would have to be very tired not to get a perfect score.
The practical test is a lot tougher. Very few people who take the test pass on the first time because the inspectors are extremely picky. If you search on the expat sites about driver’s licenses, you will find a lot of people complaining about the practical test. You have to drive letter perfect and with exaggerated care in order to pass. There is a wiki site for the Ehime driver’s test that recommends that you actually vocalize your safety checks (Mirror OK! No one left, no one right, OK!, etc.) That might be a little overkill, I suppose, but it does get you past the test.
I took my test this morning but managed to fail it. The car needed a lot more brake than I was used to so I overshot a stop line early in the test and that was an automatic fail. Today was not really a fun morning… Oh well, I try again in two weeks.
Monday, February 16, 2009
A little humor for the morning
Sunday, February 15, 2009
One year - exact
My next major challenge is filing my American taxes. I've decided not to do them myself after I started to read IRS Publication 54 which is 40+ pages long and insanely complicated. Just trying to figure out the "physical presence" rules was confusing. Maybe I can go back to doing them myself next year or the year after but not this year.
I found a tax accountant in Hawaii that specializes in providing tax services for people living in Japan. He was well recommended in expat community websites here in Japan. We'll see how it turns out.
Tuesday, February 03, 2009
Almost the one year mark
Wednesday, January 28, 2009
Microsoft finally made this a part of Exchange
Tuesday, January 27, 2009
Winter hasn't been too bad
We didn't get any snow in Tokyo itself and only had a handful of rainy days - probably the biggest difference between Tokyo and Seattle. The vast majority of the winter is sunny. Last week, we had four days of gray and drizzly weather and we had a couple of scattered rainy days but it seemed always sunny.
Wednesday, January 21, 2009
Still alive...
It has been a long time since I had to do a lot of video work but Camtasia is a lot better than any of the tools I used previously. You can drop in clips and different resolutions, glue them together, do a voice over, and then spit out the video in whatever format and size you want. For Flash video, you can have it create the clickable chapter headings on the left, build the web page, and output it straight to FTP if you want.
There might be better tools - and Camtasia is kind of expensive - but this makes it easy...
Wednesday, January 07, 2009
Happy New Year!
It’s been a while since I uploaded any new posts – almost two months. I will try to do a little better than that in the next couple of months.
New Years was relatively tame for us – no big trips or vacations. Chiho’s brother came up to visit us and Chiho’s parents and we sat around and ate a lot of food. Also, we watched a lot of television. The Japanese TV studios show a lot of once-a-year specials right before and right after New Years and they can be a lot of fun. Our cable service comes with a DVR so we can skip all the extra commercials they throw in there too...