<?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>Rafadamar!! &#187; drupal 6</title>
	<atom:link href="http://rafadamar.com/tag/drupal-6/feed/" rel="self" type="application/rss+xml" />
	<link>http://rafadamar.com</link>
	<description>Hate me for who I am not who you think I am.</description>
	<lastBuildDate>Sat, 28 Jan 2012 02:12:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HowTo: Integrate Privatemsg with the Flag and jQuery_Impromptu modules</title>
		<link>http://rafadamar.com/2010/05/howto-integrate-privatemsg-with-the-flag-and-jquery_impromptu-modules/</link>
		<comments>http://rafadamar.com/2010/05/howto-integrate-privatemsg-with-the-flag-and-jquery_impromptu-modules/#comments</comments>
		<pubDate>Thu, 13 May 2010 01:36:19 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://rafadamar.com/?p=97</guid>
		<description><![CDATA[I needed a way for a user to be prompted to send a message to the author of a node after it was flagged. This was my solution. jQuery Impromptu provides a nice way of implementing a pop-up feature. Flag of course flags a node. &#60;?php // Load necessary to avoid error module_load_include('pages.inc','privatemsg'); // Adds [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a way for a user to be prompted to send a message to the author of a node after it was flagged. This was my solution.</p>
<p><a href="http://drupal.org/project/jquery_impromptu">jQuery</a> Impromptu provides a nice way of implementing a pop-up feature.<br />
<a href="http://drupal.org/project/flag">Flag</a> of course flags a node.</p>
<pre class="brush: php">&lt;?php
  // Load necessary to avoid error
  module_load_include('pages.inc','privatemsg');

  // Adds javascript to header
  jquery_impromptu_add();

  // Gets rid of whitespaces that break javascript code
  // drupal_get_form retrieves the privatemsg form
  // $uid is the author of the node
  // $title is the title of the node
  $form = str_replace("\r", '', str_replace("\n", '', drupal_get_form('privatemsg_new', $uid, $title)));

  // javascript that runs jquery_impromptu on flag event
  print '&lt;script language="javascript"&gt;';
  print "
  $(document).bind('flagGlobalAfterLinkUpdate', function(event, data) {
    if(data.flagStatus == 'flagged'){
      $.prompt('$form');
    }
  });
  ";
  print '&lt;/script&gt;';

  // Necessary because previous module_load_include changes title
  drupal_set_title(check_plain($node-&gt;title));
?&gt;
</pre>
<p>For more information on how you can customize the privatemsg form, look here <a href="http://drupal.org/node/624528">http://drupal.org/node/624528</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2010/05/howto-integrate-privatemsg-with-the-flag-and-jquery_impromptu-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Script to Check If a Site is Up</title>
		<link>http://rafadamar.com/2009/11/php-script-to-check-if-a-site-is-up/</link>
		<comments>http://rafadamar.com/2009/11/php-script-to-check-if-a-site-is-up/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 22:10:12 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I needed to develop this script in order to check whether or not my streaming media server was up. At first, I tried to use PHP&#8217;s system function with BASH&#8217;s wget, but that wasn&#8217;t working. I ended up using PHP&#8217;s file_get_contents. &#60;?php function chkuri($link){ //$link is the website which i am checking // If file_get_contents [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to develop this script in order to check whether or not my streaming media server was up. At first, I tried to use PHP&#8217;s system function with BASH&#8217;s wget, but that wasn&#8217;t working. I ended up using PHP&#8217;s file_get_contents.</p>
<pre class="brush:php">
&lt;?php
function chkuri($link){
//$link is the website which i am checking
// If file_get_contents failed to retrieve
// the page, it's not up
  if(!file_get_contents($link)){
    return 'I\'m sorry, but the Ampache server is down. :(';
// It is up
  }else{
    return 'It\'s up! &lt;a href="'.$link.'"&gt;Click here to go!&lt;/a&gt;';
  }
}
print '&lt;h2&gt;'.chkuri('http://martinez.homelinux.org/ampache').'&lt;/h2&gt;';
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/11/php-script-to-check-if-a-site-is-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Essential Drupal 6 Modules</title>
		<link>http://rafadamar.com/2009/11/essential-drupal-6-modules/</link>
		<comments>http://rafadamar.com/2009/11/essential-drupal-6-modules/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 22:03:43 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[These are the modules I find myself installing on almost every Drupal instance I have created. If you want, you can just run the code within the appropriate &#8216;modules&#8217; folder of your Drupal instance. The links will change as time goes on so please take that into account. Content Construction Kit The Content Construction Kit [...]]]></description>
			<content:encoded><![CDATA[<p>These are the modules I find myself installing on almost every Drupal instance I have created. If you want, you can just run the code within the appropriate &#8216;modules&#8217; folder of your Drupal instance. The links will change as time goes on so please take that into account.</p>
<h3><a href="http://drupal.org/project/cck">Content Construction Kit</a></h3>
<p>The Content Construction Kit (CCK) allows you to add custom fields to nodes. CCK is basically what lets you create great custom content-types for your Drupal instance.</p>
<pre class="brush: bash">
wget http://ftp.drupal.org/files/projects/cck-6.x-2.6.tar.gz
tar xfvz cck-6.x-2.6.tar.gz
</pre>
<h3><a href="http://drupal.org/project/date">Date</a></h3>
<p>The Date module comes with an API that allows other modules to use newer PHP date functions. It also adds a nice Date field for use with CCK. The Date module also comes with a pop-up date picker.</p>
<pre class="brush: bash">
wget http://ftp.drupal.org/files/projects/date-6.x-2.4.tar.gz
tar xfvz date-6.x-2.4.tar.gz
</pre>
<h3><a href="http://drupal.org/project/views">Views</a></h3>
<p>Views is an amazing module. A view can be a collection of nodes of a certain type. The view can be displayed as a table, grid, teaser list, full node list, and a RSS feed. There are a number of arguments and variables you an change to make dynamic views.</p>
<pre class="brush:bash">
wget http://ftp.drupal.org/files/projects/views-6.x-2.7.tar.gz
tar xfvz views-6.x-2.7.tar.gz
</pre>
<h3><a href="http://drupal.org/project/wysiwyg">WYSIWYG</a>, <a href="http://drupal.org/project/imce">IMCE</a>, &amp; <a href="http://drupal.org/project/imce_wysiwyg">The Bridge</a></h3>
<p>These three modules combine to form a near perfect WYSIWYG editor. The WYSIWYG module is an API that enables multiple editors to work with Drupal. IMCE is an image/file uploader. The IMCE WYSIWYG Bridge module brings the two together. The Bridge is only compatible with the FCKeditor and TinyMCE WYSIWYG editors, but those two are probably the best ones out there.</p>
<pre class="brush: bash">
wget http://ftp.drupal.org/files/projects/wysiwyg-6.x-2.0.tar.gz; wget http://ftp.drupal.org/files/projects/imce_wysiwyg-6.x-1.0.tar.gz; wget http://ftp.drupal.org/files/projects/imce-6.x-1.3.tar.gz
tar xfvz wysiwyg-6.x-2.0.tar.gz; tar xfvz imce_wysiwyg-6.x-1.0.tar.gz; tar xfvz imce-6.x-1.3.tar.gz
</pre>
<h3><a href="http://drupal.org/project/captcha">CAPTCHA</a> &amp; <a href="http://drupal.org/project/recaptcha">reCAPTCHA</a></h3>
<p>These two modules enable a simple anti-spam measure. You could use CAPTCHA on its own, but I prefer reCAPTCHA simply because it helps digitize books while also preventing spam. You could also use the <a href="http://drupal.org/project/mollom">Mollom module</a> or the <a href="http://drupal.org/project/spam">Spam module</a>.</p>
<pre class="brush: bash">
wget http://ftp.drupal.org/files/projects/captcha-6.x-2.0.tar.gz; wget http://ftp.drupal.org/files/projects/recaptcha-6.x-1.3.tar.gz
tar xfvz captcha-6.x-2.0.tar.gz; tar xfvz recaptcha-6.x-1.3.tar.gz
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/11/essential-drupal-6-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Taxonomy Block on blog page, blog entries, and blog terms</title>
		<link>http://rafadamar.com/2009/11/display-taxonomy-block-on-blog-page-blog-entries-and-blog-terms/</link>
		<comments>http://rafadamar.com/2009/11/display-taxonomy-block-on-blog-page-blog-entries-and-blog-terms/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 03:03:38 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drupal 6]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[You will need to download and install one module and its dependencies for this to work. Download the Advanced Taxonomy Blocks module &#38; install it. In your terminal enter: wget http://ftp.drupal.org/files/projects/taxonomyblocks-6.x-1.8.tar.gz tar xfvz taxonomyblocks-6.x-1.8.tar.gz Repeat for its dependencies. Configure your block Once installed, you can configure Taxonomy blocks. You can do so by going to [...]]]></description>
			<content:encoded><![CDATA[<p>You will need to download and install one module and its dependencies for this to work.</p>
<h3>Download the <a href="http://drupal.org/project/taxonomyblocks">Advanced Taxonomy Blocks module</a> &amp; install it.</h3>
<p>In your terminal enter:</p>
<pre class="brush: bash">
wget http://ftp.drupal.org/files/projects/taxonomyblocks-6.x-1.8.tar.gz
tar xfvz taxonomyblocks-6.x-1.8.tar.gz
</pre>
<p>Repeat for its dependencies.</p>
<h3>Configure your block</h3>
<p>Once installed, you can configure Taxonomy blocks. You can do so by going to your administration page and selecting &#8216;Advanced Taxonomy Blocks configuration&#8217; under the &#8216;Site Configuration&#8217; section.</p>
<h3>Set visibilty settings with PHP</h3>
<p>Now, enable the block you just configured in the Blocks page. For the &#8216;Page specific visibility settings&#8217;, select the PHP-mode. Remember to substitute the vocabulary IDs for the <a href="http://api.drupal.org/api/function/taxonomy_get_tree/6">taxonomy_get_tree function</a>.</p>
<p>Enter the following PHP code:</p>
<pre class="brush: bash">&lt;?php
// If node-&gt;type == blog
if(arg(0) == 'node' &amp;&amp; is_numeric(arg(1))){
  $node = node_load((1))</span>;
    if($node-&gt;type == 'blog'){
      return TRUE;
    }
    // Main blog page
    }else if(arg(0) == 'blog'){
      return TRUE;
    // On tag page that is a blog tag
    }else if(arg(0) == 'taxonomy' &amp;&amp; is_numeric(arg(2))){
      $tid = arg(2);
      $tree1 = taxonomy_get_tree(1);
      $tree2 = taxonomy_get_tree(2);
      foreach($tree1 as $term){
        if($term-&gt;tid == $tid){
          return TRUE;
        }
      }
      foreach($tree2 as $term){
        if($term-&gt;tid == $tid){
         return TRUE;
        }
      }
    }else{
      return FALSE;
    }
  return FALSE;
}
?&gt;
</pre>
<p>If everything&#8217;s working, you should be able to see the taxonomy of the blog page, term pages associated with the blog, and on every blog entry.</p>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/11/display-taxonomy-block-on-blog-page-blog-entries-and-blog-terms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

