<?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>Mohanjith&#039;s Blog &#187; Drupal</title> <atom:link href="http://mohanjith.net/blog/topics/drupal/feed" rel="self" type="application/rss+xml" /><link>http://mohanjith.net/blog</link> <description>MOHA blogging news and thoughts...</description> <lastBuildDate>Wed, 14 Dec 2011 14:18:18 +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>Hacking drupal: Add search by node creation date and the author</title><link>http://mohanjith.net/blog/2008/03/hacking-drupal-add-search-by-node.html</link> <comments>http://mohanjith.net/blog/2008/03/hacking-drupal-add-search-by-node.html#comments</comments> <pubDate>Wed, 12 Mar 2008 21:06:00 +0000</pubDate> <dc:creator>S H Mohanjith</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[hacking]]></category><guid
isPermaLink="false">http://mohanjith.net/wordpress/?p=53</guid> <description><![CDATA[TweetSome of the users using one of my Drupal sites were asking for search by author and creation date. The site had 3000+ nodes and the user&#8217;s request seemed reasonable enough. I first started with googling for a Drupal module or a patch that would add the functionality, but none were found. So when ahead [...]]]></description> <content:encoded><![CDATA[<p><span
style="float: right; margin: 5px 0px 0px 5px;" ><a
class="twitter-share-button"  data-via="mohanjith" data-count="vertical" data-related="" data-lang="en" data-url="http://mohanjith.net/blog/2008/03/hacking-drupal-add-search-by-node.html" data-text="Hacking drupal: Add search by node creation date and the author" href="http://twitter.com/share?via=mohanjith&#038;count=vertical&#038;related=&#038;lang=en&#038;url=http%3A%2F%2Fmohanjith.net%2Fblog%2F2008%2F03%2Fhacking-drupal-add-search-by-node.html&#038;text=Hacking%20drupal%3A%20Add%20search%20by%20node%20creation%20date%20and%20the%20author" >Tweet</a></span>Some of the users using one of my Drupal sites were asking for search by author and creation date. The site had 3000+ nodes and the user&#8217;s request seemed reasonable enough. I first started with googling for a Drupal module or a patch that would add the functionality, but none were found.</p><p>So when ahead and hacked the node module. I sucessfully managed to add search by author and node creation date to advanced search block. If you are in searching for a patch like I did you can find it at <a
href="http://drupal.org/node/233476">http://drupal.org/node/233476</a>, I&#8217;m keeping my fingers crossed to see whether it would make it to the Drupal trunk <img
src='http://cdn.mohanjith.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p><div
id="fb-like" style=""><iframe
src="http://www.facebook.com/plugins/like.php?href=http://mohanjith.net/blog/2008/03/hacking-drupal-add-search-by-node.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:30px"></iframe></div>]]></content:encoded> <wfw:commentRss>http://mohanjith.net/blog/2008/03/hacking-drupal-add-search-by-node.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Filter module support for Premium module</title><link>http://mohanjith.net/blog/2008/03/filter-module-support-for-premium.html</link> <comments>http://mohanjith.net/blog/2008/03/filter-module-support-for-premium.html#comments</comments> <pubDate>Sat, 08 Mar 2008 14:48:00 +0000</pubDate> <dc:creator>S H Mohanjith</dc:creator> <category><![CDATA[Drupal]]></category> <category><![CDATA[Premium]]></category><guid
isPermaLink="false">http://mohanjith.net/wordpress/?p=50</guid> <description><![CDATA[TweetThere was a need to put a log in link with destination get variable set if the user is not authenticated and trying to view a premium node. The obvious place to put such content is the &#8220;Premium body text&#8221; in /admin/settings/premium, however one problem was that &#8220;Premium body text&#8221; can only static html, no [...]]]></description> <content:encoded><![CDATA[<p><span
style="float: right; margin: 5px 0px 0px 5px;" ><a
class="twitter-share-button"  data-via="mohanjith" data-count="vertical" data-related="" data-lang="en" data-url="http://mohanjith.net/blog/2008/03/filter-module-support-for-premium.html" data-text="Filter module support for Premium module" href="http://twitter.com/share?via=mohanjith&#038;count=vertical&#038;related=&#038;lang=en&#038;url=http%3A%2F%2Fmohanjith.net%2Fblog%2F2008%2F03%2Ffilter-module-support-for-premium.html&#038;text=Filter%20module%20support%20for%20Premium%20module" >Tweet</a></span>There was a need to put a log in link with destination get variable set if the user is not authenticated and trying to view a premium node. The obvious place to put such content is the &#8220;Premium body text&#8221; in /admin/settings/premium, however one problem was that &#8220;Premium body text&#8221; can only static html, no filters/format.</p><p>I couldn&#8217;t quite believe why filter module was not being made use of there, so I went ahead an made the necessary changes to make it possible to select the filter/format to be applied to &#8220;Premium body text&#8221;. The patch will add a Input format section to the settings form, that filter chosen there will be applied when the &#8220;Premium body text&#8221; is rendered into a node.</p><p>You can see the progress of the patch submitted to drupal.org at <a
href="http://drupal.org/node/231641">http://drupal.org/node/231641</a>. I just hope the patch will make it to the premium module head. The development of the premium module is nearly stagnant <img
src='http://cdn.mohanjith.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> , that conserns me.</p><div
id="fb-like" style=""><iframe
src="http://www.facebook.com/plugins/like.php?href=http://mohanjith.net/blog/2008/03/filter-module-support-for-premium.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:30px"></iframe></div>]]></content:encoded> <wfw:commentRss>http://mohanjith.net/blog/2008/03/filter-module-support-for-premium.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Drupal Atom module spits invalid xml</title><link>http://mohanjith.net/blog/2008/03/drupal-atom-module-spits-invalid-xml.html</link> <comments>http://mohanjith.net/blog/2008/03/drupal-atom-module-spits-invalid-xml.html#comments</comments> <pubDate>Mon, 03 Mar 2008 14:39:00 +0000</pubDate> <dc:creator>S H Mohanjith</dc:creator> <category><![CDATA[Atom]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[Feed]]></category><guid
isPermaLink="false">http://mohanjith.net/wordpress/?p=48</guid> <description><![CDATA[TweetDrupal Atom module is spitting invalid XML in some cases. It is obvious that all user generated text in XML should be either escaped or appear within CDATA section. However it is not the case with title and subtitle sections. If the site title contains &#8220;&#038;&#8221;, then the atom/feed will guaranteed to be invalid. I [...]]]></description> <content:encoded><![CDATA[<p><span
style="float: right; margin: 5px 0px 0px 5px;" ><a
class="twitter-share-button"  data-via="mohanjith" data-count="vertical" data-related="" data-lang="en" data-url="http://mohanjith.net/blog/2008/03/drupal-atom-module-spits-invalid-xml.html" data-text="Drupal Atom module spits invalid xml" href="http://twitter.com/share?via=mohanjith&#038;count=vertical&#038;related=&#038;lang=en&#038;url=http%3A%2F%2Fmohanjith.net%2Fblog%2F2008%2F03%2Fdrupal-atom-module-spits-invalid-xml.html&#038;text=Drupal%20Atom%20module%20spits%20invalid%20xml" >Tweet</a></span>Drupal Atom module is spitting invalid XML in some cases. It is obvious that all user generated text in XML should be either escaped or appear within <a
href="http://en.wikipedia.org/wiki/CDATA#CDATA_sections_in_XML">CDATA</a> section. However it is not the case with title and subtitle sections. If the site title contains &#8220;&#038;&#8221;, then the atom/feed will guaranteed to be invalid.</p><p>I came across this the hard way, in one of the sites I was maintaining someone decided that they need &#8220;&#038;&#8221; in the title, then the atom/feed was giving a XML parser error. After little bit of head scratching, I was able to triangulate the buggy piece of code.</p><p>You can read the progress of the issue at <a
href="http://drupal.org/node/229392">http://drupal.org/node/229392</a>, you can download the patch from the same.</p><p>Hope I saved someone from much head scratching and frustrations.</p><div
id="fb-like" style=""><iframe
src="http://www.facebook.com/plugins/like.php?href=http://mohanjith.net/blog/2008/03/drupal-atom-module-spits-invalid-xml.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:30px"></iframe></div>]]></content:encoded> <wfw:commentRss>http://mohanjith.net/blog/2008/03/drupal-atom-module-spits-invalid-xml.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Running Drupal behind a reverse proxy</title><link>http://mohanjith.net/blog/2008/02/running-drupal-behind-reverse-proxy.html</link> <comments>http://mohanjith.net/blog/2008/02/running-drupal-behind-reverse-proxy.html#comments</comments> <pubDate>Sun, 10 Feb 2008 01:31:00 +0000</pubDate> <dc:creator>S H Mohanjith</dc:creator> <category><![CDATA[Apache HTTP Server]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[proxy]]></category><guid
isPermaLink="false">http://mohanjith.net/wordpress/?p=41</guid> <description><![CDATA[TweetI was supposed to move one of the Drupal sites I&#8217;m maintaining behind a Reverse Proxy. The migration was smooth as it could get, but soon throttiling was an issue. All requests were coming from the Proxy server, and Drupal didn&#8217;t seem to automagically detect the client IP based on the X-Forwarded-For header. So I [...]]]></description> <content:encoded><![CDATA[<p><span
style="float: right; margin: 5px 0px 0px 5px;" ><a
class="twitter-share-button"  data-via="mohanjith" data-count="vertical" data-related="" data-lang="en" data-url="http://mohanjith.net/blog/2008/02/running-drupal-behind-reverse-proxy.html" data-text="Running Drupal behind a reverse proxy" href="http://twitter.com/share?via=mohanjith&#038;count=vertical&#038;related=&#038;lang=en&#038;url=http%3A%2F%2Fmohanjith.net%2Fblog%2F2008%2F02%2Frunning-drupal-behind-reverse-proxy.html&#038;text=Running%20Drupal%20behind%20a%20reverse%20proxy" >Tweet</a></span>I was supposed to move one of the <a
href="http://drupal.org">Drupal</a> sites I&#8217;m maintaining behind a Reverse Proxy. The migration was smooth as it could get, but soon throttiling was an issue. All requests were coming from the Proxy server, and Drupal didn&#8217;t seem to automagically detect the client IP based on the X-Forwarded-For header.</p><p>So I set about investigating what can be done. As I <a
href="http://drupal.org/node/173408">discovered</a>, automagic client IP detection is only available in Drupal 6 (At the time of writing, under development). I went about porting the changes to Drupal 5.x. Porting was as easy as it can be, but it was not working.</p><p>Further investigation lead to one of the site configurations; I had enabled Normal Caching in the Drupal site. It was not acceptable to switch off caching, so I went about debugging this code to make it work with caching enabled. Finally I was able to fix the issue, it was trivial but it was not easy to debug. The fix involved removing cached IP address for every request such that the correct IP will be detected. See my patch in drupal.org at <a
href="http://drupal.org/node/219825">http://drupal.org/node/219825</a>.</p><p>Hope this helps someone.</p><div
id="fb-like" style=""><iframe
src="http://www.facebook.com/plugins/like.php?href=http://mohanjith.net/blog/2008/02/running-drupal-behind-reverse-proxy.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:30px"></iframe></div>]]></content:encoded> <wfw:commentRss>http://mohanjith.net/blog/2008/02/running-drupal-behind-reverse-proxy.html/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic (User agent is rejected)
Database Caching 16/19 queries in 0.012 seconds using memcached
Object Caching 0/0 objects using memcached
Content Delivery Network via cdn.mohanjith.net

Served from: mohanjith.net @ 2012-05-30 08:41:27 -->
