<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Making Efficient Tag Clouds With Drupal&#8217;s Taxonomy</title>
	<atom:link href="http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/feed/" rel="self" type="application/rss+xml" />
	<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/</link>
	<description>by Maxim Chernyak</description>
	<lastBuildDate>Tue, 15 May 2012 15:08:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Marilee Gilcrease</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-5741</link>
		<dc:creator>Marilee Gilcrease</dc:creator>
		<pubDate>Thu, 09 Dec 2010 14:19:51 +0000</pubDate>
		<guid isPermaLink="false">#comment-5741</guid>
		<description>&lt;p&gt;hello you guys, I was just checkin&#039; out this blog and I really like the foundation of the article, and have nothing to do, so if anyone would like to to have an interesting chat about it, please contact me on skype, my name is louie meautle&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hello you guys, I was just checkin&#8217; out this blog and I really like the foundation of the article, and have nothing to do, so if anyone would like to to have an interesting chat about it, please contact me on skype, my name is louie meautle</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michal Haselden</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-5510</link>
		<dc:creator>Michal Haselden</dc:creator>
		<pubDate>Wed, 01 Dec 2010 12:00:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-5510</guid>
		<description>&lt;p&gt;Great article!  I am going to take a good amout of time to ponder the article.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great article!  I am going to take a good amout of time to ponder the article.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: rani</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-139</link>
		<dc:creator>rani</dc:creator>
		<pubDate>Tue, 27 Oct 2009 06:23:08 +0000</pubDate>
		<guid isPermaLink="false">#comment-139</guid>
		<description>&lt;p&gt;am keenly waiting for your reply&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>am keenly waiting for your reply</p>]]></content:encoded>
	</item>
	<item>
		<title>By: rani</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-141</link>
		<dc:creator>rani</dc:creator>
		<pubDate>Tue, 27 Oct 2009 05:18:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-141</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;am new one into the drupal, i would like to add tag cloud in to my content type  i create one custom content type.I couldnot able to add tag cloud in to that but it works on the default content type. Hope you will conside this question and will reply soon...&lt;/p&gt;

&lt;p&gt;bye&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>

<p>am new one into the drupal, i would like to add tag cloud in to my content type  i create one custom content type.I couldnot able to add tag cloud in to that but it works on the default content type. Hope you will conside this question and will reply soon&#8230;</p>

<p>bye</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Wim Mostrey</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-61</link>
		<dc:creator>Wim Mostrey</dc:creator>
		<pubDate>Mon, 22 Dec 2008 10:31:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-61</guid>
		<description>&lt;p&gt;It should be noted that there is a patch RTBC to increase performance for the tagadelic module: http://drupal.org/node/193057.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It should be noted that there is a patch RTBC to increase performance for the tagadelic module: <a href="http://drupal.org/node/193057." rel="nofollow">http://drupal.org/node/193057.</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: james</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-219</link>
		<dc:creator>james</dc:creator>
		<pubDate>Sun, 14 Sep 2008 17:56:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-219</guid>
		<description>&lt;p&gt;try to post screenshot also for the tutorials
anyways nice article.
keep it up..&lt;/p&gt;

&lt;p&gt;http://drupalranch.com&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>try to post screenshot also for the tutorials
anyways nice article.
keep it up..</p>

<p><a href="http://drupalranch.com" rel="nofollow">http://drupalranch.com</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: hakunin</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-156</link>
		<dc:creator>hakunin</dc:creator>
		<pubDate>Mon, 28 Jul 2008 04:22:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-156</guid>
		<description>&lt;p&gt;both go into your template.php&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<div style=""><p></p><p>both go into your template.php</p></div>]]></content:encoded>
	</item>
	<item>
		<title>By: Newbie</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-4</link>
		<dc:creator>Newbie</dc:creator>
		<pubDate>Tue, 22 Jul 2008 19:23:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-4</guid>
		<description>&lt;p&gt;Probably a dumb question, but I have to ask it: ;)&lt;/p&gt;

&lt;p&gt;In which file did you put the functions _phptemplate_variables and theme_tags? Is it page.tpl.php?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Probably a dumb question, but I have to ask it: ;)</p>

<p>In which file did you put the functions _phptemplate_variables and theme_tags? Is it page.tpl.php?</p>

<p>Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Stranger</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-10</link>
		<dc:creator>Stranger</dc:creator>
		<pubDate>Thu, 13 Mar 2008 01:41:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-10</guid>
		<description>&lt;p&gt;hai! thanks for article.&lt;/p&gt;

&lt;p&gt;What you think about allocate some tags at tags cloud by put &quot;ctrl&quot;?
It&#039;s very difficultly to realise?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hai! thanks for article.</p>

<p>What you think about allocate some tags at tags cloud by put &#8220;ctrl&#8221;?
It&#8217;s very difficultly to realise?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Stranger</title>
		<link>http://mediumexposure.com/making-efficient-tag-clouds-drupals-taxonomy/comment-page-1/#comment-36</link>
		<dc:creator>Stranger</dc:creator>
		<pubDate>Mon, 26 Nov 2007 15:52:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-36</guid>
		<description>&lt;p&gt;I needed to do something very similar but I used some more of the stock Drupal tools.&lt;/p&gt;

&lt;p&gt;I put these functions in a module with some other helper functions specific to my site.&lt;/p&gt;

&lt;p&gt;The first thing I did was use to use the tagadelic module to define a custom tag cloud block.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
function theme_mymodule_tag_cloud($vid = 1){
  $tags = tagadelic_get_weighted_tags(array($vid),7,15);
  $tags = tagadelic_sort_tags($tags);
  $block = theme(&#039;tagadelic_weighted&#039;, $tags);//return a chunk of 12 tags
  $block .= theme(&#039;tagadelic_more&#039;, $vid);//add more link
  return $block;
}
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But as you noted, the tagedelic module uses some really expensive queries that you don&#039;t want to run on every page load.&lt;/p&gt;

&lt;p&gt;So I also used the hook_cron, but instead, I used Drupal&#039;s internal caching system.  So this is all the code I had to write:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
function mymodule_cron(){
  cache_clear_all(&#039;mymodule&#039;, &#039;cache&#039;, TRUE);
  cache_set(&#039;mymodule_tag_cloud&#039;, &#039;cache&#039;, serialize(theme(mymodule_tag_cloud)));
}
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then I created a function that retrieved the cached tag cloud and call it from a block using the php format option.  Of course now it occurs to me, I could have just put this php in the block instead of having it exist as a function in my module. Or maybe, I just have just properly defined this as a block in the module using the block hooks.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
function mymodule_cached_cloud(){
  $cached = cache_get(&#039;custom_tag_cloud&#039;);
  return unserialize($cached-&gt;data);
}
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I have not looked in several months, but I think the tagedelic developers may be implementing some more caching in the module.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I needed to do something very similar but I used some more of the stock Drupal tools.</p>

<p>I put these functions in a module with some other helper functions specific to my site.</p>

<p>The first thing I did was use to use the tagadelic module to define a custom tag cloud block.</p>

<p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function theme_mymodule_tag_cloud($vid = 1){<br />
&nbsp; $tags = tagadelic_get_weighted_tags(array($vid),7,15);<br />
&nbsp; $tags = tagadelic_sort_tags($tags);<br />
&nbsp; $block = theme('tagadelic_weighted', $tags);//return a chunk of 12 tags<br />
&nbsp; $block .= theme('tagadelic_more', $vid);//add more link<br />
&nbsp; return $block;<br />
}</div></div>

</p>

<p>But as you noted, the tagedelic module uses some really expensive queries that you don&#8217;t want to run on every page load.</p>

<p>So I also used the hook_cron, but instead, I used Drupal&#8217;s internal caching system.  So this is all the code I had to write:</p>

<p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function mymodule_cron(){<br />
&nbsp; cache_clear_all('mymodule', 'cache', TRUE);<br />
&nbsp; cache_set('mymodule_tag_cloud', 'cache', serialize(theme(mymodule_tag_cloud)));<br />
}</div></div>

</p>

<p>Then I created a function that retrieved the cached tag cloud and call it from a block using the php format option.  Of course now it occurs to me, I could have just put this php in the block instead of having it exist as a function in my module. Or maybe, I just have just properly defined this as a block in the module using the block hooks.</p>

<p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function mymodule_cached_cloud(){<br />
&nbsp; $cached = cache_get('custom_tag_cloud');<br />
&nbsp; return unserialize($cached-&gt;data);<br />
}</div></div>

</p>

<p>I have not looked in several months, but I think the tagedelic developers may be implementing some more caching in the module.</p>]]></content:encoded>
	</item>
</channel>
</rss>

