<?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>I can has weblog? &#187; Drupal</title>
	<atom:link href="http://justin-hopkins.com/blog/category/drupal/feed" rel="self" type="application/rss+xml" />
	<link>http://justin-hopkins.com/blog</link>
	<description>The thoughts and works of Justin Hopkins.</description>
	<lastBuildDate>Wed, 23 Jun 2010 15:32:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Friends, don&#8217;t give away your passwords!</title>
		<link>http://justin-hopkins.com/blog/2009/03/04/friends-dont-give-away-your-passwords</link>
		<comments>http://justin-hopkins.com/blog/2009/03/04/friends-dont-give-away-your-passwords#comments</comments>
		<pubDate>Thu, 05 Mar 2009 02:11:15 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://justin-hopkins.com/blog/2009/03/04/friends-dont-give-away-your-passwords</guid>
		<description><![CDATA[So, despite having logged into my blog just now without doing this &#8211; I&#8217;m going to share with you the easy way that probably 90% of you can protect your passwords while using the public wifi: Step 1: ssh -D 9999 -C somebox.youcan.sshto Step 2 Go get something like FoxyProxy for Firefox and MM3 for [...]]]></description>
			<content:encoded><![CDATA[<p>So, despite having logged into my blog just now without doing this &#8211; I&#8217;m going to share with you the easy way that probably 90% of you can protect your passwords while using the public wifi:</p>

<h3>Step 1:</h3>

<code>


<pre>
ssh -D 9999 -C somebox.youcan.sshto
</pre>


</code>

<h3>Step 2</h3>

<p>Go get something like FoxyProxy for Firefox and <span class="caps">MM3 </span>for Thunderbird (especially if you are using any version of Thunderbird 3 &#8211; nothing else is compatible). </p>

<p>For Firefox, set up a <span class="caps">SOCKS5 </span>proxy (Prefs &gt; Advanced &gt; Network &gt; Settings) on localhost port 9999. Start using the proxy. Stop using the proxy when you kill your ssh connection and make sure you open the connection if you are using the proxy.</p>

<p>For thunderbird it&#8217;s basically the same if you are using FoxyProxy &#8211; but if you are using <span class="caps">MM3 </span>like me, you need to create (click edit, oh btw you will probably have to add the button to the toolbar first) a proxy with this config:</p>

<code>


<pre>
[Arbitrary_name
  socks=127.0.0.1:9999
]
</pre>


</code>

<p>That&#8217;s it. Now I can&#8217;t steal your passwordsss! If you want to encrypt <span class="caps">DNS </span>requests you can set network.proxy.socks_remote_dns to true in about:config</p>]]></content:encoded>
			<wfw:commentRss>http://justin-hopkins.com/blog/2009/03/04/friends-dont-give-away-your-passwords/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Setting Up Drupal File Framework On Ubuntu 8.10</title>
		<link>http://justin-hopkins.com/blog/2008/12/02/how-to-setting-up-drupal-file-framework-on-ubuntu-810</link>
		<comments>http://justin-hopkins.com/blog/2008/12/02/how-to-setting-up-drupal-file-framework-on-ubuntu-810#comments</comments>
		<pubDate>Tue, 02 Dec 2008 21:00:02 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://justin-hopkins.com/blog/?p=101</guid>
		<description><![CDATA[This document is continually changing! One of the ways it gets changed is by people communicating with me using comments. In the future, I will host a wiki for this purpose &#8211; but for the time being please help me out by posting your suggested changes/improvements as comments! *2010/05/17: New users will want to read [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This document is continually changing! One of the ways it gets changed is by people communicating with me using comments. In the future, I will host a wiki for this purpose &#8211; but for the time being please help me out by posting your suggested changes/improvements as comments!</strong></p>

<p>*2010/05/17: New users will want to read down through all of the comments, as this post has become out of date in quite a few ways. Especially have a look at <a href="http://justin-hopkins.com/blog/2008/12/02/how-to-setting-up-drupal-file-framework-on-ubuntu-810#comment-172">this comment from Wouter</a>.*</p>

<p><a href="http://justin-hopkins.com/blog/wp-content/uploads/2008/11/logo2.png"><img src="http://justin-hopkins.com/blog/wp-content/uploads/2008/11/logo2.png" alt="Drupal Logo" title="Drupal Logo" width="49" height="57" class="alignright size-full wp-image-111" /></a>
In my <a href="http://justin-hopkins.com/blog/2008/11/26/document-management-woes">previous post</a> I described the troubles I had with standalone document management softwares. Many of the issues I had were related to a lack of flexibility and lack of integration with my <span class="caps">CMS </span>of choice: Drupal.</p>

<p>At first glance(and even after looking quite hard), Drupal seems to be weak when it comes to document management. But just like any Drupal solution, a careful examination of the available modules might turn up <strong>the ingredients for the perfect recipe!</strong></p>

<p>In this article, I&#8217;m going to describe the steps required to get off the ground with a Drupal based document management solution that will provide:</p>


<ul>
<li>Organization of documents</li>
<li>Revision control</li>
<li>WebDav access</li>
<li>Rich metadata</li>
<li>Indexing for search</li>
<li>In-browser display of documents</li>
<li>Document conversion services</li>
<li>All the goodness you get from building it inside Drupal
<ul>
<li>Free authentication</li>
<li>Free administration interface</li>
<li>Integration with other Drupal modules (Views anyone?)</li>
<li>Awesome community of developers</li>
</ul>
</li>
</ul>



<h2>Getting started</h2>

<p>I&#8217;d recommend testing this out on a fresh install of Drupal6.6 &#8211; should you encounter difficulty, the number of modules on an established site could make troubleshooting a bit more difficult. After you&#8217;ve got it down, you can move on to your active development site.</p>

<p>Thanks to <a href="http://drupal.org/user/26089">Arto Bendiken</a>, <a href="http://drupal.org/user/18741">Miglius Alaburda</a>, <a href="http://drupal.org/user/51124">Justin Miller</a>, <a href="http://drupal.org/user/186547">Ben Lavender</a>, <a href="http://drupal.org/user/43670">Frank Febbraro</a>, and of course <a href="http://drupal.org/user/23">Moshe Weitzman</a>. </p>

<p>This article is based on <a href="http://bhuga.net/2008/07/setting-your-system-file-conversions-with-file-framework">Setting up your system for file conversions with File Framework</a>. Ben gives a very helpful and accurate rundown of what it takes to get going under CentOS. Since I was trying it out under Ubuntu, I thought I&#8217;d spend the time documenting my troubles &#8211; and include instructions to add some extra bells and whistles.</p>

<h2>System stuff</h2>

<p>First things first, lets go ahead and get all the packages we need:</p>

<code>


<pre>
sudo apt-get install php5 php5-dev php-pear make php-getid3 libmagic-dev clamav swftools unrtf poppler-utils catdoc ghostscript tzdata tzdata-java alsa-tools alsa-utils libx11-6 libxext6 libxi6 libxtst6 asoundconf-gtk libfreetype6 libpng12-0 libjpeg62 giflib-tools libsm6 openjdk-6-jdk openoffice.org openoffice.org-headless code2html pstotext
sudo pecl install Fileinfo
sudo pear install http://download.pear.php.net/package/HTTP_WebDAV_Server-1.0.0RC4.tgz
sudo pear install http://download.pear.php.net/package/HTTP_WebDAV_Client-1.0.0.tgz
</pre>


</code>

<p>If you have trouble with the install of the pear modules, probably the version has changed &#8211; you should visit the <a href="http://pear.php.net/packages.php?catpid=11&amp;catname=HTTP"><span class="caps">HTTP </span>packages page</a>.</p>

<h3><span class="caps">JODC</span>onverter</h3>

<p>We also need to get the <span class="caps">JOD</span> Converter. It&#8217;s a few .jar files that we&#8217;ll stick in a directory in /opt. <span class="caps">JODC</span>onverter is the piece that actually manages the conversion process through openoffice.</p>

<code>
cd /opt &amp;&amp; wget http://internap.dl.sourceforge.net/sourceforge/jodconverter/jodconverter-2.2.1.zip &amp;&amp; unzip jodconverter-2.2.1.zip &amp;&amp; mv jodconverter-2.2.1 jodconverter
</code>

<h3>Run OpenOffice as a service</h3>

<p>Long story short, use a version later than 2.3 to avoid problems running it &#8216;headless&#8217;. This is essential for the file conversion process.</p>

<p><em><strong>edit</strong></em>: I realized that the OpenOffice service really needs to be running as www-data, so using an init script like this one is really necessary.</p>

<code>

<pre>
#!/bin/bash
#
# description: Open Office Service
#

export WEBUSER=www-data
export PATH=$PATH
export LANG=en_US.UTF-8

start() {
echo -n &quot;Starting OpenOffice service: &quot;
sudo -u $WEBUSER /opt/openoffice.org3/program/soffice -headless -accept=&quot;socket,host=127.0.0.1,port=8100;urp&quot; -nofirststartwizard &amp; 
echo &quot;OpenOffice Started&quot;
}

stop() {
echo -n &quot;Stopping soffice: &quot;
pkill soffice
echo &quot;OpenOffice Stopped&quot;
}

case &quot;$1&quot; in
start)
start
;;
stop)
stop
;;
status)
status soffice
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $&quot;Usage: $0 {start|stop|restart|reload|status}&quot;
exit 1
esac

exit 0
</pre>

</code>

<p>If you want OpenOffice3 like I&#8217;m using, you might want to remove the 2.4 packages with apt-get remove and go to openoffice.org and download the .deb packages. I installed by extracting the archive, cd&#8217;ing into the folder and using </p>

<pre>sudo dpkg -i *.deb</pre>

<p> and doing the same in the desktop integration folder. I can&#8217;t really <em>recommend</em> using OOo3 because the Ubuntu folks don&#8217;t have it in the repos&#8230;and the <span class="caps">GUI </span>is very crash happy.</p>

<h2>Drupal stuff</h2>

<h3>Clean <span class="caps">URL</span>s</h3>

<p>Pop over to <a href="http://drupal.org/node/134439">the Drupal.org page</a> describing how to set up clean urls if you don&#8217;t have that going already. Clean urls aren&#8217;t necessary, but due to a bug currently in bitcaching &#8211; <strong>it is</strong>.</p>

<h3>Install Drush</h3>

<p>If you aren&#8217;t using the <a href="http://drupal.org/project/drush">Drush module</a>, I <strong>highly</strong> recommend it. Although not related to or necessary for this project, since I discovered it <strong>one day ago</strong>, it&#8217;s become one of my favorite modules. It provides a familiar way to install and update your packages &#8211; and has a number of modules that extend it&#8217;s functionality.</p>


<ul>
<li>Install the Drush module by downloading the tarball to your modules directory (sites/all/modules) and extract it.</li>
<li>Go into your modules page in Drupal and enable the Drush and associated modules. You won&#8217;t be able to turn on the simpletest runner module, that&#8217;s fine. Also &#8211; I wasn&#8217;t able to use the <span class="caps">CVS </span>support, so I have that disabled as well.</li>
</ul>



<p>One last thing &#8211; you need to add a softlink to drush.php somewhere in your path. For me, I just echoed the path variable and picked the place that looked the best&#8230; Make sure you change any paths to whatever works.</p>

<code>

<pre>
% echo $PATH
/home/hopkinsju/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

% ln -s /var/www/drupal/sites/all/modules/drush/drush.php /home/hopkinsju/bin/drush
</pre>

</code>

<p>Now you should be able to type &#8216;drush&#8217; and the computer will know what you&#8217;re talking about.</p>

<h3>Add required modules with Drush</h3>

<p>Now we just do this to get all the modules we need:</p>

<code>
drush pm install bitcache cck dav fileframework rdf views fileserver #FTW!
</code>

<p>Drush will go out and grab the latest version of each module and extract it in your &#8216;sites/all/modules&#8217; directory. </p>

<p><strong><em>note: As of this writing bitcache-alpha3 had a bug in it. Using alpha3 will result in the error &#8220;Fatal error: Unsupported operand types in serverpath/includes/common.inc on line 1546&#8243;. To resolve this, you can use either the <a href="http://drupal.org/node/192590/release">alpha2 or dev versions</a> of the bitcache module</em></strong></p>

<h3>A few other bits</h3>

<p>The File Framework can get metadata for and play flash and mp3 files. You need only add a couple things to the vendor folder of fileframeworks:</p>

<p><strong><em>edit</em></strong>: Using the commands below should get you going without a problem, but I wanted to clarify: You <span class="caps">MUST </span>use the &#8216;slim&#8217; version of the xspf player. Also, the path to getid3 should be /vendor/getid3 &#8211; there should also be a directory /vendor/getid3/getid3 containing the different modules. </p>

<p><strong><em>update</em></strong>: new versions of getID3 and flowplayer as of Mar 18, 2009 &#8211; also you need to make folders for them&#8230;I&#8217;ll update the lines in a bit.<br />
<code>

<pre>
cd /path/to/drupal/sites/all/modules/fileframework/vendor
wget http://voxel.dl.sourceforge.net/sourceforge/getid3/getid3-1.7.9.zip
unzip getid3-1.7.9.zip

wget http://flowplayer.org/releases/flowplayer/flowplayer-3.0.7.zip
unzip flowplayer-3.0.7.zip

wget http://voxel.dl.sourceforge.net/sourceforge/musicplayer/xspf_player_slim-correct-0.2.3.zip
unzip xspf_player_slim-correct-0.2.3.zip
</pre>

</code></p>

<h3>Enable the modules</h3>

<p>Visit your modules page and enable the modules you need. When I first attempted this, I did run into an error where I had enabled one module or another without first enabling the modules it required(I think it was the <span class="caps">RDF API </span>module that needed to be enabled before the File formats). You&#8217;ll want to actually look at what you&#8217;re installing rather that just checking all the boxes of course. But basically &#8211; check all the boxes ;)</p>

<h3>Drupal admin area things</h3>


<ul>
<li>Visit admin/settings/dav/dav_fs and save the page to create the dav directory</li>
<li>Enable <span class="caps">DAV</span> Server in admin/settings/dav</li>
<li>If you want html highlighting for text files admin/settings/file/format/text</li>
<li>Enable antivirus scanning (I chose to run it as a program) admin/settings/file/antivirus</li>
<li>Enable file formats admin/settings/file/format</li>
<li>Go tell the Fileserver that you want it to use the &#8216;Files&#8217; vocab. Doing this will enable automatic creation of file nodes when items are added to that folder via WebDAV.</li>
</ul>



<p><strong>Please post your comments if you can improve on what I&#8217;ve done!</strong> </p>

<p>Happy document managing!</p>]]></content:encoded>
			<wfw:commentRss>http://justin-hopkins.com/blog/2008/12/02/how-to-setting-up-drupal-file-framework-on-ubuntu-810/feed</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>
