<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.wiredgeek.com" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <title>userpoints</title>
 <link>http://www.wiredgeek.com/taxonomy/term/256</link>
 <description>The taxonomy view with a depth of 0.</description>
 <language>en</language>
<item>
 <title>Version 3.0 ready for Beta!</title>
 <link>http://www.wiredgeek.com/node/783</link>
 <description>  &lt;div class=&quot;content&quot;&gt;
  &lt;p&gt;Although I wasn&#039;t working on it everyday it has taken me a few weeks to finish up all the little items needed to upgrade userpoints from version 2 to version 3. Version 3 upgrades include several major changes to the module many of which are rather dramatic. In addition to the API change several new features were added. I&#039;ll attempt to list them here but I know I&#039;m going to miss quite a few of them. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Structure changes
&lt;ul&gt;
&lt;li&gt;New API
&lt;ul&gt;
&lt;li&gt;API now accepts a structured array or an (int)
&lt;ul&gt;
&lt;li&gt;Documented in the README.txt file with the module as well as doxygen comments within the module&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Same API call for Updates and Inserts, similar to node_save()&lt;/li&gt;
&lt;li&gt;If called with a single numeric value, site defaults are used and points are awarded to the currently logged in user &lt;/li&gt;
&lt;li&gt;Every database  column can be passed into the array and the API will handle it accordingly (i.e. API calls can override site defaults and manipulate all areas of the DB w/ the API acting as a sanity checker)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;API handles transactions AND caching table
&lt;ul&gt;
&lt;li&gt;Previously the API added in transaction but other calls had to be made to ensure that the caching table was properly updated. Now there is a new function userpoints_update_cache() which properly ensures that the caching table is up to date. This also lays the foundation for anyone that would like to rewrite the caching table functions so that it is a SQL sum() function vs. a points + points method. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;No INSERT/UPDATES need to be done by other modules
&lt;ul&gt;
&lt;li&gt;No contributed modules should have any need to do an INSERT/UPDATE directly to the userpoints_txn or userpoints table. The API will do both!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;New Features!
&lt;ul&gt;
&lt;li&gt;Points Expiration
&lt;ul&gt;
&lt;li&gt;Points can expire on a set date or after a set amount of time&lt;/li&gt;
&lt;li&gt;runs on a cron job&lt;/li&gt;
&lt;li&gt;is point specific! So certain points can last longer/shorter than others&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Points Categorization
&lt;ul&gt;
&lt;li&gt;Utilize term IDs to categorize points&lt;/li&gt;
&lt;li&gt;Categories are carried through into the caching table for faster access&lt;/li&gt;
&lt;li&gt;Modules can add terms to the vocab and separate their points. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Interface changes
&lt;ul&gt;
&lt;li&gt;Transaction tools in core (no longer a contrib module)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;/myuserpoints shows detailed transaction history&lt;/li&gt;
&lt;li&gt;Single interface to view, moderate and add links&lt;/li&gt;
&lt;li&gt;Userpoints listing is the default view&lt;/li&gt;
&lt;li&gt;listing and moderation views can show All categories or selected category &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Bug fixes
&lt;ul&gt;
&lt;li&gt;many.. too many to list.   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&lt;br /&gt;
Examples of how to use the new API&lt;br /&gt;
//give the currently logged in user 5 points using all site defaults&lt;br /&gt;
userpoints_userpointsapi(5); &lt;/p&gt;
&lt;p&gt;$params = array(&lt;br /&gt;
   &#039;uid&#039; =&amp;gt; 1,&lt;br /&gt;
   &#039;points&#039; =&amp;gt; 5,&lt;br /&gt;
   &#039;tid&#039; =&amp;gt; 10,&lt;br /&gt;
   &#039;moderate&#039; =&amp;gt; false,&lt;br /&gt;
   &#039;event&#039; =&amp;gt; &#039;test&#039;,&lt;br /&gt;
   &#039;description&#039; =&amp;gt; &#039;test points&#039;,&lt;br /&gt;
);&lt;br /&gt;
userpoints_userpointsapi($params);&lt;br /&gt;
//This gives user #1 5 points with an event of &quot;test&quot;, description of &quot;test points&quot;, and places them categorizes them with taxonomy id 10. It also bypasses the site moderation as explicitly set parameters bypass site settings. &lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;There is still a lot of debug testing to do. If you use userpoints please take a few minutes to download the v3 (currently only in CVS) and test it on your DEV site. Submit back a patch or an issue on this &lt;a href=&quot;http://drupal.org/node/183812&quot; rel=&quot;nofollow&quot;&gt;thread&lt;/a&gt; over on Drupal.org&lt;br /&gt;
If you have questions about this release feel free to comment on the project page. Please do not post a question in these comments.&lt;/p&gt;
  &lt;/div&gt;
</description>
 <comments>http://www.wiredgeek.com/node/783#comments</comments>
 <category domain="http://www.wiredgeek.com/taxonomy/term/14">drupal</category>
 <category domain="http://www.wiredgeek.com/taxonomy/term/256">userpoints</category>
 <pubDate>Sun, 14 Oct 2007 18:27:40 +0000</pubDate>
 <dc:creator>Jacob Redding</dc:creator>
 <guid isPermaLink="false">783 at http://www.wiredgeek.com</guid>
</item>
</channel>
</rss>
