Gadgets Directory

Blackbaud Internet Solutions is pleased to introduce a simple toolkit that will enable partners and clients to develop their own gadgets.  We'll start with a simple example, and create a gadget for a Custom FAF (CFAF) site by re-using Blackbaud Internet Solutions existing gadget code.


Example 1: Re-Use Existing Honor Roll Gadget for Custom FAF

You will need to modify Blackbaud Internet Solutions' existing gadget code to work for your CFAF, and you will need to make the code available within your CFAF for participants to copy into their social networking tool of choice. In the below example we will simply re-tool the Honor Roll Gadget for CFAF use.

To begin with, you will need to find the Event ID for your CFAF. The Event ID for your CFAF can be found directly within Sphere®. When managing the configuration of your CFAF within Sphere, simply look at the URL. The last number of the URL is the Event ID (59919 in the example below):

https://www.kintera.com/kintera_sphere/events/cfaf/summary.aspx?event_id=59919

Next, you will need to paste your Event ID into the gadget code below. Make sure to input your Event ID where you see the XXXX below (this code was taken from an existing FAF site and is the same code that a participant would copy and paste into their social networking page).

<embed src="http://www.kintera.org/gadgets/honorroll.swf"quality="high" bgcolor="ffffff"
width="220" height="220" name="flashhonorroll" align="center" allowScriptAccess="sameDomain"
type="application/x-shockwaveflash"pluginspace="http://www.macromedia.com/go/getflashplayer"flashvars="
datapath=http://kintera.org/gadgets&
curr=$&honorcolor=0xffff99&honortile=-Insert Event Name Here&supid=&eid=XXXX&tid=0"/></br /><a href="http://www.kintera.org/faf/donorreg/donorpledge.asp?ievent=XXXX&supID="style=color:#ffffff,background-color:#ffff99;width:220;text-align:center;font-family:arial;font-weight:bolder;text-decoration:none"target=_blank">Click Here to Donate</a>2

 


Example 2 – Thermometer Gadget API

The path to the Thermometer Gadget API is:

http://www.kintera.org/gadgets/data/thermometer.aspx?sid=XXX&eid=YYY&tid=ZZZ

sid: supporter id
eid: event id
tid: team id (if applicable)

This service does not return xml. It returns a simple text string, for example:

moneyraised=250.00&mygoal=1000&err_msg=optional message
(If a supporter has currently raised $250, and their goal is $1,000)


moneyraised: the current amount the participant has raised
mygoal: the participants current goal
err_msg: is only returned if there is an error or no records are found. Typically if an error message is returned, you would not use the moneyraised or mygoal returned.

This text string can simply be parsed to provide values to a new gadget. To return the goal and money raised for a team, simply pass “0” as the sid, and the appropriate tid.


Example 3 – Honor Roll Gadget API

http://www.kintera.org/gadgets/data/honorroll.aspx?sid=XXX&eid=YYY&tid=ZZZ

sid: supporter id
eid: event id
tid: team id (if applicable)

The data returned is in an xml format:
<honorroll>
     <honoritem>
          <amount>XX</amount>
          <namefrom>From Anonymous</from>
          <nameto>NAME</nameto>
          <scrolltypeid>2</scrolltypeid>
          <honorrolltype>s</honorrolltype>
     </honoritem>
     <honoritem>...</honoritem>
</honorroll>

Honorroll: parent tag wraps all items
Honoritem: tag wraps specific item
Amount: part of an honoritem; donation dollar amount
Namefrom: part of an honoritem; who made the donation
Nameto: part of an honoritem; who the donation is dedicated to
Scrolltypeid: part of an honoritem; whether the donation total should be shown; 1=yes, 2=no
Honorrolltype: part of an honoritem; the type of item; s=supporter,t=team


Example 4 – Retrieving sid and tid programmatically

Now that you have developed your custom gadget and it is already to go, where should you “host” your gadget code to dynamically populate the sid and tid (that your gadget consumes) so it is specific to each fundraiser?

Great question! There are two Web tools (Edit Personal Page and Edit Team Page) within Sphere e-Marketing that will allow you to merge the sid and tid into content items. Once a supporter logs in and views this page, the sid and tid will automatically be merged into the content by Sphere e-Marketing. Developers can use JavaScript to hide these merge fields and parse their results into custom gadgets that have been created.

 


Example 5 – Retrieving other Supporter Data for Further Customization

It is worth noting that developers can utilize a similar methodology to retrieve other types of data about a supporter for incorporation into a gadget. For example, a supporter might want to personalize their fundraising campaign with their own name. As a developer, you could create a custom profile field called “Campaign Name” through Blackbaud Internet Solutions' user interface. Then use merge fields to merge this field into the “Insert Event Name Here” area within Example 1. The final code would look like this:

 

<embed src="http://www.kintera.org/gadgets/honorroll.swf"quality="high"
bgcolor="#ffffff" width="220" height="220" name="flashhonorroll" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"pluginspage="http://www.macromedia.com/go/getflashplayer"flashvars=
datapath=http://www.kintera.org/
gadgets&curr=$&supid=&eid=XXXXX&tid=0"/><br /><a href="http://www.kintera.org/faf/donorreg/donorpledge.asp?ievent=XXXX&supId="style="color:#ffffff;background-color#ffff99;width:220;text-align:center;font-family:arial;font-weight:bolder;text-decoration:none"target=_blank">Click Here to Donate</a>