March 20th, 2008 by Jeff Holliday
I recently had a request to move a SharePoint subsite to a new location under a different site collection. The site was moved over after performing the standard import/export stsadm commands. However, the customer also wanted the old location to perform an automatic redirect for anyone still pointing to the old location. I wanted to be able to do this without having hack up pages using designer (or other tool) or having to allow for code blocks within the default.aspx by opening my web.config up to vulnerabilities. I found the easiest way to do this was with Javascript and a Content Editor Web Part.
- Add a Content Editor Web Part to the Main Page of the site.
- Modify the Web Part and click on Source Editor.
- Paste in the following code while changing the URLs to match your target.
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!–
function redirectsp()
{
top.location="http://sharepoint";
}
if (top.frames.length==0)
{
setTimeout('redirectsp()',0);
}
//–>
</SCRIPT>
</HEAD>
<body>
Redirecting you to the new location. If you are not redirected, click <a href="http://sharepoint">HERE.</a>
</body>
</html>
- I set the redirect time to 0, but you can set it higher if you like. 1 sec = 1000, 2 sec = 2000, etc.
- Save the code changes.
The fun part of this solution is the fact that the code tries to load no matter what view you are in (i.e. Standard view, Edit Page, etc). So, if you have to make changes to the code you have to let the page load but then time a press of the ESC key to keep the Javascript from loading each time.
Jeff
Posted in Uncategorized | No Comments »
March 14th, 2008 by Jeff Holliday
In the spirit of my alma mater, Washington State University, and the great basketball season they are having I am posting the Windows Mobile theme I created. It has the Cougar logo on the vertical today screen and a shot of Pullman with Bryan Tower on the horizontal today screen.
Download: http://cid-65b4663a2e1f48a3.skydrive.live.com/self.aspx/Public/WSU%20Theme.tsk
Go Cougs!!
Jeff
Tags: Non-SharePoint
Posted in Uncategorized | No Comments »
March 13th, 2008 by Jeff Holliday
I ran into presence not appearing in SharePoint or Outlook 2007 after my upgrade to Communicator 2007.
Microsoft recently released a patch to fix this issue.
http://www.microsoft.com/downloads/details.aspx?FamilyID=1ad57f8f-78f7-45f6-a8c0-805936f46645&displaylang=en
Thought I would pass it along…
Jeff
Tags: Troubleshooting
Posted in Uncategorized | No Comments »
March 7th, 2008 by Jeff Holliday
As much as I fight basic authentication, there are still people out there who want to use it. SharePoint Enterprise Search can crawl a site requiring basic authentication through the use of Crawl Rules.
- Browse to the Shared Services Provider page within Central Administration.
- Click on Search Settings -> Content sources and crawl schedules.
- I recommend adding the source as a new content source.
- Once you have created the new content source return to the Search Settings screen.
- Click on Crawl Rules -> New Crawl Rule.
- Enter the path this rule will affect. Using wildcards is the easiest way to make sure the enter server is being crawled with the account specified.
- Change the crawl configuration to ‘Include all items in this path’. Specify other settings if necessary.
- Change the authentication to ‘Specify a different content access account’.
- DO NOT CHECK ‘Do not allow Basic Authentication’.

- Click OK to save the settings and your new crawl rule will appear in the list.

- Kick off a full crawl of the content source for the rule to take effect.
Simple I know. But I was hit up for this multiple times so I figured I would write a post on it.
Jeff
Tags: Configuration
Posted in Uncategorized | No Comments »
March 7th, 2008 by Jeff Holliday
So I was just playing around with Windows Live Writer to test it out for posting to my blog and discovered Windows Live SkyDrive. Free 5 GB worth of disk space and you can store personal files, share with your Live Messenger friends, or share out to the general population.
The interface is very easy to use.
Windows Live SkyDrive Site: http://skydrive.live.com/
SkyDrive Team Blog: http://skydriveteam.spaces.live.com/
SkyDrive Viewer from ScottIsAFool on CodePlex: http://www.codeplex.com/SkyDriveViewer
Jeff
Tags: Non-SharePoint
Posted in Uncategorized | No Comments »
January 14th, 2008 by Jeff Holliday
I had a request from a client to hide the Edit Page option under the Site Actions menu for all users without Full Control permissions. I performed the following steps to remove the edit page option for user’s without the managesubwebs right.
-
Open the master page for the site.
-
Find the following lines of code:
<SharePoint:MenuItemTemplate runat=”server” id=”MenuItem_EditPage”
Text=”<%$Resources:wss,siteactions_editpage%>”
Description=”<%$Resources:wss,siteactions_editpagedescription%>”
ImageUrl=”/_layouts/images/ActionsEditPage.gif”
MenuGroupId=”100″
Sequence=”200″
ClientOnClickNavigateUrl=”BLOCKED SCRIPTMSOLayout_ChangeLayoutMode(false);”
/>
-
Add to the following lines to the code:
PermissionsString=”ManageSubwebs”
PermissionMode=”Any”
-
The code should now look like:
<SharePoint:MenuItemTemplate runat=”server” id=”MenuItem_EditPage”
Text=”<%$Resources:wss,siteactions_editpage%>”
Description=”<%$Resources:wss,siteactions_editpagedescription%>”
ImageUrl=”/_layouts/images/ActionsEditPage.gif”
MenuGroupId=”100″
Sequence=”200″
ClientOnClickNavigateUrl=”BLOCKED SCRIPTMSOLayout_ChangeLayoutMode(false);”
PermissionsString=”ManageSubwebs”
PermissionMode=”Any”
/>
-
Save the master page and login with an account that does not have Full Control, but is not read only either… The Site Actions drop down should now resemble:

Tags: Development
Posted in Uncategorized | No Comments »
August 7th, 2007 by Jeff Holliday
This post is more in and around business analysis and adoption of SharePoint. Business units typically know they need some type of communication and collaboration tool (or an upgrade to an existing one), but have no idea what to ask for or how to get there. If SharePoint is just thrown up with no input from the End-Users you will typically have a very low rate of adoption. If the lines of business are included in the process they are more apt to use the solution once implemented. The following is a partial set of questions that I have found very useful when attempting to extract this information from lines of business.
- What functionality exists in the current solution (if one exists) that you need in the new SharePoint solution?
- Explain Metadata and how it works for organization and search. What categories make sense for metadata? (i.e. Risk Management might have: Claim Loss Reporting, Contractor Services, Emergency Assistance, Insurance, Risk Management Services and Travel Related Services)
- Is a private departmental site needed with corresponding rights for storing sensitive data?
- How many people can: add new content, change content or delete content? (Contributors) Who are they? Will content require approval?
- How do they handle document versioning? If versioning is to be used, how many major and minor versions should be stored?
- Do they have an established workflow for document submission / approval? Is this a manual process that can be changed into an automated one with workflow?
- Have they thought about Site Administration? – someone needs to Administer the site
- Do they have any look and feel requirements? Decide whether they will have the ability to change the look and feel or if a standard is going to be used from the top down.
- Are there any standards that they have to conform to?
- Is there a committee or someone controlling the content / look and feel?
- Do they need any Managerial or Operational Statistics displayed on the site (i.e. KPIs)?
As I said before this is just a partial list. Feel free to submit your own ideas.
Jeff
Tags: Adoption, Governance
Posted in Uncategorized | No Comments »
July 26th, 2007 by Jeff Holliday
I'm posting this just because I'm getting tired of losing the script… This is a great script written by Microsoft to reveal CSS classes within SharePoint.
Taken from: (http://msdn2.microsoft.com/en-us/library/ms438349.aspx)
<script language="jscript">
function ClassInfo()
{
if (window.event.srcElement.className != null)
{
stsclass.innerText = window.event.srcElement.className;
}
else
{
stsclass.innerText = "";
}
}
window.document.body.onmouseover = ClassInfo;</script>
<div style="border-style:solid;border-width:1px; width: 281px; height: 34px;
position: absolute; left: 286px; top: 41px; z-index:15; padding-left:4px;
padding-right:4px; padding-top:2px; padding-bottom:2px; background-color:#EEEEF4">
<p id="stsclasstitle"><font face="Tahoma" id="stsclasstitle">Classname: </font>
<font face="Tahoma"id="stsclass"> </font>
</p></div>
Microsoft mentions including this within a ASPX page. Why mess with that? Just create a content editor web part, open the source editor, and paste the above code in.

You will notice that the CSS codes now appear in the top middle-left of the screen as you scroll over the SharePoint page.

If you wish to change the location of the box displaying the codes just alter the following to suite your needs: position: absolute; left: 286px; top: 41px; z-index:15
The following example shows it changed to: position: absolute; left: 100px; top: 0px; z-index:15

This will help to alleviate some of the branding stress when you are ready to pull your hair out. Always remember to check Heather Solomon's GREAT CSS Reference Chart as well: http://www.heathersolomon.com/content/sp07cssreference.htm
Posted in Uncategorized | No Comments »
July 26th, 2007 by Jeff Holliday
Posted in Uncategorized | No Comments »
July 26th, 2007 by Jeff Holliday
This is just a quick little tidbit. Out-of-Box workflows in MOSS, unless manually kicked off, require an event to be triggered. I was trying to figure out a way to automatically delete files from a document library 3 days after they were uploaded. The doc library was being used strictly as a transfer point and needed to be kept clean. Thanks to Sean S. for the idea…
So as simple as it is:
1. Start a new workflow using SharePoint Designer by going to File -> New -> Workflow.
2. Give the Workflow a name and select the target doc library or list.
3. Set the start event. I set mine to automatically start when the item is created or changed. Click Next.
4. Enter a name for Step 1 such as `Pause for 3 days’
5. Do not select a condition because we want it applied to all items.
6. Under Actions select `Pause for duration’.
7. Change to 3 days, 0 hours, and 0 minutes.
8. On the right choose to `Add workflow step’
9. Once again, give the step a name and no condition.
10. Select Delete Item under Actions and set it to Current Item.
11. Click Finish to save the workflow.
NOTE: A good way to test this first is to set the duration to a low count like 1 minute. Once you are sure it works properly, set it to your desired time frame.
Posted in Uncategorized | 1 Comment »