<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-855230646197904656</atom:id><lastBuildDate>Thu, 29 Aug 2024 23:10:45 +0000</lastBuildDate><category>Asp.net</category><category>Blogspot</category><category>Facebook</category><category>Html / Javascript/ CSS</category><title>Lets Code...</title><description></description><link>http://lets-code.blogspot.com/</link><managingEditor>noreply@blogger.com (Jashwant Singh Chaudhary)</managingEditor><generator>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-855230646197904656.post-2971935758349827035</guid><pubDate>Thu, 21 Oct 2010 05:18:00 +0000</pubDate><atom:updated>2010-10-21T10:57:51.160+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Html / Javascript/ CSS</category><title>Styling &#39;alt&#39; attribute of img tag</title><description>Ever felt a need to change color, height on any style of alt tag ??&lt;br /&gt;
&lt;br /&gt;
Before going further, let me clear you one thing. alt is &#39;content&#39; not &#39;presentation&#39;.As such it cannot be styled simply.We need to apply little bit of hack in it.&lt;br /&gt;
&lt;br /&gt;
So,&amp;nbsp;&lt;i&gt;&lt;b&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;Lets Code...&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Put a wrapper around the img tag in which you are using alt attribute and style that wrapper. We can use &amp;lt;style&amp;gt; or &amp;lt;div&amp;gt; tag to wrap the img tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here&#39;s the code.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;span style=&#39;color:red;height:100px;width:200px&#39;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;img alt=&#39;this is styled alt&#39; src=&#39;xyz.jpg&#39; /&amp;gt;
&amp;lt;/span&amp;gt;

&lt;/pre&gt;&lt;br /&gt;
That&#39;s all. Enjoy...Happy Coding...</description><link>http://lets-code.blogspot.com/2010/10/styling-alt-attribute-of-img-tag.html</link><author>noreply@blogger.com (Jashwant Singh Chaudhary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-855230646197904656.post-3112507352568735291</guid><pubDate>Wed, 29 Sep 2010 14:42:00 +0000</pubDate><atom:updated>2010-09-29T20:31:13.551+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.net</category><title>Send email from yahoo, gmail or your smtp server through asp.net</title><description>To send a email from asp.net you need to follow these steps...&lt;br /&gt;&lt;br /&gt;We use &lt;b&gt;System.Net.Mail&lt;/b&gt; namespace to send email. Without going into details, lets have a simple working code to send emails through asp.net via two most popular smtp mail servers.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Gmail:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;&lt;br /&gt;try&lt;br /&gt;     {&lt;br /&gt;        MailMessage mail = new MailMessage();     //using System.Net.Mail namespace&lt;br /&gt;        mail.To.Add(&quot;xyz@yahoo.com&quot;);             //Enter reciever&#39;s email address&lt;br /&gt;        mail.From = new MailAddress(&quot;abc@gmail.com&quot;);  //Enter sender&#39;s email address&lt;br /&gt;        mail.Subject = &quot;Testing mail...&quot;;&lt;br /&gt;        mail.Body = @&quot;Lets-code ! Lets-code to make it simpler&quot;;&lt;br /&gt;        mail.IsBodyHtml = true;                  //Body of mail supports html tags&lt;br /&gt;        SmtpClient smtp = new SmtpClient();&lt;br /&gt;        smtp.Host = &quot;smtp.gmail.com&quot;;&lt;br /&gt;        smtp.Port = 587;&lt;br /&gt;        smtp.Credentials = new System.Net.NetworkCredential(&quot;abc@gmail.com&quot;, &quot;pwd&quot;);&lt;br /&gt;        // Your gmail username and password    &lt;br /&gt;        smtp.EnableSsl = true;            //Gmail uses a encrypted connection&lt;br /&gt;        smtp.Send(mail);&lt;br /&gt;        Response.Write(&quot;Mail Sent Successfully&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;catch(Exception ex)&lt;br /&gt;    {   &lt;br /&gt;        Response.Write(ex.Message);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Yahoo:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Yahoo&#39;s Smtp host name is smtp.mail.yahoo.com. It uses port 25 and an unsecure connection. So, considering these, here&#39;s a code for yahoo.&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;&lt;br /&gt; try &lt;br /&gt;     {    &lt;br /&gt;         MailMessage mail = new MailMessage();&lt;br /&gt;         mail.To.Add(&quot;xyz@gmail.com&quot;);&lt;br /&gt;         mail.From = new MailAddress(&quot;abc@yahoo.com&quot;);&lt;br /&gt;         mail.Subject = &quot;This is subject of your mail&quot;;&lt;br /&gt;         string Body = @&quot;Its the body of your mail&quot;;&lt;br /&gt;         mail.Body = Body;&lt;br /&gt;         mail.IsBodyHtml = true;&lt;br /&gt;         SmtpClient smtp = new SmtpClient();&lt;br /&gt;         smtp.Host = &quot;smtp.mail.yahoo.com&quot;;&lt;br /&gt;         smtp.Port = 25;&lt;br /&gt;         smtp.Credentials = new System.Net.NetworkCredential(&quot;abc@yahoo.com&quot;,&quot;pwd&quot;);&lt;br /&gt;         // Your yahoo username and Password&lt;br /&gt;         smtp.EnableSsl = false;         // SSL is disabled&lt;br /&gt;         smtp.Send(mail);&lt;br /&gt;         Response.Write(&quot;Mail Sent Successfully&quot;);&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;catch (Exception ex)&lt;br /&gt;     {      &lt;br /&gt;         Response.Write(ex.Message);&lt;br /&gt;     }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color: rgb(102, 0, 0);&quot;&gt;&lt;b&gt;&lt;i&gt;Yahoo appends its advertisements in your mail. So its better to use gmail.&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Here&#39;s a list of other smtp mail servers:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Hotmail Outgoing Mail Server (SMTP)&lt;/b&gt; - smtp.live.com (SSL enabled, port 25)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Yahoo Plus Outgoing Mail Server (SMTP)&lt;/b&gt; - plus.smtp.mail.yahoo.com (SSL enabled, port 465, use authentication)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;MSN Outgoing Mail Server&lt;/b&gt; - smtp.email.msn.com (uses authentication)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Netscape Internet Service Outgoing Mail Server&lt;/b&gt; - smtp.isp.netscape.com (port 25, uses a secure SSL connection)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If you want to mail from your own smtp mail server, just change the respective host,port.Check if your mail server supports SSL connection and enable/disable it accordingly.</description><link>http://lets-code.blogspot.com/2010/09/send-email-from-yahoo-gmail-or-your.html</link><author>noreply@blogger.com (Jashwant Singh Chaudhary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-855230646197904656.post-4539315501332408265</guid><pubDate>Sun, 26 Sep 2010 14:08:00 +0000</pubDate><atom:updated>2010-09-27T01:19:09.359+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Blogspot</category><title>Syntax Highlighter - post code snippets on web</title><description>&lt;div style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Need to display code in your blog or website like the html code given below ?? &lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div&amp;gt; Hi, I am html code &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Or a C# code&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;using system;
protected string func()
{
Response.WriteLine(&quot;Hi from C# code&quot;);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pretty nice formatting and show-off . Isn&#39;t it ? You too can do this in some simple steps.&lt;br /&gt;
Just follow this simple copy-paste mechanism step by step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center style=&quot;color: #073763;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;u&gt;&lt;b&gt;Let&#39;s Code...&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/center&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #0c343d;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;Step 1:&lt;/u&gt;  &lt;span style=&quot;color: black;&quot;&gt;Adding Syntax Highlighter to your blog.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(a)Add some css and javascript &lt;/b&gt;&lt;br /&gt;
Place these css links and javascripts between &amp;lt;head&amp;gt; &amp;amp; &amp;lt;/head&amp;gt; section of your blog.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;link href=&#39;http://alexgorbatchev.com/pub/sh/current/styles/shCore.css&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;
&amp;lt;link href=&#39;http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;
&amp;lt;script src=&#39;http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js&#39; type=&#39;text/javascript&#39;/&amp;gt;
&amp;lt;script src=&#39;http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js&#39; type=&#39;text/javascript&#39;/&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(b) Setup Autoloader &lt;/b&gt;&lt;br /&gt;
Setup autoloader.js javascript for dynamic loading of brushes so that only those brushes are loaded which are  being used by the codes. It saves a lot of loading time of page.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script language=&#39;javascript&#39;&amp;gt;

function path()
{
var args = arguments,
result = [];
for(var i = 0; i != (args.length-1); i++)
result.push(args[i].replace(&#39;@&#39;,&#39;http://alexgorbatchev.com/pub/sh/current/scripts/&#39;));
return result
};
&amp;lt;/script&amp;gt;

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
(c) &lt;b&gt;Call brushes to highlight code&lt;/b&gt;&lt;br /&gt;
Put the following code to include all brushes and highlight of your codes in the given page.Insert the script below just above &amp;lt;/body&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
SyntaxHighlighter.config.bloggerMode = true; 
// If you are not using blogger, switch it to &#39;false&#39;.
//i.e. SyntaxHighlighter.config.bloggerMode = false;

SyntaxHighlighter.config.clipboardSwf = &#39;http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf&#39;;

SyntaxHighlighter.autoloader.apply(null, path(
&#39;applescript            @shBrushAppleScript.js&#39;,
&#39;actionscript3 as3      @shBrushAS3.js&#39;,
&#39;bash shell             @shBrushBash.js&#39;,
&#39;coldfusion cf          @shBrushColdFusion.js&#39;,
&#39;cpp c                  @shBrushCpp.js&#39;,
&#39;c# c-sharp csharp      @shBrushCSharp.js&#39;,
&#39;css                    @shBrushCss.js&#39;,
&#39;delphi pascal          @shBrushDelphi.js&#39;,
&#39;diff patch pas         @shBrushDiff.js&#39;,
&#39;erl erlang             @shBrushErlang.js&#39;,
&#39;groovy                 @shBrushGroovy.js&#39;,
&#39;java                   @shBrushJava.js&#39;,
&#39;jfx javafx             @shBrushJavaFX.js&#39;,
&#39;js jscript javascript  @shBrushJScript.js&#39;,
&#39;perl pl                @shBrushPerl.js&#39;,
&#39;php                    @shBrushPhp.js&#39;,
&#39;text plain             @shBrushPlain.js&#39;,
&#39;py python              @shBrushPython.js&#39;,
&#39;ruby rails ror rb      @shBrushRuby.js&#39;,
&#39;sass scss              @shBrushSass.js&#39;,
&#39;scala                  @shBrushScala.js&#39;,
&#39;sql                    @shBrushSql.js&#39;,
&#39;vb vbnet               @shBrushVb.js&#39;,
&#39;xml xhtml xslt html    @shBrushXml.js&#39;,
&#39;xml                    @shBrushXml.js&#39;
));
SyntaxHighlighter.all()
&amp;lt;/script&amp;gt;

&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #0c343d;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;Step 2:&lt;/u&gt;  &lt;span style=&quot;color: black;&quot;&gt;Embed syntax highlighter in your post.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
When writing a new post, you need to use &amp;lt;pre&amp;gt; tag in the post. The code of your post needs to placed between the &amp;lt;pre&amp;gt; and &amp;lt;/pre&amp;gt; tags. You have to add specific brushes by applying class attributes.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre class=&quot;brush: html&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt; Hi, I am html code &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly for javascript your brush will be js or javascript or jscript.&lt;br /&gt;
So, post goes like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&quot;brush: js&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Javscript code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A complete list of brushes can be found from &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #0c343d;&quot;&gt;&lt;br /&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Customization:&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Syntax Highlighter offer a great deal of customization.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre class=&quot;brush: js; ruler: true; gutter: false; toolbar: false; collapse: true; auto-links: false; smart-tabs: false; first-line: 10; highlight: [2, 4, 6]&quot;&amp;gt;&lt;br /&gt;
javascript code goes here..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are some global settings also which should be called before SyntaxHighlighter.all(); in step 1(c)&lt;br /&gt;
&lt;br /&gt;
SyntaxHighlighter.defaults[&#39;gutter&#39;] = false;&lt;br /&gt;
SyntaxHighlighter.defaults[&#39;smart-tabs&#39;] = false;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
SyntaxHighlighter.all();&lt;br /&gt;
&lt;br /&gt;
A complete list of customization can be found &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Themes:&lt;/b&gt;&lt;/u&gt; SyntaxHighlighter 2.0 introduced custom CSS themes.You can switch to different themes by just replacing the default theme (&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/default.html&quot; target=&quot;_blank&quot;&gt;shThemeDefault.css)&lt;/a&gt; with desired theme.You just need to change a css file.&lt;br /&gt;
&lt;br /&gt;
Replace this line&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;link href=&#39;http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;&lt;/pre&gt;&lt;br /&gt;
with&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;link href=&#39;http://alexgorbatchev.com/pub/sh/current/styles/{theme name}&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
where {theme name} can be&lt;br /&gt;
&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/django.html&quot; target=&quot;_blank&quot;&gt;shThemeDjango.css&lt;/a&gt;,&lt;br /&gt;
&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/eclipse.html&quot; target=&quot;_blank&quot;&gt;shThemeEclipse.css&lt;/a&gt;,&lt;br /&gt;
&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/emacs.html&quot; target=&quot;_blank&quot;&gt;shThemeEmacs.css&lt;/a&gt;,&lt;br /&gt;
&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/fadetogrey.html&quot; target=&quot;_blank&quot;&gt;shThemeFadeToGrey.css&lt;/a&gt;,&lt;br /&gt;
&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/midnight.html&quot; target=&quot;_blank&quot;&gt;shThemeMidnight.css&lt;/a&gt; or&lt;br /&gt;
&lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/manual/themes/rdark.html&quot; target=&quot;_blank&quot;&gt;shThemeRDark.css&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
(Click on themes to feel their looks)&lt;br /&gt;
&lt;br /&gt;
For example, for RDark theme, your code goes like this,&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;link href=&#39;http://alexgorbatchev.com/pub/sh/current/styles/shThemeRDark.css&#39; rel=&#39;stylesheet&#39; type=&#39;text/css&#39;/&amp;gt;&lt;/pre&gt;</description><link>http://lets-code.blogspot.com/2010/09/syntax-highlighter-post-code-snippets.html</link><author>noreply@blogger.com (Jashwant Singh Chaudhary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-855230646197904656.post-4178482448270146343</guid><pubDate>Mon, 20 Sep 2010 11:05:00 +0000</pubDate><atom:updated>2010-09-27T01:20:29.085+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Facebook</category><title>Facebook Comments in your blogger</title><description>&lt;i&gt;&lt;b&gt;So, you too want your users to comment from facebook id ?&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #0c343d; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;i&gt;Lets code...&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Below is a tutorial to integrate &lt;a href=&quot;http://developers.facebook.com/docs/reference/plugins/comments&quot;&gt;Facebook Comment Plugin&lt;/a&gt; to your blogspot blog.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
Follow these simple steps and let Facebook Comment Plugin dance on your finger tips.&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;color: #0c343d; font-family: Georgia,&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #0c343d; font-family: Georgia,&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;Step 1:&lt;/u&gt;  Create a facebook application first.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Dont worry, you need not to code for this. Just go to this page &lt;a href=&quot;http://developers.facebook.com/setup/&quot;&gt;Create Facebook Application&lt;/a&gt;.&lt;br /&gt;
Verify your facebook account by credit card or mobile phone.&lt;br /&gt;
(Though this whole verification thing has a bug. But hope, facebook will recover from it soon )&lt;br /&gt;
&lt;br /&gt;
Then click  &lt;b style=&quot;background-color: #ececec; border: 1px solid rgb(153, 153, 153); color: #333333; margin: 2px; padding: 2px;&quot;&gt;+ Set Up New Application &lt;/b&gt;&lt;br /&gt;
Enter your &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD4&quot;&gt;application&lt;/span&gt; name&lt;i&gt; (type your blog name or anything you want) &lt;/i&gt;&lt;br /&gt;
Check I agree and click &lt;b style=&quot;background-color: #3b5998; border: 1px solid rgb(14, 31, 91); color: white; margin: 2px; padding: 2px;&quot;&gt;Create Application&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Congratulations, you have just created a facebook application.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
After creating application, go to &#39;Edit Settings&#39; .&lt;br /&gt;
Go for &#39;Website&#39; tab at left tabs-list.&lt;br /&gt;
In Site URL, Enter url of your blog ( as lets-code.blogspot.com)&lt;br /&gt;
Click on &lt;b&gt;SAVE CHANGES.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy the app-id (circled in the picture below)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXnjTGMT5CHY_yDPdIkct9r5aA1JC5fGewlsJlbsuJH_6uui-spsVs7WZew_-yTH-lrQqeWzqybelxw68YJ8EElNMVPRWX0jd_WimvIfUnkRwRLoFH7Rgc-qPbsk9q3bY4nxa1cXlT2qu5/s1600/app-id.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXnjTGMT5CHY_yDPdIkct9r5aA1JC5fGewlsJlbsuJH_6uui-spsVs7WZew_-yTH-lrQqeWzqybelxw68YJ8EElNMVPRWX0jd_WimvIfUnkRwRLoFH7Rgc-qPbsk9q3bY4nxa1cXlT2qu5/s400/app-id.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #0c343d; font-family: Georgia,&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;Step 2:&lt;/u&gt;  Integrate Facebook Comment Plugin to your blogspot&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Login to your blogger account.&lt;br /&gt;
Navigate to &lt;b&gt;layout &amp;gt;&amp;gt; edit html &amp;gt;&amp;gt;&lt;/b&gt; and check &lt;b&gt;Expand Widget Templates&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #351c75;&quot;&gt;&lt;u&gt;&lt;b&gt;Add facebook xmlns attribute:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;
Search for: &lt;span style=&quot;color: green;&quot;&gt;&amp;lt;html&lt;/span&gt; tag and add facebook xmlns attribute at the last of html tag as given below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html expr:dir=&#39;data:blog..............2005/gml/expr&#39; &lt;span style=&quot;color: red;&quot;&gt;xmlns:fb=&#39;http://www.facebook.com/2008/fbml&#39;&lt;/span&gt; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #351c75;&quot;&gt;&lt;u&gt;&lt;b&gt;Add Open Graph protocol meta tags:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;
Search for &amp;lt;head&amp;gt; section and after it, put following code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;meta content=&#39;MY-SITE-NAME&#39; property=&#39;og:site_name&#39;/&amp;gt;
&amp;lt;meta content=&#39;http://google.com/help/hc/images/logos/blogger_logo.gif&#39; property=&#39;og:image&#39;/&amp;gt;
&amp;lt;meta content=&#39;YOUR-APP-ID&#39; property=&#39;fb:app_id&#39;/&amp;gt;
&amp;lt;meta content=&#39;YOUR-FACEBOOK-PROFILE-ID&#39; property=&#39;fb:admins&#39;/&amp;gt;
&amp;lt;meta content=&#39;article&#39; property=&#39;og:type&#39;/&amp;gt;

&lt;/pre&gt;&lt;br /&gt;
Change MY-SITE-NAME with the one you want to appear when a user likes a page.(Your Blog&#39;s name )&lt;br /&gt;
Change http://google.../blogger_logo.gif with your blog logo, or remove the all tag if you don&#39;t want it.&lt;br /&gt;
Change YOUR-APP-ID with your appplication id (app-id).&lt;br /&gt;
Change YOUR-FACEBOOK-PROFILE-ID with your own facebook user profile ID.&lt;br /&gt;
&lt;div style=&quot;color: #351c75;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;
Add Facebook javascript sdk:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Search for &amp;lt;body&amp;gt; tag and &lt;/span&gt;&lt;/b&gt;after it add the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;script&amp;gt;
window.fbAsyncInit = function() { 
FB.init({ appId  : &#39;Your App Id&#39;,//the one you&#39;ve copied from facebook application page    
status : true, // check login status   
cookie : true,     
xfbml  : true  // parse XFBML    });  }; 
(function() { 
var e = document.createElement(&#39;script&#39;);
e.src = document.location.protocol +&#39;//connect.facebook.net/en_US/all.js&#39;; 
e.async = true;   
document.getElementById(&#39;fb-root&#39;).appendChild(e); 
}());
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #0c343d; font-family: Georgia,&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;u&gt;Step 3:&lt;/u&gt;  Place facebook comment box in your blog&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Now, find  &amp;lt;data:post.body/&amp;gt; and after it post following code.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html&quot;&gt;&amp;lt;b:if cond=&quot;data:blog.pageType == &#39;item&#39; &amp;gt;
&amp;lt;b:if cond=&quot;data:blog.pageType != &#39;static_page&#39; &amp;gt;
&amp;lt;fb:comments expr:title=&#39;data:post.title&#39; expr:url=&#39;data:post.url&#39;
expr:xid=&quot;data:post.id&quot; &amp;gt;
&amp;lt;/fb:comments&amp;gt;

&amp;lt;/b:if&amp;gt;
&amp;lt;/b:if&amp;gt;&lt;/pre&gt;Click &lt;b style=&quot;background-color: #ff7700; border: 1px solid rgb(153, 51, 0); color: white; margin: 2px; padding: 2px;&quot;&gt;Save Template &lt;/b&gt;, and start commenting in facebook style...&lt;br /&gt;
&lt;span style=&quot;color: white;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;u&gt;&lt;span style=&quot;color: #660000; font-size: large;&quot;&gt;Note:&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;As two comment boxes seems quite odd, if you want to disable default commenting system, Navigate to &lt;i&gt;&lt;b&gt;settings &amp;gt;&amp;gt; comments &lt;/b&gt;&lt;/i&gt;and next to comments field choose &lt;b&gt;Hide&lt;/b&gt;, then scroll downand  then click&lt;b style=&quot;background-color: #ff7700; border: 1px solid rgb(153, 51, 0); color: white; margin: 2px; padding: 2px;&quot;&gt; Save Settings&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;You can also add other facebook plugins (like button, acitivity feed,recommedations etc) from &lt;a href=&quot;http://developers.facebook.com/plugins&quot;&gt;Facebook Plugins&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://lets-code.blogspot.com/2010/09/facebook-comments-in-your-blogger.html</link><author>noreply@blogger.com (Jashwant Singh Chaudhary)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXnjTGMT5CHY_yDPdIkct9r5aA1JC5fGewlsJlbsuJH_6uui-spsVs7WZew_-yTH-lrQqeWzqybelxw68YJ8EElNMVPRWX0jd_WimvIfUnkRwRLoFH7Rgc-qPbsk9q3bY4nxa1cXlT2qu5/s72-c/app-id.PNG" height="72" width="72"/><thr:total>2</thr:total></item></channel></rss>