<?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>photoaperture &#187; Drupal</title>
	<atom:link href="http://photoaperture.com/blog/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://photoaperture.com/blog</link>
	<description>just another guy&#039;s ramblings</description>
	<lastBuildDate>Mon, 02 Aug 2010 22:05:13 +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>Making a content profile required</title>
		<link>http://photoaperture.com/blog/2010/08/02/making-a-content-profile-required/</link>
		<comments>http://photoaperture.com/blog/2010/08/02/making-a-content-profile-required/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 19:11:27 +0000</pubDate>
		<dc:creator>R.Aubin</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://photoaperture.com/blog/?p=77</guid>
		<description><![CDATA[Quick snippet for login destination module to redirect a user to fill out a profile provided by content_profile module. When a user logs in, if they have not yet created a content profile, they will be directed to the user &#8230; <a href="http://photoaperture.com/blog/2010/08/02/making-a-content-profile-required/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Quick snippet for <a href="http://drupal.org/project/login_destination">login destination module</a> to redirect a user to fill out a profile provided by <a href="http://drupal.org/project/content_profile">content_profile module</a>.</p>
<p>When a user logs in, if they have not yet created a content profile, they will be directed to the user profile page where they can fill one out.</p>
<div id="attachment_78" class="wp-caption aligncenter" style="width: 447px"><a href="http://photoaperture.com/blog/wp-content/uploads/2010/08/Firefox1.png"><img class="size-full wp-image-78" title="login-desintation" src="http://photoaperture.com/blog/wp-content/uploads/2010/08/Firefox1.png" alt="login destination settings" width="437" height="399" /></a><p class="wp-caption-text">settings for login destination</p></div>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$user</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'uid'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uid</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'profile'</span><span style="color: #339933;">,</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// if no profile exists, force user to fill it out</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$node</span> <span style="color: #339933;">=</span> node_load<span style="color: #009900;">&#40;</span><span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'user/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uid</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/edit/profile'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Remember to omit the &lt;?php tags for your code snippet! Also, s<strong>ubstitute the content type</strong> you&#8217;ve designated as a profile node. Here I&#8217;ve used the default type of &#8220;profile&#8221;.</p>
<p><strong>Alternatives</strong></p>
<p>You could also use the <a href="http://drupal.org/project/rules">rules module</a> as outlined in content profile&#8217;s readme.txt. It contains integration for Rules module and performs a similar function as this snippet.</p>
<p>For my purposes, I didn&#8217;t want to install another module to provide functionality that could be achieved with a module I was already using.</p>
]]></content:encoded>
			<wfw:commentRss>http://photoaperture.com/blog/2010/08/02/making-a-content-profile-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bookmarklet: Collapse all Fieldsets in Drupal Module Page</title>
		<link>http://photoaperture.com/blog/2009/06/01/bookmarklet-collapse-all-fieldsets-in-drupal-module-page/</link>
		<comments>http://photoaperture.com/blog/2009/06/01/bookmarklet-collapse-all-fieldsets-in-drupal-module-page/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 21:22:43 +0000</pubDate>
		<dc:creator>R.Aubin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://photoaperture.com/blog/?p=21</guid>
		<description><![CDATA[Why do I need it? This is a quick and easy way to clear the clutter on your Modules page in Drupal. One of the sites I&#8217;ve recently worked on easily had over 30 modules that were grouped in 10-12 &#8230; <a href="http://photoaperture.com/blog/2009/06/01/bookmarklet-collapse-all-fieldsets-in-drupal-module-page/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2><span style="font-weight: normal;">Why do I need it?</span></h2>
<p><span style="font-weight: normal;">This is a quick and easy way to clear the clutter on your Modules page in Drupal. One of the sites I&#8217;ve recently worked on easily had over 30 modules that were grouped in 10-12 fieldsets on the modules page in Drupal. When developing, sometimes you need to toggle modules and finding them in the mess can be difficult. (Of course, you can always just search the page. I&#8217;m too lazy.)</span></p>
<p>This bookmarklet lets you click one link, provided you&#8217;ve added it to your browser&#8217;s toolbar and quickly clean up the clutter the page.</p>
<h2><span style="font-weight: normal;">Give me what I came for!</span></h2>
<p>If you already know what a bookmarklet is and know how to use one, I&#8217;ll get right to it.</p>
<p><span style="font-family: -webkit-monospace;">javascript:function collapseEm(){$(&#8216;.collapsible&#8217;).addClass(&#8216;collapsed&#8217;);}collapseEm();</span></p>
<h2><span style="font-weight: normal;">How to use it</span></h2>
<p><span style="font-weight: normal;">Easy. Copy the code, create a new bookmark and paste it in. When you click your new bookmark, the fieldsets should collapse.</span></p>
<h2><span style="font-weight: normal;">It isn&#8217;t working for me</span></h2>
<p>First, it requires jQuery, which should already be installed with Drupal. If for some reason you don&#8217;t have that, it won&#8217;t work.</p>
<p>Second, I use it in Firefox on the Mac. Let me know what browser you&#8217;re using if it doesn&#8217;t work.</p>
<h2><span style="font-weight: normal;">There&#8217;s really nothing to it</span></h2>
<p><span style="font-weight: normal;">I know. It isn&#8217;t complicated and you probably could have thought of it yourself. Hopefully it saves someone some time who wouldn&#8217;t have or couldn&#8217;t have. </span></p>
]]></content:encoded>
			<wfw:commentRss>http://photoaperture.com/blog/2009/06/01/bookmarklet-collapse-all-fieldsets-in-drupal-module-page/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
