Missing GetMiniUserPresentation

Vote:
 

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 

#20458
May 30, 2008 12:46
Vote:
 

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 

#20535
Jun 04, 2008 12:55
Vote:
 
#20536
Jun 04, 2008 12:55
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.