<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Threads &#187; drupal</title>
	<atom:link href="http://www.web-threads.com/tag/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.web-threads.com</link>
	<description>Websites for Business and Online Communities</description>
	<lastBuildDate>Tue, 10 Aug 2010 21:48:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Drupal Query to Disable Comments on Node by Content Type</title>
		<link>http://www.web-threads.com/2010/04/drupal-query-to-disable-comments-on-node-by-content-type/</link>
		<comments>http://www.web-threads.com/2010/04/drupal-query-to-disable-comments-on-node-by-content-type/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 19:42:23 +0000</pubDate>
		<dc:creator>Web Threads</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.web-threads.com/?p=345</guid>
		<description><![CDATA[A handy drupal snippet, when someone&#8217;s added hundreds of nodes with comments allowed and you need to bulk disable them without editing them each by hand.


UPDATE drup_node SET `comment`=0 WHERE type='review';

Modify as needed with the correct drupal node table name for your installation, and set the type= to whatever the type you&#8217;d like to update.
Like
Unlike

]]></description>
			<content:encoded><![CDATA[<p>A handy drupal snippet, when someone&#8217;s added hundreds of nodes with comments allowed and you need to bulk disable them without editing them each by hand.<br />
<span id="more-345"></span></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">UPDATE</span> drup_node <span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #008000;">`comment`</span><span style="color: #CC0099;">=</span><span style="color: #008080;">0</span> <span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #990099; font-weight: bold;">type</span><span style="color: #CC0099;">=</span><span style="color: #008000;">'review'</span><span style="color: #000033;">;</span></pre></div></div>

<p>Modify as needed with the correct drupal node table name for your installation, and set the type= to whatever the type you&#8217;d like to update.</p>
<div class='wp_likes' id='wp_likes_post-345'><a class='like' href="javascript:wp_likes.like(345);" title='' ><img src="http://www.web-threads.com/press/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(345);">Unlike</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.web-threads.com/2010/04/drupal-query-to-disable-comments-on-node-by-content-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: mq4 File Attachments Open As Plain Text</title>
		<link>http://www.web-threads.com/2009/08/drupal-mq4-file-attachments-open-as-plain-text/</link>
		<comments>http://www.web-threads.com/2009/08/drupal-mq4-file-attachments-open-as-plain-text/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 19:43:43 +0000</pubDate>
		<dc:creator>Web Threads</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.web-threads.com/?p=270</guid>
		<description><![CDATA[A quick fix this morning for a client with a Drupal issue, links to mq4 files were opening as plain text in the browser window instead of presenting a download file prompt.
This is due to the server configuration, apache mime-types. It is usually easily fixed in an .htaccess file.


AddType application/octet-stream mq4

If that doesn&#8217;t sort the issue after clearing the browser cache, you can also try adding:

&#60;Files *.mq4&#62;
ForceType application/octet-stream
Header set Content-Disposition attachment
&#60;/Files&#62;

See also:
Drupal Mime-Types
Apache mod_mime
Apache htaccess directives

Like
Unlike

]]></description>
			<content:encoded><![CDATA[<p>A quick fix this morning for a client with a Drupal issue, links to mq4 files were opening as plain text in the browser window instead of presenting a download file prompt.</p>
<p>This is due to the server configuration, apache mime-types. It is usually easily fixed in an .htaccess file.<br />
<span id="more-270"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">AddType application<span style="color: #000000; font-weight: bold;">/</span>octet-stream mq4</pre></div></div>

<p>If that doesn&#8217;t sort the issue after clearing the browser cache, you can also try adding:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>Files <span style="color: #000000; font-weight: bold;">*</span>.mq4<span style="color: #000000; font-weight: bold;">&gt;</span>
ForceType application<span style="color: #000000; font-weight: bold;">/</span>octet-stream
Header <span style="color: #000000; font-weight: bold;">set</span> Content-Disposition attachment
<span style="color: #000000; font-weight: bold;">&lt;/</span>Files<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>See also:<br />
<a href="http://obor.us/node/2027" rel="nofollow">Drupal Mime-Types</a><br />
<a href="http://httpd.apache.org/docs/1.3/mod/mod_mime.html" rel="nofollow">Apache mod_mime</a><br />
<a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html" rel="nofollow">Apache htaccess directives</a>
</p>
<div class='wp_likes' id='wp_likes_post-270'><a class='like' href="javascript:wp_likes.like(270);" title='' ><img src="http://www.web-threads.com/press/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(270);">Unlike</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.web-threads.com/2009/08/drupal-mq4-file-attachments-open-as-plain-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Empty Tables in PhpMyAdmin (MySQL)</title>
		<link>http://www.web-threads.com/2009/08/how-to-empty-tables-in-phpmyadmin-mysql/</link>
		<comments>http://www.web-threads.com/2009/08/how-to-empty-tables-in-phpmyadmin-mysql/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 19:58:37 +0000</pubDate>
		<dc:creator>Web Threads</dc:creator>
				<category><![CDATA[Website Management]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.web-threads.com/?p=275</guid>
		<description><![CDATA[Recently I needed to empty the Drupal sessions and cache tables which had grown to some million+ rows and were causing weekly database errors on a busy health community website. In PhpMyAdmin, permissions to empty tables weren&#8217;t available.

I searched for a quick way to easily clear the table and found that truncate does the job and the permissions to do this was there even though it was not listed in the options of phpmyadmin.

TRUNCATE TABLE `drupal_sessions`

I also added a Drupal plugin to do database maintenance weekly to prevent this happening again. Sure enough, the site has been behaving and performing much better since, knock on wood.
Like
Unlike

]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to empty the Drupal sessions and cache tables which had grown to some million+ rows and were causing weekly database errors on a busy health community website. In PhpMyAdmin, permissions to empty tables weren&#8217;t available.<br />
<span id="more-275"></span><br />
I searched for a quick way to easily clear the table and found that <a title="MySQL Manual: Truncate" href="http://dev.mysql.com/doc/refman/5.0/en/truncate.html" rel="nofollow">truncate</a> does the job and the permissions to do this was there even though it was not listed in the options of phpmyadmin.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">TRUNCATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`drupal<span style="color: #008080; font-weight: bold;">_</span>sessions`</span></pre></div></div>

<p>I also added a Drupal plugin to do database maintenance weekly to prevent this happening again. Sure enough, the site has been behaving and performing much better since, knock on wood.</p>
<div class='wp_likes' id='wp_likes_post-275'><a class='like' href="javascript:wp_likes.like(275);" title='' ><img src="http://www.web-threads.com/press/wp-content/plugins/wp-likes/images/like.png" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(275);">Unlike</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.web-threads.com/2009/08/how-to-empty-tables-in-phpmyadmin-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
