Show members by their groupmembership

Wednesday, May 27, 2009
4 comment(s)

This package add an extra applicationTree to the membersection, and display all members by their group membership. This is a nice feature if you have a lot of members, andonly want to work with members in a specific group.

image-thumb

Updated version 1.0.1

  - Bugfix, wrong assembly inheritance in aspx is fixed

Download latest version here: bentzen.showMemberByGroups_1.0.1.zip

Coming to Codegarden '09

Tuesday, March 03, 2009
0 comment(s)

I'm one of the VEB'er (very early birds), and is signed up for Codegarden againg this year. I attended last year as well, and had some great days. I look forward to attend sessions, talk with people from community, share ideas - and of course - all the fun and cosy things.

Cleaning after spam-bots

Monday, March 02, 2009
0 comment(s)

On this blog, a (couple of) spam-bot(s) has played with my comments for a while, which is ended up with a lot of crappy nodes (~10.000 nodes)

So, I descides to skip all the comments (including the real ones as there only was a little amount) by deleting the documenttype for the blog post comments.

But this is not so easy as I thought. When I do this, the Umbraco backend hangs for a while, and end up with a server error:

Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

I think that could be solved if I had the control over the IIS and the connection pool, but I'm running on a shared host. After a while, I'm able to log in to Umbraco again, empying the recycle bin, which only has between 50 and 100 items. Then I start over the process again.

Yuck!

Update:
I tried to change the connection value to increase the pool-size and timeoutvalue, but this doesn't seems to speed up the process.
Instead, I decided to do the cleanup directly in the database. I located all cmsContent rows with the id of the doc. type I wanted to delete, and deleted them all. Then I deleteded the corresponding values in umbracoNode table, cmsDocument, and the corresponding values in cmsPropertyData (Linked to umbracoNode). I know it's risky to change/delete values directy in the database - speciel when you not know the datamodel 100%. But this is only my private blog, and I did a backup before, so I took the change. Afterwards It seems to works :-)

Accentuate the popular tags

Sunday, March 01, 2009
1 comment(s)

Inspired by many weblog, I have crated some xslt code to display my post tags and accentuate the most popular.

I'm using the "Tags" datatype in Umbraco V4.

Here are the code used.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:tagsLib="urn:tagsLib" xmlns:Exslt.ExsltMath ="urn:Exslt.ExsltMath" exclude-result-prefixes="umbraco.library msxml Exslt.ExsltMath tagsLib">
<xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:variable name="sumOfTags" select="sum(tagsLib:getAllTagsInGroup('Umbraco')/tags/tag/@nodesTagged)"/> <xsl:variable name="TagFactor" select="6 div Exslt.ExsltMath:max(tagsLib:getAllTagsInGroup('Umbraco')/tags/tag/@nodesTagged)"/>
<div class="tags">
  <xsl:for-each select="tagsLib:getAllTagsInGroup('Umbraco')/tags/tag">
    <a class="tag{round($TagFactor * @nodesTagged)}x" href="/?tag={.}">
      <xsl:value-of select="."/>
    </a>&nbsp;
  </xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>

And the stylesheet codes too:

/* Tag Styles */
.tags { line-height: 150%; }
.tag6x { text-decoration: none; font-size: 22px; }
.tag5x { text-decoration: none; font-size: 19px; }
.tag4x { text-decoration: none; font-size: 16px; }
.tag3x { text-decoration: none; font-size: 13px; }
.tag2x { text-decoration: none; font-size: 10px; }
.tag1x { text-decoration: none; font-size: 7px; }
/* End Tag Styles */