This project is read-only.

dasControls 1.0

Rating: No reviews yet
Downloads: 25
Released: Sep 30, 2009
Updated: Oct 1, 2009 by jayharris
Dev status: Stable Help Icon

Recommended Download

application, 310K, uploaded Oct 1, 2009 - 25 downloads

Release Notes


dasControls is intended to be a library of custom macros for the dasBlog blogging engine, beginning with content that is driven by custom JavaScript libraries and converting the content and data retrieval into server-side controls. For now, dasControls contains only a Twitter Status macro, but more controls will be added in the coming months.

dasControls TwitterStatus Macro

The TwitterStatus macro uses server-side retrieval of your Twitter data, eliminating all client-side JavaScript calls for your tweets. By placing the Twitter request on the server, the data is also available to any search engines that index your page. Additionally, data is cached on the server, and new updates are retrieved based on the polling interval you specify. When using real-time client-side JavaScript calls, there is a 2-5 second delay for your end-users while the data is retrieved from Twitter; by caching the data on the local server, this delay is eliminated, and the content for each user is delivered from the local cache, lightening the load for the end-user while avoiding an undue burden for high-traffic sites.

Macro Name: TwitterStatus
Macro Syntax: <% TwitterStatus("user name"[, number of tweets[, polling interval]])|dasControls %>

* User Name : String. Your Twitter handle.
* Number of Tweets : {Integer. The number of tweets to retrieve and display. [default: 10]}
* Polling Interval : {Integer. The number of minutes between each Twitter retrieval. [default: 5]}

Relevant CSS:
* TwitterStatusItem : CSS class given to each Tweet, rendered as a DIV.
* TwitterStatusTimestamp : CSS class given to each Tweet's timestamp ("32 minutes ago"), rendered as an inline SPAN within each Tweet element.

Using the Macro within a dasBlog Template

This macro is for use in the dasBlog HomeTemplate. The macro works just like any out-of-the box macro, except that you must also include the alias specified within dasControls entry the web.config (the value of the "macro" attribute). Your twitter handle is required, though you can also optionally include the number of Tweets to pull from Twitter (default: 10) and the number of minutes between each Twitter data request (default: 5). Because everything happens on the server, there is no need to include any of the Twitter JSON JavaScript libraries or HTML markup.

<% TwitterStatus("jayharris", 6, 5)|dasControls %>

Installation and Setup of dasControls

Download dasControls, extract the assembly into your dasBlog 'bin' directory.

Enable Custom Macros within your dasBlog installation, and add the Twitter macro to your list of Custom Macros.
First, ensure that the <newtelligence.DasBlog.Macros> section exists within your web.config:

  <!-- Other Macro Libraries -->

Second, ensure that the Macros Configuration Section is defined in to your web.config <configSections>:
  <!—Other Configuration Sections -->
  <section requirePermission="false" name="newtelligence.DasBlog.Macros"  
    type="newtelligence.DasBlog.Web.Core.MacroSectionHandler, newtelligence.DasBlog.Web.Core" />

Third, add the dasControls library entry to the dasBlog Macros section:
  <add macro="dasControls"

Roadmap for dasControls

In the upcoming weeks and months, I plan on adding additional macros to the dasControls library, including Delicious, Google Reader's Shared Items, and Facebook. If you're interested in any others, or have any ideas, please let me know.

Reviews for this release

No reviews yet for this release.