diff --git a/venice-data/scripts/comm/profile.js b/venice-data/scripts/comm/profile.js index 8918a42..24cdb63 100644 --- a/venice-data/scripts/comm/profile.js +++ b/venice-data/scripts/comm/profile.js @@ -53,16 +53,27 @@ if (logo_url==null) rc.setParameter("logo",logorender.getRenderingObject(logo_url)); +// Get the community type. +tmp = cast.toInteger(comm.getObject(VeniceNamespaces.COMMUNITY_SECURITY_NAMESPACE,"type.hint")); +if (tmp==0) + rc.setParameter("type","Public Community"); +else if (tmp==1) + rc.setParameter("type","Private Community"); +else if (tmp==2) + rc.setParameter("type","Invitation-Only Community"); + // Get the "use category" flag. opts = cast.toOptionSet(globals.getObject(VeniceNamespaces.COMMUNITY_GLOBALS_NAMESPACE,"options")); if (opts.get(0)) - rc.setParameter("use_category",Boolean.TRUE); + rc.setParameter("category",comm.category); // Set the parameters that correspond to single properties. rc.setParameter("synopsis",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE, "synopsis")); rc.setParameter("rules",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"rules")); rc.setParameter("language",comm.getObject(VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"language")); +rc.setParameter("homepage",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE, + "url.homepage")); // Fill in the location list. locs = new ArrayList(); diff --git a/venice-data/velocity/comm/profile.vm b/venice-data/velocity/comm/profile.vm index 678dd89..6cf7e13 100644 --- a/venice-data/velocity/comm/profile.vm +++ b/venice-data/velocity/comm/profile.vm @@ -17,13 +17,15 @@ *# #* Parameters: - community = Community we're displaying the profile of. - logo = Community logo renderable object. - use_category = True (set) if we're using categories on this server. - synopsis = Community synopsis. - location = List of strings containing location information - language = Primary language for community (a com.silverwrist.util.Language object) - rules = Community rules/standards of conduct + community = Community we're displaying the profile of. + logo = Community logo renderable object. + type = Community type description. + category = The community's category, if we're using categories on this server. + synopsis = Community synopsis. + location = List of strings containing location information + language = Primary language for community (a com.silverwrist.util.Language object) + rules = Community rules/standards of conduct + homepage = Community home page *# #comment( "Profile for community #${community.getCID()}" ) #header2( "Community Profile:" "${community.Name}" ) @@ -42,15 +44,21 @@
#encodeHTML( $synopsis )
#end #set( $u = $community.HostUser.Name )Host: #encodeHTML( $u )
-#encodeHTML( $synopsis )
Location:
#if( $location )
@@ -60,6 +68,11 @@
#end
Primary Language: #encodeHTML( $language.Name )
-Standards of Conduct: #encodeHTML( $rules )
+ #if( $rules ) +Standards of Conduct: #encodeHTML( $rules )
+ #end + #if( $homepage ) +Home Page: #encodeHTML( $homepage )
+ #end