Drop a border around your page

Here's the CSS that will drop a border on your page.

body
{
   margin: 5px; 15px 5px 15px
   background-color: #CC0066;
}

 Just write this into your CEWP.

Ugly, huh?

-robot

Run-time Help (WSS2003)

Eveybody that knows me knows that I like to page slap my customers every chance I get.

But to do that, you've got to be able to create help documents on the fly.  So I set about trying to create a help system that would mimic SharePoints.

First, you need a content editor web part with source code that looks like this:

<title>Connect Help</title>
<script type="text/javascript" language="Javascript" src="../_vti_bin/Help/1033/SPS/html/sExpCollapse.js" mce_src="../_vti_bin/Help/1033/SPS/html/sExpCollapse.js">
</script>
<script type="text/javascript" language="JavaScript" src="../_vti_bin/Help/1033/SPS/html/backgo.js" mce_src="../_vti_bin/Help/1033/SPS/html/backgo.js">
</script>
<SCRIPT>
 var strShow = 'Show';
 var strHide = 'Hide';

 function go(url)
 {
  navigate(url);  
 }
</SCRIPT>

<STYLE TYPE="text/CSS">
.ms-banner{
Display:none}
.ms-titleareaframe{
Display:none}
.ms-bannerframe{
Display:none}
body{
background-color: #FFFFFF}
a.HelpLink{Font-Size:14Pt; Font-Weight:Bold;}
.ppHelp td {
  background-image: url(/_vti_bin/help/1033/sps/images/bar.gif);
  background-repeat: repeat;
}
.ppHelp a:link, .ppHelp a:hover, .ppHelp a:visited {
  color:white;
}
</style>
<TABLE class=ppHelp WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TD COLSPAN=2 style="background:none;">
 <img src="/_layouts/images/incr/logo_incr_50w.gif" mce_src="/_layouts/images/incr/logo_incr_50w.gif"><img src="../HelpWPPages/Graphics/ProjectPointHelp2.gif" mce_src="../HelpWPPages/Graphics/ProjectPointHelp2.gif" border="0" alt="INC Research ProjectPoint Help">
</TD></TR>
<TR><TD align=left>
<a href="BLOCKED SCRIPTmyBack()" mce_href="BLOCKED SCRIPTmyBack()" title="Back button"><img src="/_vti_bin/help/1033/sps/images/back.gif" mce_src="/_vti_bin/help/1033/sps/images/back.gif" width="24" height="32" border="0" alt="Back"></a>
 <a href="BLOCKED SCRIPTmyForward()" mce_href="BLOCKED SCRIPTmyForward()" title="Forward button"><img src="/_vti_bin/help/1033/sps/images/forward.gif" mce_src="/_vti_bin/help/1033/sps/images/forward.gif" width="23" height="32" border="0" alt="Forward"></a>
 <a href="BLOCKED SCRIPTself.print();" mce_href="BLOCKED SCRIPTself.print();" title="Print button"><img src="/_vti_bin/help/1033/sps/images/print.gif" mce_src="/_vti_bin/help/1033/sps/images/print.gif" width="59" height="32" border="0" alt="Print"></a>
 </TD>
<td align=right style="padding-right:5px; color:white;"><a href="BLOCKED SCRIPTwindow.close();" mce_href="BLOCKED SCRIPTwindow.close();">Close</a></td>
</TR>
</TABLE>

 

I think everywhere it says "BLOCKEDSCRIPT" you have to substitute the word "javascript"

This will create a SharePoint Help-esque web part page where the default on screen images are hidden by CSS and the next and back buttons get the right images and the right javascript.

When you get the web part on screen, export it and then upload the exported web part to your web part gallery using a web part name like "Help Header"

Then create a document library with a web part page as the default document type.  Create a page and use the Full page, vertical option.

Drag your Help Header web part and a content editor web part onto the web part zone.  Add your content to the rich text editor of the second web part or simply point to a .htm file in some other document library.

If you find you need to access the design mode after you hid it with the header web part, use the javascript command:

BLOCKED SCRIPTMSOLayout_ToggleLayoutMode()

That will take you into design mode where you can close the header web part and regain access to all the SharePoint stuff.

Then, when you want to call your help page, add a content editor to the page with the following javascript in the source:

<script type="text/javascript" language="Javascript" >
function LocalHelp(strHelpURL)
{
  var wndHelp = window.open(strHelpURL, "STSHELP", "width=325,height=600,menubar='false',scrollbars,toolbar='false',resizable");
  wndHelp.focus();}
</script>

And then, instead of plain old "<a href's = " use an anchor link that looks like this:

<A onclick="LocalHelp('HelpPages/PageName.aspx')" href="BLOCKED SCRIPT;" mce_href="BLOCKED SCRIPT;"  ;>Click Here</A>

This should popup a little help window with your 100% page slappable content.

-robot

 

 

Access to Site Template Galleries in SharePoint 2003

We've talked about access control before.  What I'm trying to do here is provide access to the site template galleries.  Apparently you have to be a site colleciton administrator to see them.

How do you get to be a site collection administrator?  Well it's not easy.  You can't give that role to a group,  You have to go in to Site Settings | Go to Site Administration and then, in the Site Collection Administration section, you click on View site collection user information.

Edit the user you want to be able to see the site template galleries and check the Site Collection Administrator option.

-robot

SPS2003 Site Template Gallery

As a follow up from our recent discussion about the SPS2003 List Template Gallery, we should look at the SPS2003 Site Template Gallery.

You find it under Site Settings | Manage Security and Addional Settings.  Again, you roll into the gallery and upload your template and viola…

Say you've uploaded your site template.  You should be able to go to the Site Manager area and click on Create Site and select your template.

sigh…

 -robot

SPS2003 List Templates

So, we know that the top level site owns the list template gallery.  Remember also, when the list template gallery is just another doc library so you can right click on a template and save the .stp file to disk. You can also rename the .stp file to .cab and then open it like any .cab file to see that there's a manifest.xml  in there and it will define the content and structure of the list.

But also, the portal has its own list template gallery.  Find it under Site Settings | Manage Security and Addional Settings.  so you roll into the gallery and upload your template and viola…

I guess it was too good to be true,  when you go to create a new list in a portal area, you don't get the option to use your list template. 

Is this supposed to work?  Does anybody know?

Well sure, you say…  The Create ListLibrary list is trimmed to templates in the gallery that are cut from sites with the same site type.  That is to say, if you create a doc library in a team site and cut a template from it, when you upload the template to a meeting site's list template gallery and click create, your template will not be an option.  Likewise, the various portal areas are individual site types; if you cut a template from the home area and upload it to the portal's list template gallery, you won't be able to use that template in any area that doesn't use the home template.

At least it's good to know.

The question remains, however, what does the portal site template gallery do?

-robot

Create Your Own Context Menu

You remember we talked once about getting documents to open into work in such a way that when you save it, it saves straight back the to document library.

We had this post where I reviewed the html that opens documents from the context menu in a document library.

Well, our new best friend Pedro give us this gem:

http://pserrano.blogscavedigital.com/PermaLink,guid,82933a22-3179-48a0-bfef-15b8a6744b25.aspx

Where he shows us how to completely steal the context menu code.

My current objecttive revolves around this solution:  I want a site owner to be able to edit a "Current Status" page in MSWord and then use that document as a source for a content editor web part.

And this works great; you should try this.  Assume you have a new blank site.

First create a document library using the default MSWord document as a template.  Create a document and call it SiteUpdate.htm.  Be sure to use the .htm extension when you save it.

Next, create a web part page.  Call it Update.aspx and put a content editor web part on it.  Put the URL to your SiteUpdate.htm in the Content Link field.

Then, in a second content editor web part use Pedro's code like this:

 <SCRIPT>
myCtx = new ContextInfo();
myCtx.listBaseType = 1;
myCtx.listTemplate = 101;
myCtx.listName = "{<put list GUID here>}";
myCtx.listUrlDir = "Document Library";
myCtx.HttpPath = "http://MyPortal/Resources/_vti_bin/owssvr.dll?CS=109";
myCtx.HttpRoot = "http://MyPortal/Resources";
myCtx.imagesPath = "/_layouts/images/";
myCtx.PortalUrl = "/";
if (myCtx.PortalUrl == "") myCtx.PortalUrl = null;
myCtx.displayFormUrl = "http://MyPortal/sites/MySIte/MyDocLibrary/Forms/DispForm.aspx";
myCtx.editFormUrl = "http://MyPortal/sites/MySite/MyDocLibrary/Forms/EditForm.aspx";
myCtx.isWebEditorPreview = 0;
myCtx.ctxId = 1;
myCtx1 = myCtx;
</SCRIPT>

<!– my item: BEGIN –>
<table
height="100%"
cellspacing=0
class="ms-unselectedtitle"
onmouseover="OnItem(this)"
CTXName="myCtx1"
ItemId="1"
ServerUrl="/sites/MySite/MyDocLibrary/SiteUpdate.htm"
FileDirRef="sites/MySite/MyDocLibrary"
HTMLType="Word.Document"
FileType="htm"
DocIcon="icxddoc.gif|Microsoft Office Word|SharePoint.OpenDocuments"
FSObjType="0"
COUId=""
SourceUrl="">
<tr>
<td width="100%" Class="ms-vb">
<A onfocus="OnLink(this)" HREF="http://MyPortal/sites/MySite/MyDocLibrary/SiteUpdate.htm" onclick="DispDocItemEx(this,'FALSE','FALSE','FALSE','')">
Manage Update Content
</A>
</td>
<td><img src="/_layouts/images/blank.gif" width=13 style="visibility: hidden" alt="">
</td>
</tr>
</table>
<!– my item: END –>

What you end up with is content on your page that can be edited in MS Word using the options provided by the context menu.

Mine is a little different from Pedro's; he was trying to run an InfoPath form.  Now, you can give the site owner edit access to the document libary and he or she can modify the update content in Word, click save and the content will be written right out to the web part page via the first content editor.

Groovy, no?

-robot

SharePoint RSS Generator

OK, folks…

This rocks.  You can find your RSS feeds everywhere these days like Yahoo Sports here:

http://sports.yahoo.com/top/rss.xml

So all you need is that URL and this guy's killer site:

http://sharepointrss.com/

Click Generate and save it to a doc library and then you have in importable web part that will keep you up to date with all that going on in the world of sports.

That is so cool.

-robot

 

Deploy a Site with Doc Libraries with a Default Folder Structure

They want this in 2003.

The boss thinks we have to write some huge blob of XML to build the folders into a doc library and then add that doc library to some default site content XML and then add that site to some available site template XML.

Of course, I just created my doc library with the desired folder structure in a blank site and then saved the site template.  When you go into the site template gallery, you can right click on a template and save it out to your operating system which essentially "exports" it.  And, you know me, I'd keep all my dafault site templates in a doc library on the portal where everyone can get at them.

Oh, and update % Complete to 100.

-robot

Well, that was eventful…

So now, I've "moved on" as they say.  No sooner do I get the Active directory thing working using a Data View Web Part in Front Page and a custom query of the profile database than I roll into the bosses office and gave my 2 week notice.

So she says to me  "TWO WEEKS???  I'M TALKING TWO DAY AS IN YOU ARE SO OUT OF HERE TODAY!!!"

So, the robot tossed his geek badge to the HR guy, dumped his stuff in a box, and walked it out the door.

Lucky for me, I was able to push my start date ahead two weeks at my new digs.  I get an office with a door and a window.  I get a laptop and a monitor for twin screen viewing. I've cut 10 minutes off my commute each way.  I get bi-weekly paychecks.  I can't wear blue jeans anymore except on Friday but I do get the 20% raise.

And, best of all, I get a needy customer.  They've got nearly 1000 users in about 25 offices in a dozen countries.  They've installed SharePoint Portal 2003 and then migrated it to another domain breaking everything but the top level web sites.  They've got another extranet effort underway that's SPS 2003. And, of course, they want 2007 and Office 12 badly.

So it's nice that we'll be working on some real SharePoint solutions and it's nice that I have about 25 things in my task list already.  So, if I have all the HR and Orientation stuff out of the way, like they say on Celebrity Death Match, "Let's Get it On"  Or is that Extreme Elimination Challenge?

-robot

 

An Item with the Same Key has Already been Added.

I saw this post:

http://weblogs.asp.net/erobillard/archive/2006/10/20/Resolving-the-MOSS-2007-error_3A00_-An-item-with-the-same-key-has-already-been-added_2E00_.aspx

I get this error in SharePoint Central Administration trying to remove forms from InfoPath Form Server.

I get it from a command line running stsadm.exe -o removeformtemplate -formid MyformID

Once I get it, I get it anytime I click OK in central admin.

This ends up with the server pretty much a total loss.

-robot