<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aaron&#039;s SharePoint Blog</title>
	<atom:link href="http://vspug.com/truthdetector/feed/" rel="self" type="application/rss+xml" />
	<link>http://vspug.com/truthdetector</link>
	<description>Just another VSPUG - Virtual SharePoint User Group weblog</description>
	<lastBuildDate>Tue, 17 Jul 2007 12:10:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Acronym Dictionary with Dynamic Search Tool</title>
		<link>http://vspug.com/truthdetector/2007/07/17/acronym-dictionary-with-dynamic-search-tool/</link>
		<comments>http://vspug.com/truthdetector/2007/07/17/acronym-dictionary-with-dynamic-search-tool/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 12:10:00 +0000</pubDate>
		<dc:creator>aaronh</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[A common irritation in business these days is the deluge of acronyms.&#160; The meanings for most are easily found with a quick google search, but many are company-specific.&#160; It has been requested of me for a long time to create an acronym dictionary, but unfortunately it&#39;s one of those low-priority requests that never gets any [...]]]></description>
			<content:encoded><![CDATA[<p>A common irritation in business these days is the deluge of acronyms.&nbsp; The meanings for most are easily found with a quick google search, but many are company-specific.&nbsp; It has been requested of me for a long time to create an acronym dictionary, but unfortunately it&#39;s one of those low-priority requests that never gets any attention.&nbsp; Until, that is, I realized that this could easily be solved with a SharePoint List and AJAX in a CEWP.</p>
<p>Storing the acronyms in a SharePoint list was always in the back of my mind, but making it easy for users to find them is the hard part with out-of-the-box SharePoint functionality.&nbsp; So I created some HTML/JS code that queries the &quot;lists&quot; web service and displays matches dynamically as the user types.</p>
<h2>What it is</h2>
<p><strong><em>Custom List</em></strong><br />Create a&nbsp;custom list with the following columns:</p>
<ul>
<li>
<div>Acronym &#8211; Signle line of text &#8211; Required</div>
</li>
<li>
<div>Meaning &#8211; Single line of text &#8211; Required</div>
</li>
<li>
<div>Definition &#8211; Multiple lines of text &#8211; Not required</div>
</li>
<li>
<div>Company Specific &#8211; Yes/No</div>
</li>
<li>
<div>Citation &#8211; Multiple lines of text &#8211; Required</div>
</li>
<li>
<div>Begins With &#8211; Calculated (grabs the first letter in the acronym; used in the default view to group by first letter)</div>
</li>
</ul>
<p>The list will need the following views:</p>
<ul>
<li>
<div>All Items (default view) (All columns grouped by &quot;Begins With&quot;)</div>
</li>
<li>
<div>Web Service View 1 (Displays only Acronym, Meaning, Company Specific)</div>
</li>
<li>
<div>Web Service View 2 (Displays Acronym, Meaning, Definition, Company Specific, Citation; item limit set to 1)</div>
</li>
</ul>
<p><strong><em>HTML Page</em></strong><br />An HTML page contains a text box that when typed into, displays matches by querying the web service (Web Service View 1).&nbsp; Then, within the results, a user can click the Meaning of the acronym to display a window containing the definition and citation.</p>
<h2>Implement it</h2>
<ol>
<li>
<div>Unzip the file attached to this post.</div>
</li>
<li>
<div>If you&nbsp;are using SharePoint Portal 2003, it may make sense to create a dedicated area for this solution so you can control who has permission to manage the content in the list.</div>
</li>
<li>
<div>Go to <a href="http://[your_site]/_catalogs/lt/Forms/AllItems.aspx">http://[YOUR_SITE]/_catalogs/lt/Forms/AllItems.aspx</a>&nbsp;and upload the list template (Acronym Dictionary.stp) into the List Templates Gallery.</div>
</li>
<li>
<div>Create the list from the new template.</div>
</li>
<li>
<div>Edit the following&nbsp;JavaScript variables in AcronymViewer.htm (in the attached ZIP)</div>
<ol>
<li>1</li>
<li>2</li>
</ol>
</li>
<li>
<div>Add AcronymViewer.html to a Document Library within the area.</div>
</li>
<li>
<div>Paste the URL of the HTML page into the Content Link box in a CEWP.</div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/truthdetector/2007/07/17/acronym-dictionary-with-dynamic-search-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of Lists using CEWP, WS, JS</title>
		<link>http://vspug.com/truthdetector/2007/07/16/list-list/</link>
		<comments>http://vspug.com/truthdetector/2007/07/16/list-list/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 12:29:00 +0000</pubDate>
		<dc:creator>aaronh</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[When I first started playing with Portal Server a couple of years ago, my experience was only with WSS.&#160; One thing that bugged me about Portal was the fact that there was no &#34;easy&#34; way to display links of all the lists in an area to the users without creating another list just for links.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started playing with Portal Server a couple of years ago, my experience was only with WSS.&nbsp; One thing that bugged me about Portal was the fact that there was no &quot;easy&quot; way to display links of all the lists in an area to the users without creating another list just for links.&nbsp; This is because the standard user permissions we had set up didn&#39;t allow them to see the &quot;Manage Content&quot; link.</p>
<p>An easy way I&#39;ve found to create links to an area is by using HTML/JavaScript in a CEWP and querying the SharePoint Web Service.</p>
<p><strong><em>Paste the following code into a Content Editor Web Part (in SharePoint Portal 2003) and it will show you all of the lists in the area (the DWP is also attached to this post).</em></strong></p>
<p><span style="FONT-SIZE:10px;"></p>
<div style="BORDER-RIGHT:black 1px solid;BORDER-TOP:black 1px solid;BORDER-LEFT:black 1px solid;BORDER-BOTTOM:black 1px solid;BACKGROUND-COLOR:#efefef;">
<pre>&lt;span id=ListList&gt;&amp;nbsp;&lt;/span&gt;

&lt;script language=javascript&gt;

//Lists in area
//Uses SharePoint Web Service API to retrive list of lists in current area
//Author: Aaron Haydo, ashaydo@gmail.com
//Date creaed: 6-JUL-2007

getListList();

function getListList() {

  var txt = document.getElementById(&quot;ListList&quot;);

  //Build SharePoint Web Service URL based on current location
  var wsURL;
  wsURL = window.location.protocol+&quot;//&quot;;
  wsURL += window.location.host;
  var path = window.location.pathname.split(&quot;/&quot;);
  path.pop();
  var x;
  for (x in path) {
    wsURL += path[x] + &quot;/&quot;;
  }
  wsURL += &quot;_vti_bin/lists.asmx&quot;;

  //SOAP Action and XML
  var wsSoapAction = &quot;http://schemas.microsoft.com/sharepoint/soap/GetListCollection&quot;;
  var wsXML = &#39;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&#39;;
  wsXML += &#39;&lt;soap:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; &#39;;
  wsXML += &#39;xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; &#39;;
  wsXML += &#39;xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&#39;;
  wsXML += &#39;&lt;soap:Body&gt;&#39;;
  wsXML += &#39;&lt;GetListCollection xmlns=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; /&gt;&#39;;
  wsXML += &#39;&lt;/soap:Body&gt;&#39;;
  wsXML += &#39;&lt;/soap:Envelope&gt;&#39;;

  //Create XML Document and get HTTP response using XMLHTTP object
  var xmlDoc = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);
  var httpResponse = getServiceResults(wsURL, wsSoapAction, wsXML);

  //If getServiceResults returns a 404, then it&#39;s probably because the
  //page is being launched from a document library instead of a web part
  if (parseInt(httpResponse) == 404) {
    txt.innerHTML = &quot;&lt;p&gt;This code can only be executed from a web part.&lt;/p&gt;&quot;;
    return;
  }
  else {
    xmlDoc.loadXML(httpResponse);
  }

  //Get results into collection
  listitems = xmlDoc.getElementsByTagName(&quot;List&quot;);

  //Loop through results and build table rows
  var output = &quot;&quot;;
  for (var x = 0; x &lt; listitems.length; x++) {
    output += &quot;&lt;tr title=&#39;&quot;;
    output += listitems(x).getAttributeNode(&quot;Description&quot;).text.replace(/&#39;/g,&quot;`&quot;);
    output += &quot;&#39;&gt;&quot;;
    output += &quot;&lt;td class=&#39;ms-vb-icon&#39; valign=&#39;top&#39;&gt;&quot;;
    output += &quot;&lt;a href=&#39;&quot; + listitems(x).getAttributeNode(&quot;DefaultViewUrl&quot;).text + &quot;&#39;&gt;&quot;;
    output += &quot;&lt;img src=&#39;&quot;;
    output += listitems(x).getAttributeNode(&quot;ImageUrl&quot;).text;
    output += &quot;&#39; border=0 hspace=5 alt=&#39;Icon&#39;&gt;&quot;;
    output += &quot;&lt;/a&gt;&quot;;
    output += &quot;&lt;/td&gt;&quot;;
    output += &quot;&lt;td class=&#39;ms-vb2&#39; valign=&#39;top&#39;&gt;&quot;;
    output += &quot;&lt;a href=&#39;&quot; + listitems(x).getAttributeNode(&quot;DefaultViewUrl&quot;).text + &quot;&#39;&gt;&quot;;
    output += listitems(x).getAttributeNode(&quot;Title&quot;).text;
    output += &quot;&lt;/a&gt;&quot;;
    output += &quot; (&quot; + listitems(x).getAttributeNode(&quot;ItemCount&quot;).text + &quot;)&quot;;
    output += &quot;&lt;/td&gt;&quot;;
    output += &quot;&lt;/tr&gt;&quot;;
  }

  //Display table
  var table = &quot;&quot;;
  table = &quot;&lt;table border=&#39;0&#39; width=&#39;100%&#39; cellpadding=&#39;2&#39; &quot;;
  table += &quot;cellspacing=&#39;0&#39; class=&#39;ms-summarystandardbody&#39; rules=&#39;rows&#39;&gt;&quot; ;
  table += output;
  table += &quot;&lt;/table&gt;&quot;;
  txt.innerHTML = table;
}

function getServiceResults(url, soap, xml) {
  //Send XML packet to web service and return HTTP response text
  try {
    if (xml.length &gt; 0) {
      xmlHttp = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);
      xmlHttp.open(&quot;POST&quot;, url, false);
      xmlHttp.setRequestHeader(&quot;SOAPAction&quot;, soap);
      xmlHttp.setRequestHeader(&quot;Content-Type&quot;, &quot;text/xml&quot;);
      xmlHttp.send(xml);
      if (parseInt(xmlHttp.status) == 404) {
        return 404;
      }
      else {
        return xmlHttp.responseText;
      }
    }
  }
  catch(e) {
    alert(e.message);
  }
}
&lt;/script&gt;</pre>
</div>
<p></span></p>
<p>Here is what the Web Part looks like:</p>
<p><img title="List of Lists" style="WIDTH:317px;HEIGHT:91px;" height="91" alt="List of Lists" src="/photos/truthdetector/images/3093/original.aspx" width="317" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/truthdetector/2007/07/16/list-list/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Content Editor Web Part (CEWP), XML Web Services and JavaScript</title>
		<link>http://vspug.com/truthdetector/2007/07/15/content-editor-web-part-cewp-and-xml-web-services/</link>
		<comments>http://vspug.com/truthdetector/2007/07/15/content-editor-web-part-cewp-and-xml-web-services/#comments</comments>
		<pubDate>Sun, 15 Jul 2007 19:48:00 +0000</pubDate>
		<dc:creator>aaronh</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[As my first blog post, I&#39;ll discuss at a high level three things that I feel are the most powerful tools available to SharePoint admins who have some (client-side) development skills.&#160; The Content Editor Web Part, XML Web Services and JavaScript.&#160; Subsequent posts will describe real-life examples of how this has helped&#160;in the SharePoint implementation [...]]]></description>
			<content:encoded><![CDATA[<p>As my first blog post, I&#39;ll discuss at a high level three things that I feel are the most powerful tools available to SharePoint admins who have some (client-side) development skills.&nbsp; The Content Editor Web Part, XML Web Services and JavaScript.&nbsp; Subsequent posts will describe real-life examples of how this has helped&nbsp;in the SharePoint implementation that I&nbsp;manage.</p>
<p><strong>Content Editor Web Part (CEWP)<br /></strong>The most flexible and powerful web part that comes with every SharePoint implementation is the CEWP.&nbsp; To give credit where credit is due for this opinion, the person/blog that opened my eyes to the power of the Content Editor Web Part is <a title="Goto Todd Bleeker&#39;s 12 Hive" href="http://mindsharpblogs.com/todd/">Todd Bleeker&#39;s 12 Hive</a> where there are several examples of how it can be used.&nbsp; After spending a few minutes reading these posts, I took the next several weeks worth of &quot;free time&quot; and created some very useful web parts without having to compile any code.</p>
<p><strong>XML Web Services</strong><br />Everyone knows the power of publishing and consuming data via XML over HTTP whether it be XML RPC or full-blown web service.&nbsp; We also know that significant power lies within the SharePoint web service API.&nbsp; The problem that I&#39;ve always had with the SPWSAPI&nbsp;however, was the lack of useful documentation from Microsoft regarding how to actually interact with it.&nbsp; Being inspired by Todd&#39;s CEWP stuff, I subsequently took the time to dig a little deeper into the SharePoint web services and have been able to create some pretty useful stuff.</p>
<p><strong>JavaScript<br /></strong>JavaScript is what makes the CEWP and Web Services useful together.&nbsp; Posting back with the XMLHTTP object via JavaScript allows you to talk to anything (not just XML) over HTTP, parse it and then present it to the user.</p>
<p>&nbsp;-Aaron </p>
]]></content:encoded>
			<wfw:commentRss>http://vspug.com/truthdetector/2007/07/15/content-editor-web-part-cewp-and-xml-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
