This project is read-only.
Project Description
A Web Part to build html with parameters taken from the context of SharePoint 2007

With this web part you can, for example, build a Flash Web Part.
Simply open tool pane and insert this code:

<object id="sgartMovie" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
width="{sp:param1}" height="{sp:param2}" >
<param name="movie" value="{sq:movie}" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed name="sgartMovie" width="{sp:param1}" height="{sp:param2}"
src="{sq:movie}" quality="high" bgcolor="#ffffff"

the url of movie is taken form query string parameter named "movie" ( see tag {sq:movie} ) end width and height is taken from "Parameter 1" and "Parameter 2" accessible in tool pane ( see tag {sp:param1} and {sp:param2} ).

Or a Silverlight web part

<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="200" height="200">
<param name="source" value="{sp:param1}"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="autoUpgrade" value="true" />
<a href="" style="text-decoration:none">
<img src="" alt="Get Microsoft Silverlight" style="border-style:none"/>
<iframe id="slhistoryFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
where Parameter 1 is the url of XAP file

Or you can show a different message if user are logged with secure protocol on not:

<h3 id="secure">?</h3>
<script language="javascript">
var objSecure = document.getElementById("secure");
if ("{s:urlscheme}" == "https") {
objSecure.innerText = "Secure protocol https";
} else{
objSecure.innerText = "Normal protocol http";

Or build a link with the login information:

<a href="http://changepwd.local/{s:userdomain}_{s:userlogin}">Hello <b>{s:username}</b> to change your password click here</a>

and much more

You have 4 shared parameters and 3 user parameters for use in your html.

This is the list of some tags:

{s:id} {s:name} {s:title} {s:description} {s:authenticationmode} {s:lcid} {s:localename} {s:localelcid}
{s:folderurl} {s:folderurlfull} {s:weburl} {s:weburlfull} {s:layoutsurl} {s:layoutsurlfull} {s:siteurl} {s:siteurlfull} {s:urlscheme} {s:zone}
{s:urlhost} {s:clientname} {s:clientip} {s:servername} {s:serverip} {s:osversion}
{s:date} {s:time} {s:datetime}
{s:username} {s:userloginfull} {s:userlogin} {s:userdomain} {s:useremail} {s:issiteadmin} {s:ismemberofgroup:groupname}
{sl:id:documents} {sl:title:documents} {sl:url:documents} {sl:viewschema:documents} {sl:viewschemaurl:documents}
{sp:param1} {sp:param2} {sp:param3} {sp:param4}
{sp:user1} {sp:user2} {sp:user3}

Last edited Oct 22, 2012 at 9:02 PM by sgart, version 12