Growing Venture Solutions - GVS - development http://growingventuresolutions.com/taxonomy/term/32/0 en What content is HOT on my site? Drupal's Radioactivity module to the rescue http://growingventuresolutions.com/blog/what-content-hot-my-site-drupal-s-radioactivity-module-rescue <p>Earlier this year we supported the IxDA in launching a new version of their IxDA.org site. One of the many interesting new features of this site is the ability to sort content by <a href="http://www.ixda.org/discussion/by-hotness">"hotness"</a>. The goal of this tool is to create a list of interesting content on the site. Their analytics show them that most people who are involved in the site visit it at least twice a month. So, they wanted a system to highlight content over the last two to three weeks. Enter the <a href="http://drupal.org/project/radioactivity">radioactivity module</a>.</p> <h3>Radioactivity Module for Drupal</h3> <p>The Radioactivity module works on the concept of adding energy to a piece of content which then "decays" (or diminishes) with a particular half-life. The exact behavior is up to the site administrator, but on IxDA.org we originally set it up with values roughly similar to:</p> <ul> <li>Posting content adds a lot of energy so that the hotness favors recent items.</li> <li>Commenting on a post adds some energy</li> <li>Voting up adds a bit of energy, voting down subtracts some energy</li> <li>Favoriting a post adds some energy as well</li> </ul> <p>We've got a few other elements that affect energy to help offset any potential gaming.</p> <p>We set the half-life for decay to 15 days. So, if a piece of content gets posted and 3 comments and 2 vote ups and 1 favorite with 100 views on the first day it will have about 500 units of energy. If it gets no new energy, it would decay down to 250 units of energy after 15 days, and then down to 125 after 30 days and so on. Eventually the energy and decay are really small and for efficiency the module simply deletes all records with less than 2 units of energy.</p> <!--break--><!--break--> <h3>Extending the Radioactivity Module</h3> <p>We needed some features which simply were not available in the Radioactivity module. The first two were to create events for adding energy when a <a href="http://drupal.org/node/688556">node is created</a> and then some better <a href="http://drupal.org/node/451024">fivestar integration</a>.</p> <p>But I want to talk the most about the custom flag integration. The nature of the flag module is that it is so flexible and specific on each site that general flag integration for the Radioactivity module is probably not reasonable to add. So, instead I created a site-specific module for IxDA to do flag integration and have provided it here as an attachment so that you can download it and see how it works. If you look at the code, it is amazingly simple to build integration with the Radioactivity module!</p> <p>Creating a new Radioactivity integration module is amazingly simple. You really only need two hooks. The first is hook_radioactivity_info which declares some information about your integration module.</p> <p>Those of you comfortable with the FormAPI will appreciate the structure of the code - it contains an array of arrays of arrays!</p> <p><div class="codeblock"><code>/**<br /> * Implement hook_radioactivity_info().<br /> */<br />function ixda_radioactivity_flag_radioactivity_info() {<br />&nbsp; return array(&#039;sources&#039; =&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; array(&#039;node&#039; =&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; array(&#039;favorite&#039; =&gt; array(&#039;title_placeholder&#039; =&gt; &#039;Flag post as favorite.&#039;),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#039;unfavorite&#039; =&gt; array(&#039;title_placeholder&#039; =&gt; &#039;Unflag a post as favorite.&#039;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )));<br />}</code></div></p> <p>The sources can be about different kinds of objects, this particular flag happens to be a flag on nodes called "Favorite" and people can either mark it as a Favorite or remove it as a favorite and I wanted the administrator to be able to assign points for either of those events.</p> <p>The next hook is not specifically radioactivity but is from the Flag module. This hook is called whenever an item is flagged (or un-flagged). This flag then calls functions from the radioactivity module to add energy to content.</p> <p><div class="codeblock"><code>/**<br /> * Implement hook_flag().<br /> */<br />function ixda_radioactivity_flag_flag($event, $flag, $content_id, $account) {<br />&nbsp; require_once drupal_get_path(&#039;module&#039;, &#039;radioactivity&#039;) .&#039;/radioactivity.inc&#039;;<br /><br />&nbsp; // If this is a favoriting.<br />&nbsp; if ($flag-&gt;name == &#039;favorite&#039;) {<br />&nbsp;&nbsp;&nbsp; $oid = $content_id;<br />&nbsp;&nbsp;&nbsp; $oclass = &#039;node&#039;;<br /><br />&nbsp;&nbsp;&nbsp; // Then either favorite the object or unfavorite it.<br />&nbsp;&nbsp;&nbsp; if ($event == &#039;flag&#039;) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; radioactivity_add_energy($oid, $oclass, &#039;favorite&#039;);<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; radioactivity_add_energy($oid, $oclass, &#039;unfavorite&#039;);<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp; }<br />}</code></div></p> <p><strong>That's IT!</strong> Two simple functions and you've done it. Everything else is configuration. Check out this video of setting up a new radioactivity profile and sorting content by that profile:</p> <p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9337149&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9337149&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p><p><a href="http://www.masteringdrupal.com/screencast/highlight-your-best-content-using-radioactivity-module">Using Drupal's Radioactivity Module to Highlight Your Best Content</a><br /> from <a href="http://www.masteringdrupal.com">Mastering Drupal</a>.</p> <h3>Best content on groups.drupal.org: Radioactivity again</h3> <p>I liked the module so much that I've now also deployed it on <a href="http://groups.drupal.org/hot">groups.drupal.org/hot</a>. It's available as a single page and the top 5 items at any given time are shown in a sidebar block.</p> <p>One of the features I would love to see is an rss feed of hot content. The problem there is that a piece of content could become hot twice. So, we would want to create a threshold value of energy for content that is included in the feed and then sort it descending by the day it broke that threshold.</p> http://growingventuresolutions.com/blog/what-content-hot-my-site-drupal-s-radioactivity-module-rescue#comments Planet Drupal content recommendation development IxDA Tue, 10 Aug 2010 06:00:00 +0000 Greg 911 at http://growingventuresolutions.com Introducing Token Starterkit - Simple Introduction to Creating your own Drupal Tokens http://growingventuresolutions.com/blog/introducing-token-starterkit-simple-introduction-creating-your-own-drupal-tokens <p>There seems to be a new pattern emerging in Drupal and I want to let you know that the <a href="http://drupal.org/project/token">Token</a> module has joined the bandwagon with a "Token Starter Kit"</p> <h3>History of the Starter Kit in Drupal: Zen Theming</h3> <p>When the Zen project started it's goal was to be a really solid base HTML theme with tons of comments in the templates so that a new themer could take it, modify it, and end up with a great theme. Unfortunately, that second step of modifying it meant that people ran into all sorts of support issues that were hard to debug and they were in trouble when a new version of Zen came out - they weren't really running Zen any more.</p> <h3>How to use the Token Starter Kit</h3> <p>The Token Starter Kit is meant to be similarly easy for folks to use. The idea is that if you just open up the token module itself and start adding tokens then you are "hacking a contrib" (modifying it) and you will have to remember to make those changes again when you upgrade. Bad news. It's also not particularly simple to understand how the module works (it's got includes, and hooks, oh my!).</p> <p>Enter the tokenSTARTER module. Just copy the tokenSTARTER .info and .module files to a new directory in your modules directory, rename them, and rename all the functions inside to match the filenames. This gives you a clean place to start adding in your own tokens. So, go for it. You'll see that it's quite simple and all you need are two hooks.</p> <h3>Documentation on Token API</h3> <p>There's also an <a href="http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/token/API.txt?view=markup">API.txt</a> file and <a href="http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/token/README.txt?view=markup">README.txt</a> file which explain how to write tokens in general. Lots of great advice in there.</p> http://growingventuresolutions.com/blog/introducing-token-starterkit-simple-introduction-creating-your-own-drupal-tokens#comments Planet Drupal development module token Wed, 21 Oct 2009 23:16:12 +0000 Greg 528 at http://growingventuresolutions.com Economist.com - Providing Tools to Support the Severe Contest Online http://growingventuresolutions.com/about/customers/economist-com-providing-tools-support-severe-contest-online <p>I (Greg) have been reading the Economist since I was a teenager, so I was quite excited to hear that they were going to be moving to Drupal. Of course, I was even more excited when I got the opportunity to work on the project.</p> <div style="float: right"><img src="http://farm4.static.flickr.com/3358/3564511589_10e3e0f5ed_m.jpg" alt="severe contest" /></div> <p>The Economist provides a variety of services, but their most popular one is the very dense newspaper they deliver each week full of insightful articles. As printed media undergoes an enormous change in the age of online delivery, The Economist draws inspiration from the <a href="http://www.economist.com/agenda/displaystory.cfm?story_id=1873493">Prospectus</a> and their <a href="http://theeconomistonline.blogspot.com/2008/05/in-pursuit-of-severe-contest-online_28.html">mission statement</a> to find a purpose:</p> <blockquote><p>To take part in a severe contest between intelligence, which presses forward, and an unworthy timid ignorance obstructing our progress.</p></blockquote> <p>Growing Venture Solutions has engaged with developers at The Economist and many other fine consultants including <a href="http://www.cyrve.com/">Cyrve</a> and <a href="http://fourkitchens.com/">Four Kitchens</a>. We are working with their scrum teams to build the tools necessary to host a <em>severe contest</em> online. Included in these tools are features that drive at the heart of Drupal: content management, identity, rating, and individually focused customization.</p> <p>Much of the work is making its way back to the Drupal community. The <a href="http://drupal.org/project/views_bulk_operations">Views Bulk Operations</a> and <a href="http://drupal.org/project/votingapi">Voting API</a> modules have seen some improvements already. The amazing <a href="http://drupal.org/project/tw">Table Wizard</a> and <a href="http://drupal.org/project/migrate">Migrate</a> modules were vastly improved as a result of their use importing data into the site. As we move beyond the migration stages of the project, we should be able to make even more improvements to Drupal.</p> <p><img src="http://farm4.static.flickr.com/3373/3565327086_b05e6bf9c1_m.jpg" alt="Greg and Rob in the office" /></p> http://growingventuresolutions.com/about/customers/economist-com-providing-tools-support-severe-contest-online#comments development module Tue, 26 May 2009 02:07:18 +0000 Greg 468 at http://growingventuresolutions.com Job Openings: Drupal Developer, Web Designer with Usability focus http://growingventuresolutions.com/blog/job-openings-drupal-developer-web-designer-usability-focus <p>The Growing Venture Solutions <a href="http://growingventuresolutions.com/about/team">team</a> has expanded over the last 6 months to add two new members. In the face of increasing demand for our <a href="http://growingventuresolutions.com/about/services">services</a> we are now looking to hire new people to join the team.</p> <p>We are hiring two people. These descriptions are for the ideal candidate, so if you have some of the qualities and are looking to expand in these areas then please still contact us.</p> <h3>Website Designer With a Strong Usability Focus</h3> <p>Most of our projects are heavy on development, but our goal is to be a full service shop. We've satisfied this need so far by working with contractors, but now we want someone to join the team. One of your tasks will be to help polish our site (we've started work on this, but it would be unfair to keep you out of it). You'll also work with our clients on identity, user experience, and wireframing. And if you're interested you will help with some sales work.</p> <h3>Drupal Generalist: Site Builder, Developer, Support Engineer, Trainer</h3> <p><em>EDIT: This position is <a href="http://growingventuresolutions.com/blog/growing-venture-solutions-team-expanding-steve-ezra-and-now-dave-reid">now filled</a>.</em></p> <p>We provide many services around Drupal: building sites, writing custom code and enhancing modules, providing support to our support clients, and providing training services. If you are a "Drupal generalist" interested in providing at least some of these services that's great. A resume is less interesting than a solid record of contribution to the Drupal project - please provide a link to your drupal.org user profile.</p> <h3>Locations and What it's like to work with Growing Venture Solutions</h3> <p>We like to think we're a pretty special company. The best way to describe us is a hybrid between being a freelancer and an employee. For more details, see <a href="http://growingventuresolutions.com/about/working-growing-venture-solutions">this description</a>.</p> <p>We are currently located in Denver, Colorado and New York City which means we're somewhat virtual. However, we value face-to-face communications and are looking for people specifically in those areas or who are interested in moving to those areas (really, are there any better cities on earth? we think not).</p> <h3>Next Steps - Contact us</h3> <p>If this has your curiosity piqued, the next step is to <a href="http://growingventuresolutions.com/contact">contact us</a>.</p> http://growingventuresolutions.com/blog/job-openings-drupal-developer-web-designer-usability-focus#comments Planet Drupal design development Wed, 18 Mar 2009 22:15:27 +0000 Greg 383 at http://growingventuresolutions.com New User_quota Module Provides Turnkey Solution for Artistic Entrepreneurs http://growingventuresolutions.com/blog/new-user-quota-module-provides-turnkey-solution-artistic-entrepreneurs <p>We recently helped out with the development of a pretty neat multiple vendor e-commerce website. In working on it much of the code was custom but we were able to build a novel, generic per user content type quota system. Each user can purchase credits towards their quota, which allows them to submit new content.</p> <h3>About LolliShops - Multi Shop Marketplace</h3> <div style="float: right"><a href="http://www.lollishops.com/"><img src="http://growingventuresolutions.com/gvsfiles/lollishops_logo.gif" /></a></div> <p>The easiest way to describe <a href="http://www.lollishops.com/">LolliShops</a> is an upscale <em>boutique</em> version of <a href="http://www.etsy.com/">Etsy</a>, built in Drupal. Lollishops provides a turnkey solution for artistic individuals who make jewelry, clothing and art by hand. Anyone can sign up and setup a personalized online store in minutes. It focuses on the <em>Frou Frou</em> market (if you're not familiar with it, it's probably best described by the site). So far, LolliShops has thousands of individual stores. The theme and products shown on the home page give a great sense of the intended audience. Vendors on the site purchase the ability to sell their products on the site with 3 different selling arrangements. Two of these arrangements limit the number of products that they can create, requiring a quota system.</p> <h3>About the User Quota Module</h3> <p>Of course the first thing I did when looking to build that quota functionality was to <a href="http://groups.drupal.org/node/16637">compare all of the existing solutions</a>. I posted a summary of my research into the <a href="http://groups.drupal.org/duplicated-modules-hall-shame">Duplicate Modules Hall of Shame</a> group for others to benefit from the research. It seemed like there was no way to do exactly what we need with the existing modules, so I set to work building a new module.</p> <p>The result is the <a href="http://drupal.org/project/user_quota">User Quota</a> module. Currently the module is very simple. It provides two administrative screens: 1 to list all of the users with their current quotas and a second to manage the quota for a specific user.</p> <p>Why bother announcing it here? To limit confusion in an already crowded area I used the project page from an old module. <a href="http://www.claws-and-paws.com/">Doug Muth</a> graciously agreed to let me use the old <a href="http://drupal.org/project/user_quota">User Quota</a> project page. Thanks, Doug!</p> <h3>Feature Enhancement - Easy Quota Purchases</h3> <p>One sad point with this module is that the Paypal integration we did for Lollishops was very site specific and cannot be directly committed and used on other sites. We are looking for sponsors to help build a simple e-commerce integration. We are debating about whether to integrate with <a href="http://www.ubercart.org/">Ubercart</a>, or <a href="http://drupal.org/project/lm_paypal">LM Paypal</a>, or <a href="http://drupal.org/project/simple_paypal">Simple Paypal Framework</a>. Certainly in time it should provide both of these features. The real question is which to do first. Ubercart appears to have the most solid 6.x release but doesn't fit with the lightweight nature of the module.</p> <p>And of course there is a need to fund that work. If you have a site that could use the ability to sell a node, please <a href="http://growingventuresolutions.com/contact">contact us</a> so we can discuss the exact implementation.</p> http://growingventuresolutions.com/blog/new-user-quota-module-provides-turnkey-solution-artistic-entrepreneurs#comments Planet Drupal development module Fri, 19 Dec 2008 01:15:30 +0000 Greg 248 at http://growingventuresolutions.com