<?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>Public MindDrupal</title>
	<atom:link href="http://publicmind.in/blog/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://publicmind.in/blog</link>
	<description>Simple and Sophisticated</description>
	<lastBuildDate>Fri, 27 May 2011 08:28:30 +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>Drupal: Facebook-style Micropublisher v1.1 released</title>
		<link>http://publicmind.in/blog/drupal-facebook-style-micropublisher-v1-1-released/</link>
		<comments>http://publicmind.in/blog/drupal-facebook-style-micropublisher-v1-1-released/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 15:37:01 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[fbsmp]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=752</guid>
		<description><![CDATA[After four months of relatively slow development of Facebook-style Micropublisher (FBSMP), I am happy to tag the branch with 6.x-1.1 release. It might be the last release for this branch, as I would now be upgrading FBSMP to support the latest 6.x-3.x branch of Facebook-style Statuses. A lot of cool features are coming up with [...]]]></description>
			<content:encoded><![CDATA[<p>After four months of relatively slow development of <a href="http://dgo.to/fbsmp">Facebook-style Micropublisher (FBSMP)</a>, I am happy to tag the branch with 6.x-1.1 release. It might be the last release for this branch, as I would now be upgrading FBSMP to support the latest 6.x-3.x branch of <a href="http://dgo.to/facebook_status">Facebook-style Statuses</a>.</p>
<p>A lot of cool features are coming up with this release especially in the beloved link plugin,</p>
<ol>
<li>link plugin: allow users to share links to audio sharing sites such as soundcloud, 8tracks.</li>
<li>Repost the attachments along with status (similar to re-share and re-tweet functionality), supported by link and photo plugin.</li>
<li>link plugin: inline editing of title and description, cool JS.</li>
<li>link plugin: edit the title and description field of the attachment.</li>
<li>Support for processing GET parameters in the URL.</li>
<li>link plugin now allows to share the URL using the <strong>flink</strong> GET parameter. <a href="http://drupal.org/node/883334#bookmarklet"><em>More&#8230;</em></a></li>
</ol>
<p>The complete list of features and bug fixes can be found in the <a href="http://drupal.org/node/1136442"><em>release notes</em></a>.</p>
<p>I hope you enjoy creating amazing sites using the new features and share them here for the world to know how cool this module is <img src='http://publicmind.in/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/drupal-facebook-style-micropublisher-v1-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code 2011 Announced</title>
		<link>http://publicmind.in/blog/google-summer-of-code-2011-announced/</link>
		<comments>http://publicmind.in/blog/google-summer-of-code-2011-announced/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 17:08:03 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Nitin's Blog]]></category>
		<category><![CDATA[gsoc]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=733</guid>
		<description><![CDATA[Do you feel passionate about any open source technology? Or you want to explore one during your summer vacations? On the top of it, if you get a mentor to guide you all along and a stipend of 5000 USD, would you be interested? Yeah! Keep reading then. Google announced its consecutive 7th year for Summer [...]]]></description>
			<content:encoded><![CDATA[<p>Do you feel passionate about any open source technology? Or you want to explore one during your summer vacations? On the top of it, if you get a mentor to guide you all along and a stipend of 5000 USD, would you be interested? Yeah! Keep reading then.</p>
<div id="attachment_741" class="wp-caption alignright" style="width: 208px"><a href="http://publicmind.in/blog/wp-content/uploads/2011/02/GSoC2011_198x128.png"><img class="size-full wp-image-741" title="GSoC 2011" src="http://publicmind.in/blog/wp-content/uploads/2011/02/GSoC2011_198x128.png" alt="GSoC 2011 " width="198" height="128" /></a><p class="wp-caption-text">GSoC 2011</p></div>
<p>Google announced its consecutive 7th year for Summer of Code program on January 24, 2011. Google Summer of Code program encourages students from all over the world to engage in open source project development of their choice for 3 months.</p>
<p>Look out for the details of the program here: <a href="http://socghop.appspot.com/">http://socghop.appspot.com/</a> and the timeline: <a href="http://www.google-melange.com/document/show/gsoc_program/google/gsoc2011/timeline">http://www.google-melange.com/document/show/gsoc_program/google/gsoc2011/timeline</a></p>
<p><span id="more-733"></span>Although the applications for students will be accepted only after 28th March, here are a few tips that might help you:</p>
<ol>
<li> Accepted list of organizations will be announced on 18th March, but it is expected to remain almost similar to the last year. So you should find out more about the organizations before hand (<a href="http://socghop.appspot.com/gsoc/program/accepted_orgs/google/gsoc2010">http://socghop.appspot.com/gsoc/program/accepted_orgs/google/gsoc2010</a>).</li>
<li>If you feel passionate about an organization/technology or even a bit interested, get in touch with people on respected forums/IRC. It will let you know more about the organization, expectations from the program and in certain cases, you are expected to submit patches/code which is reviewed before your application is accepted by an organization. Moreover if you are really interested then start contributing now, and everybody will know you when you finally apply for the program.</li>
<li>If you have an idea, put it forward asap. Try to put as much details as possible or even a proof of concept. Even if your idea is rejected by the community, you know it before the GSoC program even starts. And if you get support for it, there are much more chances that your project will be selected by the organization. A win-win situation for you, isn&#8217;t that amazing!!!</li>
<li>Don&#8217;t be disheartened if you do not have an idea (most of us don&#8217;t). Many organizations will publish a list of ideas, which they want the potential GSoC students to work on. Make sure you research a lot, take part in discussion on forums on the idea before submitting your application. If possible set up a personal repository, code something and provide a link to it with your application. This will not only show that you are interested in the project but will also showcase your coding skills.</li>
<li>Do not forget to follow the coding practices if published by the organization or common guidelines which will make your code more legible. <a href="http://drupal.org/coding-standards">http://drupal.org/coding-standards</a></li>
<li>Last, communicate yourself properly. As you would be working online for 3 months, and mostly you &amp; your mentor will be interacting online, try not to be confusing while explaining yourself in writing. <a href="http://www.codinghorror.com/blog/2011/02/how-to-write-without-writing.html">http://www.codinghorror.com/blog/2011/02/how-to-write-without-writing.html</a></li>
</ol>
<p>I will go over the list of reasons on why you should apply for the program in short. You get to work on what you like and you get paid for that. You will also meet a lot of interesting and intelligent people and will be amazed how helpful they are to your silly questions. Last but not the least, you will have something big on your CV after college, NICE.</p>
<p>If you are looking for inspiration, you can go through this discussion which I started when I was about to apply for the program last year: <a href="http://groups.drupal.org/node/57743">http://groups.drupal.org/node/57743</a>. I received a lot of suggestions and criticism which mostly turned into features for the project: <a href="http://drupal.org/project/fbsmp">http://dupal.org/project/fbsmp</a>.</p>
<p>I am proud to be a Google Summer of Code student, would you like to be next?</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/google-summer-of-code-2011-announced/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Drupal: Facebook-style Micropublisher</title>
		<link>http://publicmind.in/blog/drupal-facebook-style-micropublisher/</link>
		<comments>http://publicmind.in/blog/drupal-facebook-style-micropublisher/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 19:02:18 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbsmp]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=625</guid>
		<description><![CDATA[After months of hard work and support from Isaac and Thomas, I am proud to announce the first stable release of Facebook-style Micropublisher (FBSMP). FBSMP allows user to share content such as links, videos, photos and documents along with their Facebook-style Statuses. It allows you to create a social networking site similar to Twitter, Facebook, [...]]]></description>
			<content:encoded><![CDATA[<p>After months of hard work and support from <a href="http://drupal.org/user/201425">Isaac</a> and <a href="http://drupal.org/user/167047">Thomas</a>, I am proud to announce the first stable release of <a href="http://dgo.to/fbsmp">Facebook-style Micropublisher</a> (FBSMP). <a href="http://dgo.to/fbsmp">FBSMP</a> allows user to share content such as links, videos, photos and documents along with their <a href="http://dgo.to/facebook_status">Facebook-style Statuses</a>. It allows you to create a social networking site similar to <a href="http://twitter.com">Twitter</a>, <a href="http://facebook.com">Facebook</a>, <a href="http://google.com/buzz">Google Buzz</a> and others out-of-the-box. On the top, it integrates with a lot of other Drupal modules (as Activity, Trigger, Rules, Heartbeat, ImageCache, EmVideo, UserPoints, and more) which lets you do a lot more things with your website.</p>
<p><strong>What&#8217;s in the box</strong><br />
As of today, FBSMP supports the following features:</p>
<ul>
<li>Attaches content using AHAH which keeps everything smooth.</li>
<li>Publishes links, photos, videos, documents (ppt, doc, pptx, odt, etc) out of the box.</li>
<li>Extensible to publish any kind of content.</li>
<li>Integration with <a href="http://dgo.to/activity">Activity 2</a>, <a href="http://dgo.to/rules">Rules</a>, <a href="http://dgo.to/heartbeat">Heartbeat</a>, Triggers/Actions, Input Filters, <a href="http://dgo.to/views">Views</a>, <a href="http://dgo.to/imagecache">ImageCache</a>, Token, <a href="http://dgo.to/appbar">Application Toolbar</a>(Appbar), Emvideo, Userpoints (through Rules), SlideShare.net API and more.</li>
<li>Extensive developer API (including hooks) and theming methods.</li>
</ul>
<p>It is difficult for me to elaborate on all the plugins (a plugin allows to publish one kind of content, for example Link plugin allows you to share your favorite links, Photo plugin allows you to share images on your site.), so you will have to explore them yourself. You can look at the documentation here: <a href="http://drupal.org/node/876500">http://drupal.org/node/876500</a></p>
<p><strong>How to get involved</strong></p>
<ul>
<li>Play with it and share your site creativity here in the comments</li>
<li>Write about this module so other folks can find it (<a href="http://drupalmodules.com/module/facebook-style-micropublisher">http://drupalmodules.com/module/facebook-style-micropublisher</a>)</li>
<li>Report bugs or help in the support issues queue (<a href="http://drupal.org/project/issues/fbsmp">http://drupal.org/project/issues/fbsmp</a>)</li>
</ul>
<p>Enjoy it with your holidays, wish you all a Merry Christmas and a great year ahead.</p>
<p><strong>Note:</strong> Feature and Support requests should be made through the Facebook-style Micropublisher <a href="http://drupal.org/project/issues/fbsmp">Forum</a>. I may not be able to answer them here.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/drupal-facebook-style-micropublisher/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal: Facebook-style Micropublisher Preview</title>
		<link>http://publicmind.in/blog/fbsmp_preview/</link>
		<comments>http://publicmind.in/blog/fbsmp_preview/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 16:17:07 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbsmp]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=687</guid>
		<description><![CDATA[I worked on the module Facebook-style Micropublisher (FBSMP) for Drupal, this summer as part of the Google Summer of Code program mentored by Isaac Sukin. This module lets users publish content (links, images, videos and documents) in a stream, along with their Facebook-style Statuses (like on Facebook, or Twitter). When I say that I worked [...]]]></description>
			<content:encoded><![CDATA[<p>I worked on the module <a href="http://dgo.to/fbsmp" target="_blank">Facebook-style Micropublisher</a> (FBSMP) for Drupal, this summer as part of the <a href="http://socghop.appspot.com/" target="_blank">Google Summer of Code</a> program mentored by <a href="http://drupal.org/user/201425" target="_blank">Isaac Sukin</a>. This module lets users publish content (links, images, videos and documents) in a stream, along with their <a rel="nofollow" href="http://drupal.org/project/facebook_status">Facebook-style Statuses</a> (like on Facebook, or Twitter). When I say that I worked on it as part of GSoC, it would be only partly true. I started working on it around March 2010, when I was contacted by <a href="http://drupal.org/user/167047" target="_blank">Thomas</a> to create a Drupal module for his site which would imitate the link share feature from Facebook, Google Buzz. I wrote the small module <a href="http://dgo.to/facebook_link" target="_blank">Facebook-style Links</a>, which worked quite well but it was then this occurred to me, &#8220;why not create a module which can publish any content, which is extensible to publish any kind of content like images, links, videos, documents, audio, etc&#8221;.</p>
<p>Today, I am happy to say that Drupal now has a complete Micropublisher which can be used to create any kind of microblogging platform such as <a href="http://facebook.com" target="_blank">Facebook</a>, Google Buzz, <a href="http://twitter.com" target="_blank">Twitter</a>, etc. I will be posting the first release of the module soon, but before here is the small list of features and a few screenshots.<span id="more-687"></span></p>
<p>Among a lot of other features, Facebook-style Micropublisher :</p>
<ol>
<li>Publish links, photos, videos, documents (ppt, doc, pptx, odt, etc) out of the box.</li>
<li>Attaches content using AJAX which keeps everything smooth.</li>
<li>Extensible to publish any kind of content.</li>
<li>Integration with a lot of other modules, such as:
<ul>
<li><a href="http://dgo.to/activity" target="_blank">Activity</a>, <a href="http://dgo.to/heartbeat" target="_blank">Heartbeat</a>: Create a stream of your statuses, or log messages or status posts/delete.</li>
<li><a href="http://dgo.to/emfield" target="_blank">Emfield</a>/Emvideo: Post links directly from YouTube, Google Video, Dailymotion, and others.</li>
<li><a href="http://dgo.to/lightbox2" target="_blank">LightBox2</a>: Create slideshows for your photos and videos (from youtube, etc or directly posted).</li>
<li><a href="http://slideshare.net" target="_self">SlideShare.net</a>: Post documents such pptx, ppt, docs and pdf.</li>
</ul>
</li>
<li>Extensive API (good news for developers) and theme overrides (never forget the designers).</li>
</ol>
<p>I am posting a few screenshots of the module, which will soon have a stable release. Till then, you can download the development build and play with it (which will be actually the stable release in a few days) and report issues if any or just enjoy the module.</p>
<p>(Click on the images to see full view in a ThickBox)</p>

<div class="ngg-galleryoverview" id="ngg-gallery-1-687">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/share_form.png" title="Staus update form" class="thickbox" rel="set_1" >
								<img title="Staus update form" alt="Staus update form" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_share_form.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/share_form_hover.png" title="Status update form - hover over icons" class="thickbox" rel="set_1" >
								<img title="Status update form - hover over icons" alt="Status update form - hover over icons" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_share_form_hover.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-4" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/post_link.png" title="Post Link form" class="thickbox" rel="set_1" >
								<img title="Post Link form" alt="Post Link form" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_post_link.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/attach_link.png" title="Share the links you love." class="thickbox" rel="set_1" >
								<img title="Post a link" alt="Post a link" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_attach_link.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-7" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/posted_link.png" title="Link as appears in the status stream, can be easily themed to look as nice as you want." class="thickbox" rel="set_1" >
								<img title="Posted Link" alt="Posted Link" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_posted_link.png" width="100" height="74" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-5" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/post_photo.png" title="Post photo form" class="thickbox" rel="set_1" >
								<img title="Post photo form" alt="Post photo form" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_post_photo.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-8" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/posted_photo.png" title="A photo as it appears in the stream along with your status" class="thickbox" rel="set_1" >
								<img title="Posted Photo" alt="Posted Photo" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_posted_photo.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-6" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/post_youtube_link.png" title="Post links from video sites as YouTube" class="thickbox" rel="set_1" >
								<img title="Post links from video sites as YouTube" alt="Post links from video sites as YouTube" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_post_youtube_link.png" width="100" height="74" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-9" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/posted_youtube_video.png" title="Yes, just click on the thumbnail and it will be replaced with your video from Youtube, etc" class="thickbox" rel="set_1" >
								<img title="Embeded YouTube Video" alt="Embeded YouTube Video" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_posted_youtube_video.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-10" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/post_document.png" title="You can let your site users to share documents as well." class="thickbox" rel="set_1" >
								<img title="Post Documents" alt="Post Documents" src="http://publicmind.in/blog/wp-content/gallery/fbsmp_screenshots/thumbs/thumbs_post_document.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/fbsmp_preview/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Facebook: Bug with URL encoding</title>
		<link>http://publicmind.in/blog/facebook-bug-with-url-encoding/</link>
		<comments>http://publicmind.in/blog/facebook-bug-with-url-encoding/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 05:33:48 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Nitin's Blog]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbsl]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=548</guid>
		<description><![CDATA[Today, while I was working on the URL encoding for the recently released Facebook-style Links module, I realized a bug with Link Attachments feature on Facebook. Before I explain, let us reproduce it: Try to attach the following link on Facebook: http://google.com/search?q=blenders%26pride. This URL actually queries Google for &#8216;blenders&#038;pride&#8217;. Facebook converts/encodes the above URL to [...]]]></description>
			<content:encoded><![CDATA[<p>Today, while I was working on the URL encoding for the recently released <a href="http://publicmind.in/blog/drupal-facebook-link">Facebook-style Links</a> module, I realized a bug with Link Attachments feature on Facebook. Before I explain, let us reproduce it:</p>
<p>Try to attach the following link on Facebook: <a href="http://google.com/search?q=blenders%26pride">http://google.com/search?q=blenders%26pride</a>. This URL actually queries Google for &#8216;blenders&#038;pride&#8217;. Facebook converts/encodes the above URL to <a href="http://google.com/search?q=blenders&#038;pride">http://google.com/search?q=blenders&#038;pride </a> which is not the same as above and queries Google for just &#8216;blenders&#8217;.</p>
<p>So, why Facebook does this? Probably Facebook tries to encode the URL to remove the characters which are not allowed by RFC 3986 and replaces them with their percent encoding. But there are certain characters which should not be encoded, such as &#8216;/&#8217;, &#8216;?&#8217;, &#8216;#&#8217;, &#8216;@&#8217; which are the reserved characters and used as delimiters in the URL. So, it decodes these characters and converts their encoding to the original character which gives rise to the problem. Let us see an example:<br />
<span id="more-548"></span><br />
&#8216;<a href="http://google.com/search?q= %2B">http://google.com/search?q= %2B</a>&#8216; is first encoded to replace unwanted character with their percent encoding, turns into &#8216;http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3D%20%2B&#8217;. (Note: I assume that already encoded characters are not encoded again in order to reproduce the bug, i.e.%2B does not gets converted to %252B). Then, the reserved characters (/,:,?,=,@,+) must be decoded again, therefore it gets converted to &#8216;<a href="http://google.com/search?q=%20+">http://google.com/search?q=%20+</a>&#8216; which as we see is not the same. It ideally should have been &#8216;http://google.com/search?q=%20%2B&#8217;.</p>
<p>I have already reported it in the bugs on Facebook. I will like to hear your views on URL encoding. Do you consider this as bug? Why does such URLs are not properly formatted at source making lives of developers difficult? Why does URLs with spaces and other disallowed characters exists?</p>
<p>Enjoy.</p>
<p><strong>Related Resources:</strong></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Percent-encoding">http://en.wikipedia.org/wiki/Percent-encoding</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/facebook-bug-with-url-encoding/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Drupal: Tutorial for Feeds Image Grabber</title>
		<link>http://publicmind.in/blog/tutorial-for-feeds-image-grabber/</link>
		<comments>http://publicmind.in/blog/tutorial-for-feeds-image-grabber/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 04:45:43 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[fig]]></category>
		<category><![CDATA[imagegrabber]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=529</guid>
		<description><![CDATA[Feeds Image Grabber (FIG) was released on 3rd March, and currently supports the following features: Automatically downloads and attaches image to the node created by Feeds module. Configurable XPath of the desired image location on the webpage of the feed item on per feed basis (using element&#8217;s id or CSS class). Support for FileField Paths module. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://drupal.org/project/feeds_imagegrabber">Feeds Image Grabber</a> (FIG) was released on 3rd March, and currently supports the following features:</p>
<ol>
<li>Automatically downloads and attaches image to the node created by Feeds module.</li>
<li>Configurable XPath of the desired image location on the webpage of the feed item on per feed basis (using element&#8217;s id or CSS class).</li>
<li>Support for <a href="http://drupal.org/project/filefield_paths">FileField Paths</a> module.</li>
<li>Configurable maximum image size.</li>
<li>Configurable minimum and maximum image resolutions.</li>
</ol>
<p>In this post, I will briefly demonstrate how to configure the settings for FIG to efficiently grab images for feed items.<br />
<span id="more-529"></span><br />
<strong>Image Field Settings:</strong></p>
<p>Feeds module will create nodes from feed-items of content type as chosen in the FeedsNodeProcessor settings. FIG will store the image grabbed in an image field attached to the node of this content type. Therefore, you must add an image field to this content type. For example, if the content type of feed-items is <em>story</em>, you need to go to <em>admin &gt; content types &gt; story &gt; manage fields</em> and add a field of type <em>File</em> and widget <em>Image</em>. (<a href="http://drupal.org/node/609628">http://drupal.org/node/609628</a>)</p>
<p>Configure the settings of the image field, such as extensions, minimum and maximum resolution, maximum size, etc. While grabbing the image, FIG will automatically take into consideration the settings of the image field to which the downloaded image will be mapped.</p>
<p><strong>Mapping Settings:</strong></p>
<p>Now, you must go to the mapping settings for the <em>Node Processor</em> of the <em>Feed Importer </em>and map <em>Item URL (Link) </em>to one of the available imagefields which are appended by &#8220;<em>(FIG)</em>&#8220;.</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 692px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/03/target-mappings.jpg"><img class="size-full wp-image-530" title="target-mappings" src="http://publicmind.in/blog/wp-content/uploads/2010/03/target-mappings.jpg" alt="Mapping Settings" width="682" height="427" /></a><p class="wp-caption-text">Mapping for Node Processor</p></div>
<p><strong>Feeds Image Grabber Settings:</strong></p>
<p>After enabling FIG and configuring the above settings, you will see the following additional form whenever you create or edit a feed.</p>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 762px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/03/fig-form.jpg"><img class="size-full wp-image-532 " title="fig-form" src="http://publicmind.in/blog/wp-content/uploads/2010/03/fig-form.jpg" alt="fig-form" width="752" height="453" /></a><p class="wp-caption-text">FIG config form</p></div>
<p>Here is a brief explanation of the available fields:</p>
<ol>
<li>Enable Feeds Image Grabber: As the description says, check this box if you want FIG to download images of the feed items created by this feed.</li>
<li>Search for an image between the tag identified by: It has been explained before <a href="http://publicmind.in/blog/tutorial-for-feedapi-imagegrabber/#tag-options" target="_blank">here</a>.</li>
<li>Feeling Lucky: FIG will select the first image between the tag if the &#8220;yes&#8221; is selected, else will search for all the images to find the largest image between the tag.</li>
<li>Execution time: FIG will take the selected percentage of maximum PHP execution time to grab image for each feed item. If images are not grabbed for some feed, try increasing this percentage to decrease errors due to network timeouts.</li>
</ol>
<p>That is all. Once you click on import, you will get the feed item nodes along with the images. If images are not grabbed, here is a list of possible reasons,</p>
<ol>
<li>Timeout, try increasing the Execution time.</li>
<li>Malformed HTML source.</li>
<li>Validation failures (due to maximum size, minimum resolution, etc).</li>
</ol>
<p>I am working on better error logging and reporting, so that you can know the reasons for sure.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/tutorial-for-feeds-image-grabber/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Drupal: Facebook-style Links</title>
		<link>http://publicmind.in/blog/drupal-facebook-link/</link>
		<comments>http://publicmind.in/blog/drupal-facebook-link/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 13:43:52 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[fbsl]]></category>
		<category><![CDATA[fbss]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=475</guid>
		<description><![CDATA[Facebook-style Links (FBSL) provides the ability for users to attach and submit links along with their Facebook-style Statuses. Combined with Facebook-style Statuses (FBSS), the FBSL module provides an attach link form that loads via AHAH. Users can then attach a link with an (optional) thumbnail, title and description to their status. In the nutshell, it [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled1 --><a href="http://drupal.org/project/facebook_link">Facebook-style Links</a> (FBSL) provides the ability for users to attach and submit links along with their Facebook-style Statuses. Combined with <a href="http://drupal.org/project/facebook_status">Facebook-style Statuses</a> (FBSS), the FBSL module provides an attach link form that loads via <a href="http://en.wikipedia.org/wiki/AHAH">AHAH</a>. Users can then <em>attach</em> a link with an (optional) thumbnail, title and description to their status. In the nutshell, it imitates the link attachment feature on Facebook.</p>
<p><div id="attachment_484" class="wp-caption aligncenter" style="width: 617px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-25-at-1.54.50-PM.png"><img class="size-full wp-image-484" title="Screenshot of FBSL on LondonFuse.ca" src="http://publicmind.in/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-25-at-1.54.50-PM.png" alt="screenshot-londonfuse" width="607" height="284" /></a><p class="wp-caption-text">Screenshot of FBSL on LondonFuse.ca</p></div><br />
<span id="more-475"></span><br />
FBSL also provides token support for modules such as <a href="http://drupal.org/project/activity">Activity 2.x</a>. The themed image, title, description and status among other tokens are offered. The FBSS statuses which have a attached link, have their own separate Activity Publisher Templates.</p>
<p>FBSL is designed to be used quite intuitively, this screenshot shows the FBSL status form as themed by Thomas Cermak on <a href="http://londonfuse.ca">LondonFuse</a>.</p>
<div id="attachment_491" class="wp-caption aligncenter" style="width: 637px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/02/sreenshot2.png"><img class="size-full wp-image-491" title="screenshot2" src="http://publicmind.in/blog/wp-content/uploads/2010/02/sreenshot2.png" alt="screenshot-facebook-link" width="627" height="76" /></a><p class="wp-caption-text">FBSL status update form</p></div>
<p>FBSL can be used out of the box, though you can customize it from the settings page. All other information (installation, usage, and changelog) can be found inside the packaged module which is available for download <a href="http://drupal.org/project/facebook_link">here</a>.</p>
<p>This module has been sponsored by Thomas Cermak of <a href="http://londonfuse.ca">LondonFuse</a>.</p>
<p><strong>Resources:</strong></p>
<ul>
<li>Project Page (Download): <a href="http://drupal.org/project/facebook_link">http://drupal.org/project/facebook_link</a></li>
</ul>
<p><strong>Note</strong>: Feature and Support requests should be made through the <a href="http://drupal.org/project/facebook_link">Facebook-style Links</a> Forum. I may not be able to answer them here.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/drupal-facebook-link/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal: Feeds Image Grabber</title>
		<link>http://publicmind.in/blog/drupal-feeds-image-grabber/</link>
		<comments>http://publicmind.in/blog/drupal-feeds-image-grabber/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 09:50:13 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[imagegrabber]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=474</guid>
		<description><![CDATA[Feeds Image Grabber (FIG) is the successor project for FeedAPI ImageGrabber to support the Feeds module. FIG parses the Item URL of each feed-item, downloads the appropriate image from the post and maps it to an image field in the node created by Feeds module for that feed-item. [Google Reader (with thumbnails) can be imitated [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled1 --><a href="http://drupal.org/project/feeds_imagegrabber">Feeds Image Grabber</a> (FIG) is the successor project for <a href="http://publicmind.in/blog/feedapi-imagegrabber">FeedAPI ImageGrabber</a> to support the <a href="http://drupal.org/project/feeds">Feeds</a> module. FIG parses the Item URL of each feed-item, downloads the appropriate image from the post and maps it to an image field in the node created by Feeds module for that feed-item.</p>
<p>[Google Reader (with thumbnails) can be imitated on a Drupal site by using Feeds, Feeds Image Grabber, FileField, ImageField, ImageCache, ImageAPI and Views module].</p>
<p><span id="more-474"></span> <strong>How it works</strong><br />
A classic method of mimicking the behavior of Feeds Image Grabber would be to do the same thing manually. Let us go through the procedure if you were to do it manually:</p>
<ol>
<li>Refresh the feed to create nodes for feed items (using FeedsNodeProcessor).</li>
<li>For each feed-item, go to their respective webpage and save the image to display.</li>
<li>Upload the image to CCK image field for each feed item.</li>
</ol>
<p>Feeds Image Grabber automates the last 2 steps of the three step process described. <a href="http://drupal.org/project/imagecache">Imagecache</a> module can be used to create thumbnail of the image retrieved which can be attached to the node.</p>
<p><strong>What&#8217;s in the box</strong><br />
On 3rd March, first version of FIG was released. As of today, FIG supports following features:</p>
<ol>
<li>Automatically downloads and attaches image to the node created by Feeds module.</li>
<li>Configurable XPath of the desired image location on the webpage of the feed item on per feed basis (using element&#8217;s id or CSS class).</li>
<li>Support for <a href="http://drupal.org/project/filefield_paths">FileField Paths</a> module.</li>
<li>Configurable maximum image size.</li>
<li>Configurable minimum and maximum image resolutions.</li>
</ol>
<p><strong>Get involved</strong><br />
You can get involved by doing any of the following:</p>
<ol>
<li>write about this module, so that other folks can find it.</li>
<li>report bugs in the <a href="http://drupal.org/node/add/project-issue/feeds_imagegrabber">issue queue</a>.</li>
<li>help in the <a href="http://drupal.org/project/issues/search/feeds_imagegrabber?categories[]=support">support forums</a> of the module.</li>
<li>buy me a Beer <img src='http://publicmind.in/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ol>
<p><strong>Resources: </strong></p>
<ul>
<li>Project Page (Download): <a href="http://drupal.org/project/feeds_imagegrabber">http://drupal.org/project/feeds_imagegrabber</a></li>
<li>Tutorials: <a href="http://publicmind.in/blog/tutorial-for-feeds-image-grabber">http://publicmind.in/blog/tutorial-for-feeds-image-grabber</a></li>
</ul>
<p><strong>Note</strong>: Feature and Support requests should be made through the <a href="http://drupal.org/project/feeds_imagegrabber" target="_blank">Feeds Image Grabber</a> Forum. I may not be able to answer them here.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/drupal-feeds-image-grabber/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>&#8220;What is Drupal?&#8221;, for newbies</title>
		<link>http://publicmind.in/blog/what-is-drupal-for-newbies/</link>
		<comments>http://publicmind.in/blog/what-is-drupal-for-newbies/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 22:55:16 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=432</guid>
		<description><![CDATA[I often come across this question from my friends and peers and most of the time I deflect it by saying &#8220;it lets you create your website easily, why don&#8217;t you look up on Wikipedia?&#8221;. Few days ago, one of my friends pointed me that most of the articles start with &#8220;Drupal is a Content Management [...]]]></description>
			<content:encoded><![CDATA[<p>I often come across this question from my friends and peers and most of the time I deflect it by saying &#8220;it lets you create your website easily, why don&#8217;t you look up on Wikipedia?&#8221;. Few days ago, one of my friends pointed me that most of the articles start with &#8220;Drupal is a Content Management System(CMS) &#8230;&#8221; which becomes pretty much confusing when one has no idea about what a CMS is. In this post, I have tried to explain what a CMS is and why we need it and how Drupal stands out among various other available CMSs.</p>
<p>Let us say you need to create a webpage for your website. Ideally, it would mean you create HTML content that will be delivered to someone who requests it through their web browser. Eventually you grow big and decide to add 100 more pages to your website and therefore create 100 more HTML pages. But then you realize that there is a lot of duplicate content. The footer which contains the copyright information is essentially the same on all pages, therefore if you ever need to edit it then it would mean to edit these 101 pages. This will be a lot of redundant work.<br />
<span id="more-432"></span><br />
The main problem with the HTML pages is that they are static, they can not be changed based on what user requests. Thats why we need to have two different pages, even if they are almost similar and just differ by a single line. But then we also need to send the HTML content to the web browsers. That is where scripting languages such as PHP, ASP, JSP come as a savior. These languages are capable of creating dynamic content. The data is usually stored in the database and whenever a request comes for a page, HTML content will be created from this data on-the-fly and will be sent back to the requesting user. Now, you just need to store that copyright information just once, hence changing it becomes much easier.</p>
<p>Now, you also want to control which users have permission to access certain portion of the website and you create a login page for that part of the website, store cookies and write other code to maintain the session for the user. You might also want to publish a webpage on the fly, i.e.  save content to the database right from the user browser. You need some kind of access control mechanism and believe me it will be a hell lot of work to do.</p>
<p>That is where web-based Content Management System come into picture. They take out all the programming part from the publishing part of your website. You just need to write the content that has to be published on your website, make some settings on how it will be displayed, whether anyone or only authenticated users can see that content and you are done (of course, this is overly simplified but believe me once you know this everything will look so obvious to you).</p>
<p>With a CMS, one can easily create a website which :</p>
<ol>
<li>allows large number of people to contribute and share data.</li>
<li>easily manages user access control lists.</li>
<li>have reduced duplicate content.</li>
</ol>
<p>Drupal is one of the several available CMS is the market which is written in PHP and uses MySQL or PostgreSQL as database to store the website content. Drupal is released under GNU General Public License.</p>
<p><strong>What can you achieve with Drupal?</strong></p>
<p>You can easily create and manage,</p>
<ul>
<li>personal homepage</li>
<li>company website</li>
<li>blog</li>
<li>shopping websites (just like Ebay or Amazon)</li>
<li>Social networking sites like Twitter or Facebook</li>
</ul>
<p>With Drupal, you can create any kind of website, Imagination is the limit. Just FYI, White House uses Drupal to manage its official website: <a href="http://whitehouse.gov">whitehouse.gov</a></p>
<p>As with every other product, there are several other alternatives to Drupal such as Joomla, TYPO3, Nucleus, WordPress, etc. You can find the whole list of available CMS here: <a href="http://en.wikipedia.org/wiki/List_of_content_management_systems" target="_blank">List of Content Management Systems</a>. But what makes Drupal stand out is :</p>
<ol>
<li>its ease of use</li>
<li>a large community of developers which keeps everything secure and up to date.</li>
<li>a large pool of modules and themes. A module in Drupal lets you do things which aren&#8217;t supported by default in Drupal.</li>
</ol>
<p>Here is a small 1 minute video on &#8220;What is Drupal&#8221;, this video has already won six Telly awards:</p>
<p><object width="425" height="349"><param name="movie" value="http://www.youtube.com/v/rF1X12PE6PY&#038;rel=0&#038;border=1&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/rF1X12PE6PY&#038;rel=0&#038;border=1&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="349"></embed></object></p>
<p><strong>Drupal Website Hosting</strong></p>
<p><strong></strong>There are a lot of web hosting providers in the market and I know you will research well before buying anything. Most of them provide a one-click Drupal installation which saves you a lot of trouble while installing Drupal. I recommend you to look for such a web host, well all is up to you anyway.</p>
<p>You are now ready to eat up the Wikipedia article on Drupal. You can visit official Drupal website to look for great tutorials and downloads. Here are a few important links:</p>
<p>Official Drupal website: <a href="http://drupal.org">http://drupal.org</a><br />
Modules Resource: <a href="http://drupal.org/project/modules">http://drupal.org/project/modules</a><br />
Themes Resource: <a href="http://drupal.org/project/themes">http://drupal.org/project/themes</a><br />
Wikipedia article: <a href="http://en.wikipedia.org/wiki/Drupal">http://en.wikipedia.org/wiki/Drupal</a></p>
<p>Do not forget to vote for this post on DZone or Digg if you liked it, or you can leave a comment or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/what-is-drupal-for-newbies/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP: Select HTML elements with more than one css class using XPath</title>
		<link>http://publicmind.in/blog/html-elements-with-more-than-one-css-class/</link>
		<comments>http://publicmind.in/blog/html-elements-with-more-than-one-css-class/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 22:39:43 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=309</guid>
		<description><![CDATA[Recently, while working on my project FeedAPI ImageGrabber I came across the issue where I had to select HTML elements by a given css class. The HTML element can have a single CSS class: &#60;div class=&#34;foo&#34;&#62;&#60;/div&#62; or multiple CSS classes associated with it. &#60;div class=&#34;foo exp tar&#34;&#62;&#60;/div&#62; Now if you want to select the HTML [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while working on my project <a href="http://publicmind.in/blog/feedapi-imagegrabber">FeedAPI ImageGrabber</a> I came across the issue where I had to select HTML elements by a given css class. The HTML element can have a single CSS class:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;foo&quot;</span><span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span></div></div>
<p>or multiple CSS classes associated with it.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;foo exp tar&quot;</span><span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span></div></div>
<p>Now if you want to select the HTML elements with class &#8220;foo&#8221;, this div element would be one of them.<br />
<span id="more-309"></span><br />
As, I do not have much experience with XPath, I started to search for a solution. After a lot of search and discussion on Drupal development mailing lists, I arrived at the following XPath :</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #666666; font-style: italic;">//*[@class and contains(concat(' ',normalize-space(@class),' '),' $classname ')]</span></div></div>
<p>The <strong>normalize-space</strong> function replaces all continuous tabs and whitespaces with a single whitespace character. Then, we concatenate the resulting string with two white-spaces, one in the start and other at the last. At last, we search for</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$classname</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span></div></div>
<p>in the final string.</p>
<p>I hope it helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/html-elements-with-more-than-one-css-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 6.507 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-19 04:56:37 -->

