November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Daniel,
There seems to be a few classes missing in the SC3demo-code. I believe the SCReportEntity is missing as well as the SCUtils. However, I simply created my own Utils class with my own GetMiniUserUserPresentation. It is very useful to have...
Here is my code...
public static string GetMiniUserPresentation(IUser user)
{
MyPage mp = MyPageHandler.GetMyPage(user);
string imgTag = "\"{1}\"";
StringBuilder memberInfo = new StringBuilder();
try
{
StarCommunity.Modules.ImageGallery.Image portraitImage = mp.Portrait;
if (mp.Portrait != null)
{
memberInfo.Append(string.Format(imgTag, mp.Portrait.GetThumbnail(50, 50, ThumbnailFormat.ReduceAndCrop).Url, user.Alias));
}
else if (StartPage["MissingImage"] != null)
{
memberInfo.Append(string.Format(imgTag, StartPage["MissingImage"].ToString(), user.Alias));
}
}
catch
{
}
memberInfo.Append(string.Format("
{0}
", user.Alias));
string userCity = user.GetAttributeValue(ATTR_CITY);
string userState = user.GetAttributeValue(ATTR_STATE);
memberInfo.Append(string.Format("
{0}{1}
",
string.IsNullOrEmpty(userCity) ? string.Empty : userCity,
string.IsNullOrEmpty(userState) ? string.Empty : ", " + userState));
return memberInfo.ToString();
}
/ jonas
Hi,
I'm new to Star Community and I'm trying to get some of your demo templates from sc3demo.netstar.se up and running. Some of the basic controls works just fine, but many of the controls are trying to reach SCUtils on order to set some static variables and also present a mini user presentation. I can't seem to find this class anywhere on the partner demo site and would greatly appreciate if you could assist me. Can i download the code from anywhere or am i missing a namespace or reference?
Thanx in advance
//Daniel