Archive for June 2007

 
 

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