5/15/2013

Adding a scrolling list of messages to SharePoint

 

Tested in SP2010, SP2013, Office 365 2013 and should work in SP2007.

I have not offered up a cool SharePoint trick for a while… so here's one that takes a list and turns it into a scrolling "marquee" list like this one:

Release B.2 of the CRM system has been released!

Bugs have been found in B.2, please revert to B.1!

The "Dealing with procrastination" meeting has been rescheduled

Get Started with Microsoft SharePoint Foundation!

This uses the <MARQUEE> tag that may not work in every browser. But according to this page it works in at least these browsers: Chrome 1+, Firefox 7+, Internet Explorer 2, Opera 6+ and Safari 1+.

The code to do this was copied from one of my older tricks "SharePoint: Convert a Links list to a Dropdown list" with only two updates: change the dropdown list to a MARQUEE and to delay load the code so it will also work in SharePoint 2013.

The example below uses an Announcements list, but should work with any list as long as the view displays the "Title (linked to item with edit menu)" column.

How to get the ID of the web part…

The web part's ID has a name something like WebPartWPQ3. To find it:

  1. Use the browser's View, View Source or View Page Source option to display the HTML of the page
  2. Search for a slash followed by the name of the web part:  "/Announcements"
  3. Either read down from what you found looking for something like 'id="WebPartWPQ3"' (the number may be different)  Note: you are not looking for WebPartTitleWPQ3 or other similar names!
  4. Copy everything inside of the quotes, including any extra spaces or periods! Note that 2010 will include the list's name and the list's description while 2007 will only have the list's name.
      summary="Announcements Use this list to track upcoming events, status updates or other team news."

Steps:

  1. Create your Announcements list and add your announcements
  2. Add the announcement list’s web part to the page
  3. Find the name of the web part (see "How to get the ID of the web part" above)
  4. Create a Notepad file:
    1. Copy and paste the JavaScript code from below
    2. Edit the JavaScript to change the line with var LinkList = document.getElementById("WebPartWPQ5") and change "WebPartWPQ5" to your web part name found in step 3 above
    3. Customize the <marquee> tag to set any desired options (see: http://msdn.microsoft.com/en-us/library/aa259539(v=VS.60).aspx)
  5. Upload the Notepad file to a library ("Site Assets" is a good choice)
  6. Right-click the newly uploaded file and select Copy Shortcut (to get the URL to the file)
  7. Add a Content Editor Web Part (CEWP) to the page with the announcements web part, just under the announcements web part
  8. Modify the CEWP and
    1. set its title to whatever you like ("Site News!") (or set its Chrome to none to hide the title)
    2. paste the URL you copied in step 6 into the Content List box
    3. Click OK
  9. Save the page and test it!

Notes:

  • You can customize the <marquee> tag by changing its attributes or wrap it other HTML such as a DIV with a border or background.
  • <marquee> may not work in every browser, but will fall back to list a list of links if it is not supported.
  • There are four lines that start with "MyMarquee.innerHTML", but only one of them is not commented out ("//"). You can uncomment any one of these:
    • text only
    • text with hyperlinks
    • text with hyperlinks that open in a new window
    • text with hyperlinks that open in a SP 2010 style dialog box

 

The Code:

<!-- the MARQUEE tag for the items -->
<!-- customize as needed! –>
<marquee id="TTN_marquee" direction="up" height=48 scrollamount="1"></marquee>


<script type="text/javascript">
// CEWP trick from techtrainingnotes.blogspot.com! 
// http://techtrainingnotes.blogspot.com/2013/05/adding-scrolling-list-of-messages-to.html

// Change the web part name here!!! 
var TTNLinkListName = "WebPartWPQ3";



function TTNgetSPversion()
{  // returns 12 for 2007, 14 for 2010 and 15 for 2013
  var SPversion = "12"; 
  try { SPversion = SP.ClientSchemaVersions.currentVersion.substring(0,2) } 
  catch (e) {}
  return SPversion;
}

function TTNinEditMode()
{
    var editmode="";
    // test for wiki page mode
    try { editmode = document.getElementById("_wikiPageMode").value } 
    catch (e) {}
    if (editmode=="")
    {
      // test for web part page mode
      try { editmode=document.getElementById("MSOSPWebPartManager_DisplayModeName").value } 
      catch (e) {}
    }
    if (editmode=="Edit" || editmode=="Design")
      return true;
    else
      return false;
}

function TTNlist2marquee()
{
  var TTNLinkList = document.getElementById(TTNLinkListName);
  var spVersion = TTNgetSPversion();
  var editmode = TTNinEditMode();

  // hide the list, but only if not in edit mode
  if (TTNLinkList)
  {

    // are we in edit mode?
    var displaymode = "";
    if ( !editmode )
    {
       displaymode = "none";
    }

    // hide the list web part (based on SP version)
    if ( spVersion = 12 ) 
    {
      // 2007 code here
      TTNLinkList.parentNode.parentNode.parentNode.style.display=displaymode;
    }
    else
    {
      // 2010 and 2013 code here
      TTNLinkList.style.display=displaymode;
    }  

    
    //Copy all of the links from the list to the MARQUEE
    var MyMarquee = document.getElementById("TTN_marquee");

    var links = TTNLinkList.getElementsByTagName("A"); // find all of the links
    for ( i=0; i<links.length; i++ ) 
    {
      if (links[i].onfocus)
      {
        if (links[i].onfocus.toString().indexOf("OnLink(this)") > -1)
          { 
            // text only version of the marquee (no links)
            //MyMarquee.innerHTML += links[i].innerHTML + "<br>"; 

            // version with hyperlinks
            MyMarquee.innerHTML += "<a href='" + links[i].href + "'>" + links[i].innerHTML + "</a><br><br>";

            // open the link in a new window
            //MyMarquee.innerHTML += "<a href='" + links[i].href + "' target='newwin'>" + links[i].innerHTML + "</a><br><br>";

            // open the link in a SP 2010 dialog box
            //MyMarquee.innerHTML += "<a href='JavaScript:var options=SP.UI.$create_DialogOptions();options.url=\"" + links[i].href + "&IsDlg=1\";options.height = 400;void(SP.UI.ModalDialog.showModalDialog(options))'>" + links[i].innerHTML + "</a><br><br>";

          }
      }
    }
  }
  else
  {
    alert("Marquee list named '" + TTNLinkListName + "' not found");
  }

}

try {
  // for 2010 and 2013
  ExecuteOrDelayUntilScriptLoaded( TTNlist2marquee, "sp.js" );
}
catch (e) {
  // for 2007
  _spBodyOnLoadFunctionNames.push('TTNlist2marquee');
}

</script>
 
 
.

5/06/2013

So you want to be a SharePoint Developer…

 

In a recent class we started putting together a list of what you need to know to be a well rounded SharePoint developer. The list very quickly got out of hand… but everything in it is required to for some aspect of SharePoint development. You don't need to know all of this if you are focusing on just a part of SharePoint, but not knowing these technologies may result in reinventing the wheel or the creation of things in SharePoint that don't feel like they belong there.

Some of the technologies you will need to know:

  • General web technologies
    • HTML
    • HTML5 (starting with SP 2013)
    • Cascading Style Sheets (CSS)
    • DHTML and working with the DOM
    • XML and XSLT (added by JR!)
    • JavaScript and jQuery
    • Browsers and browser limitations (and how to code around them)
    • web security
  • Microsoft web and development technologies
    • ASP.Net (pretty much everything!)
    • C# and / or Visual Basic .Net
    • AJAX
    • Silverlight (for SP 2010)
    • LINQ
    • ASP.Net 2.0 web parts
    • ASP User Controls
    • Visual Studio
  • General development skills
    • Object oriented development
    • Event driven development
    • Project management
  • SQL Server and SQL querying
  • Web Services in their various flavors
    • .Net 2.0 style SOAP web services
    • Microsoft WCF
    • RESTful services
  • Workflow
    • .NET 3.5 workflow and for 2013, .NET 4.0 workflow
    • Visual Studio workflow development
    • SharePoint Designer declarative workflow development
  • SharePoint
    • End user and site owner skills
    • SharePoint site security
    • SharePoint code related security
    • Event receivers
    • CAML XML and everything it is used with
      • site templates
      • list templates
      • features
      • content types
      • views
      • and much more
    • SharePoint editions and licensing
    • The SharePoint object model and API
    • The SharePoint Client Side Object Model (CSOM)
    • The SharePoint web services
    • The SharePoint architecture
    • SharePoint code deployment options
    • SharePoint web parts
      • connected web parts
      • web part properties panels
    • SharePoint services (knowing what's there and creating new services)
    • Metadata and the metadata API
    • External data connectivity (BCS)
    • Search
      • The Search API
      • iFilter development
  • And for SharePoint 2013
    • SharePoint "app" development
    • writing Azure hosted applications
  • InfoPath
    • General forms development
    • Customizing SharePoint list forms
    • Creating and integrating workflow forms
  • Best practices
    • Web
    • SharePoint
    • JavaScript
    • SQL
    • Web services
    • Documentation
    • Project management
    • Performance testing
    • Testing and deployment
    • Your organization's best practices and SharePoint Governance Plans
  • Tools and resources
  • Also very useful…
    • Microsoft Office development skills
    • PowerShell
    • Visio
    • Mobile Web App Design

Did I miss anything? Post a comment and I will add it to the list.

 

SharePoint Training

As I am a Microsoft Certified Trainer (MCT)I would be remiss if I did not list some of the training resources available through MAX Technical Training! If it's about SharePoint and SharePoint development, MAX has it!

 

SharePoint Certification

These classes are aligned with the Microsoft certifications for SharePoint development:

4/14/2013

SharePoint Cincy 2013 is this week!

 

Don't forget… SharePoint Cincy 2013 is coming soon! April 19th (That's this Friday!)

Third Annual SharePoint Cincy Event!

Register NOW!  http://www.sharepointcincy.com/

 

SP-speaker-image

I've been asked to bring back my SharePoint Governance presentation, "SharePoint Governance… It May Not Be What You Think It Is…". I've updated it to include SharePoint 2013 and Office 365. Governance was a big topic, its gotten bigger! (and still only an hour allotted!)

 

Choose From Multiple Tracks:

This conference promises to have something for every level of your organization and every IT professional who has an interest in SharePoint. Here's this years tracks:

  • Driving Business Value with SharePoint
  • Application Development in SharePoint
  • SharePoint Implementation and Administration
  • Business Intelligence and Data Management
  • Site Owners, Content Managers & Power Users
  • Bonus Track: Exploring What's New With SharePoint 2013

 

The tracks:

Track 1: Driving Business Value With SharePoint

Subject: Converting an Email Culture into a SharePoint Culture
Presenter: Robert Bogue – President, Thor Projects, LLC and SharePoint MVP
 
Subject: SharePoint: Driving Business Value Through Data Centralization
Presenter: Adam Solzmon – PCMS Datafit, SharePoint Practice Leader

Subject: How to Manage Business 'Transformation' Using SharePoint as the Engine
Presenter: Rich Kurz – Ascendum, General Manager, Solutions


Track 2: Application Development in SharePoint

Subject:  Updating Your Developer’s Skill Set for the New App Model
Presenter: Sean McDonough – Bitstream Foundry - Owner
 
Subject: F5 Tornado – A Whirlwind Introduction to SharePoint 2010 Development
Presenter: Patrick Tucker – Strategic Data Solutions, Principal Consultant SharePoint

Subject: Unleashing the Power of the Content Query Web Part
Presenter: Peter Serzo – High Monkey Consulting, SharePoint Practice Architect

Subject: Claims Based Authentication and SharePoint
Presenter: Justin Kobel – KiZAN Technologies, Principal SharePoint Consultant
 

Track 3: SharePoint Implementation and Administration

Subject: SharePoint 2013 Administration
Presenter: Tom Resing - SharePoint911/Rackspace, Consultant SharePoint MVP

Subject: Managed Metadata A to Z – Plan, Implement, Make it a Success!
Presenters: Stacy Deere-Strole – Focal Point Solutions, CEO, Stephanie Donohue – Focal Point Solutions, SharePoint Solutions Architect
 
Subject:Advanced SharePoint Troubleshooting
Presenter: Clint Richardson – Applied Information Sciences, Infrastructure Consultant

Subject: Integrating SharePoint with Office Web Apps (WAC) Server
Presenter: Brian Jackett – Microsoft, Premier Field Engineer - SharePoint


Track 4: Business Intelligence and Data Management

Subject: SharePoint BI – A Parable of Choices and Choosing Wisely
Presenter: Peter Serzo – High Monkey Consulting, SharePoint Practice Architect
 
Subject: Managing Your Business With Dashboards and Disparate Sources
Presenter: Chris Murphy – Ascendum, SharePoint/BI Solutions Delivery Manager

Subject: Integrate External Data with Business Connectivity Services
Presenter: Tom Resing - Rackspace, SharePoint MCM and MVP

Subject: Now I Have SharePoint. Where's the BI?
Presenters: Jim Klosterman – PCMS Datafit, Senior Consultant, Harold Loyd – PCMS Datafit, Senior Consultant


Track 5: Site Owners, Content Managers, & Power Users

Subject: The Secret Sauce for Building Sophisticated Applications as an End-User with SharePoint
Presenter: Bill Crider – Sogeti, Senior Manager

Subject: Lists: Used, Abused and Underappreciated
Presenter: Wes Preston–TrecStone, LLC, Owner/Principal Consultant and SharePoint MVP
 
Subject: Branding In SharePoint 2013
Presenters: Matthew Tallman – Cardinal Solutions, Principal Consultant David M. Ginn – Cardinal Solutions, Principal Consultant

Subject: ECM on SharePoint - 13 Ways to Make it Rock!
Presenter: Jeremy Minich – KnowledgeLake, Systems Engineer
 

Bonus Track: Exploring What's New With SharePoint 2013

Subject: Where is SharePoint Headed and Why Should You Care? (a panel discussion)
Potential Panelists: Sean McDonough, Wes Preston, Shane Young...
 
Subject: Build Your SharePoint 2013 Lab in the Cloud with Azure… for FREE!
Presenter: Keith Mayer – Microsoft, Senior Technical Evangelist

Subject: Re-Introduction to Workflow
Presenter: Robert Bogue – President, Thor Projects, LLC and SharePoint MVP
 
Subject: Combining your BI collateral with PerformancePoint Services - A Working Session
Presenter: Tavis Lovell – SharePoint 911/Rackspace, Senior SharePoint Consultant


 

Who should attend?

  • Application/Software Developers
  • Information Architects
  • SharePoint Administrators
  • IT Business Leaders
  • Knowledge Workers
  • IT Professionals

3/22/2013

SharePoint: Change the Default for "Use my local drafts folder"

 

If you don't know what the "local drafts folder" is, then read this first: http://techtrainingnotes.blogspot.com/2012/12/sharepoint-use-my-local-drafts-folder.html

In SharePoint 2007 the "Use my local drafts folder" checkbox was checked by default. In SharePoint 2010 and 2013 it is not checked by default. Turns out that this is an Office default and not a SharePoint default and can be changed from the Options screen of Word or Excel. (I think there is also a way to change the default using JavaScript from the master page, but so far I'm missing some obvious step…)

[image%255B16%255D.png]

Steps for Office 2007, 2010 and 2013

Each user can set their preference by going to an Office application such as Word, Excel, PowerPoint or Outlook and:
- Click the Office Button
- Click Options (Word Options in 2007)
- Set "Save checked-out files to" to "The server drafts location on this computer"
- Click Save

With this option:

image

you get:

image

 

And with this option:

image
Note: the "Server drafts location" option is used when the "The server drafts location on this computer" option is selected. (Looks backwards!)

you get:

image

References:

http://office.microsoft.com/en-us/powerpoint-help/change-where-you-work-on-files-that-you-check-out-from-a-sharepoint-library-HA010208583.aspx

 

Notes:

  • This setting is stored in the registry and could be set using Group Policy
    HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Options\UseLocalDrafts
  • There have been reported issues when the drafts folder path points to a network share, at least in Office 2007.
  • Every day I learn something new about this thing called SharePoint that I should have known a long time ago…


.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.