A nice thing about PublicSquare is the ability to show off your community’s statistics. Here’s a bit of liquid to pull up some commonly used statistics.

{% if current_site.most_commented != empty %}
<h4>Most-commented Stories (past 60 days)</h4>
<table class="SBTable">
<tr>
<th class="SBTableHead">Title</th>
<th class="SBTableHead headRight">Comments</th>
</tr>
{% for content in current_site.most_commented %}
<tr>
<td class="SBTableCell">
<a href="{{ content.url }}">{{ content.title | truncate: 25 }}</a>
</td>
<td class="cellRight">{{ content.recent_comments_count }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
Everyone wants to know what’s the best—let them find those stories easily! {% if current_site.highest_rated_stories != empty %}
<h4>Highest-rated Stories</h4>
<div class="SBCopy">
<table class="SBTable">
<tr>
<th class="SBTableHead">Story</th>
<th class="SBTableHead">Rating</th>
</tr>
{% for story in current_site.highest_rated_stories %}
<tr>
<td class="SBTableCell"><a href="{{ story.url }}">{{ story.title | truncate: 30 }}</a>
</td>
<td class="cellCenter" title="Based on {{ story.ratings_count | pluralize: "vote" }}">
{% for step in story.rating_steps %}{% if step.on %}
<img src="{{ 'dot-orange.gif' | asset_url}}" class="RatingSolid" alt="*" />
{% else %}
<img src="{{ 'dot-white.gif' | asset_url }}" class="RatingEmpty" alt=" " />
{% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</table>
{% endif %}
This can be useful if you have a group of regular authors, to spur a little competition, keep people writing…
<div class="SBHead"><h4>Most Active Authors</h4>
<div class="SBCopy">
<table class="SBTable">
<tr>
<th class="SBTableHead">Author</th>
<th class="SBTableHead headRight">Stories</th>
</tr> {% for user in current_site.most_active_authors %}
<tr>
<td class="SBTableCell">{{ user.link }}</td>
<td class="cellRight">{{ user.stories_count }}</td>
</tr> {% endfor %}
</table>
You can call them commenters, or community members, but you want to reward the folks who make your community work with a little shout-out!
<div class="SBHead"><h4>Most Active Commenters</h4>
<div class="SBCopy">
<table class="SBTable">
<tr>
<th class="SBTableHead">Name</th>
<th class="SBTableHead headRight">Comments</th>
</tr> {% for user in current_site.most_active_commenters %}
<tr>
<td class="SBTableCell">{{ user.link }}</td>
<td class="cellRight">{{ user.comments_count }}</td>
</tr> {% endfor %}
</table>
More tips soon!
With a career that's ranged from freelance graphic design to large scale distributed computing systems architecture to leading technology organizations large and small, Jim is a renaissance man, a geek of all trades, or an advanced case of ADD in search of the next challenging distraction. Along the way, he's founded a graphic design studio, built technology groups and solutions for the likes of Disney and DreamWorks, met many interesting people and had a metric ton of fun.
Jim is the father of two and husband of one, all three of whom make him a better person on a daily basis.
Read more about Jim Meyer.
Use this when sending links by email.