Spuds Defined
You’ve probably heard of widgets, also known as gadgets or docklets. “Spuds” are specialized Trumba® Connect widgets.
We chose the term “spud” somewhat facetiously as a play on the concept of “mashups.” A mashup is a web page that brings together content from more than one source. The IT world borrowed the term “mashup” from from a hip-hop music practice of mixing two or more songs together to create a new song.
A spud is actually a small piece of JavaScript™ code that retrieves event information stored on the Trumba servers. To display event information on your website, you copy and paste the spud code into your web pages (to create your own mashups).
Spuds embedded into your web pages act like windows. What you see through the windows is your event information on the Trumba servers. The exact view depends upon the specific spud that you’re using. Because spuds are windows into your hosted data, changes you make in the Trumba Connect editing environment show up immediately on your site.
Create and Paste a Spud: A Walk Through the Process
To help clarify the power and flexibility of spuds, let’s walk through the process of creating and embedding a spud using the Trumba University (Trumba U) Alumni calendar as an example. The steps refer to the picture on the right.
Step 1
In the Trumba Connect editing environment, we create the Alumni calendar. We add events and customize the way the calendar looks and behaves. Trumba Connect creates a spud for the calendar and provides us with the spud’s JavaScript code.
Step 2
As we create and customize our Alumni calendar, all of our event and settings data is stored on the Trumba servers. The spud code that Trumba Connect provides will act as a bridge between those servers and our web page.
Step 3
In the Trumba Connect editing environment, we copy the JavaScript code for the Alumni calendar spud. Then we paste that code into the code for the Alumni page on the Trumba U website.
Step 4
Visitors to the Alumni page view and interact with the calendar. They always see the latest information. When we add or update events, those events are saved to the Trumba servers and immediately passed to the calendar spud on the website.
See for Yourself How Spuds Work: Try It On Your Own Webpage
To see this spud in action on your own web page, take the following steps:
- Copy the code on the right.
- Open an HTML, text editing, or word processing program.
If you use Microsoft® Windows operating system, you can open Notepad. If you use Mac OS®, open TextEdit or a word processing program.
- If you're using TextEdit or a word processing program, immediately save or format the file in plain text (.txt) format.
- Paste the code into the program window.
- Save the file (again) and close the program.
- If the file doesn’t have an .htm or .html extension, rename it so it does. For example, you might name the file trumbaspud.html.
- Open a Web browser and drag the file you just created into the browser window.
Copy this code for the Trumba U Alumni calendar spud.
<html><head><title></title></head><body>
<div style="width:600px; padding:24px 25px; border:2px solid #516B92; margin-bottom:20px;">
<script type="text/javascript" src="http://www.trumba.com/scripts/spuds.js"></script>
<script type="text/javascript">
$Trumba.addSpud(
{ webName: "trumbaualumni",
spudType: "main"});
</script></div></body></html>
Tip
If you get a message that the content is blocked or your browser can’t run scripts, you may have to allow blocked content or enable JavaScript in your browser’s settings.