Recent Member Activity now in Sueetie User Profiles

Sueetie User Profiles have a new panel to display members recent forum message and blog comment activity.  It continues a theme of using JQuery with the Ajax Script Manager to retrieve JSON data with WCF, caching as cache can along the way.  Here’s my Sueetie Member Profile page for a working Recent Activity demo.

 

 

A few items are worthy of discussion on the Service method below.  First, we’re moving toward querying by ApplicationID rather than by GroupID, as sites with multiple top-level blogs need this level of isolation.  GroupID of -1 defaults to an ApplicationID query.  Top Level site GroupID is 0, with each blog assigned its own ApplicationID. In the ForumMessage query below, GroupID = 0 would have probably sufficed, since it doesn’t make sense to run more than one YetAnotherForum.NET board at the top level.

There is also a new Core SueetieConfiguration "TruncateTextCount" property.  This applies to utility lists like Recent Activity site-wide, as Sueetie Controls truncation is set in the individual .ASCX.  Truncation is performed on the trip back since the full content is cached.  That way both a Sueetie Control and an Activity list can be performing the same search on the same cached data with independent truncation settings.

The IsRestricted ContentQuery property makes a re-appearance to display only data from content areas like individual Forums which are accessible to all users.  This corresponds to the IsRestricted bit field in Sueetie_Content.

 

On the client side, more of the same but with two new JQuery encounters with cool.  The first resulted from seeking more control of the display of the Activity Type Links, in our case "Blog Comments" and "Forum Messages."  Nothing fancy, just underline the active list type. In the selected Activity JQuery function I did something like…

$(".ActivityBlogCommentsLink").addClass("hilite");
$(".ActivityForumMessagesLink").removeClass("hilite");

But to extend the highlighting to the Favorites and Following lists, a better approach of highlighting and un-highlighting was needed.  Which was when I encountered multi-element selectors.  Pretty powerful stuff.

$(".FavoriteComments, .FavoritePosts, .FavoriteTopics, .FavoriteMessages").removeClass("hilite");

The grand achievement of Member Activity Lists from a JQuery perspective was cracking the code on formatting JSON dates.  That’s a standalone post topic for another time, so look for "Three Wolves Howling at the JSON Date Moon" coming to a DBVT.COM RSS Feed near you.

In the meantime please check out that latest addition to Sueetie, Recent Member Activity.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.