<?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>my code trip &#187; SubText</title>
	<atom:link href="http://mycodetrip.com/tag/subtext/feed/" rel="self" type="application/rss+xml" />
	<link>http://mycodetrip.com</link>
	<description>stories from the information technology highway</description>
	<lastBuildDate>Mon, 29 Nov 2010 19:58:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>How to Add Live Comment Preview for Subtext Blog Comments</title>
		<link>http://mycodetrip.com/2007/01/29/how-to-add-live-comment-preview-for-subtext-blog-comments_50/</link>
		<comments>http://mycodetrip.com/2007/01/29/how-to-add-live-comment-preview-for-subtext-blog-comments_50/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 02:59:13 +0000</pubDate>
		<dc:creator>Shiva Manjunath</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[SubText]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=50</guid>
		<description><![CDATA[How to Add Live Comment Preview for Subtext Blog Comments on your SubText blog.]]></description>
			<content:encoded><![CDATA[<p>If you even wondered how certain subtext blogs are showing a preview pane when you are writing a comment on a blog post, here is how you can implement that feature on your very own subtext blog.</p>
<ul>
<li>Open the <strong>Skins.config</strong> file located in the Admin folder of your subtext installation in Visual Studio or in a Text editor.</li>
<li>Locate the <strong>SkinTemplate</strong> section for your blog skin. In this example, I am using a blog skin called <strong>gray</strong>.</li>
<li>If there is a <strong>Scripts</strong> section already, then just add line <strong>3</strong>. Otherwise, add lines <strong>2, 3</strong> and <strong>4</strong>. Be careful with case sensitivity.</li>
</ul>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span><span class="kwrd">&lt;</span><span class="html">SkinTemplate</span> <span class="attr">Name</span><span class="kwrd">="gray"</span> <span class="attr">TemplateFolder</span><span class="kwrd">="gray"</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   2:  </span>    <span class="kwrd">&lt;</span><span class="html">Scripts</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   3:  </span>        <span class="kwrd">&lt;</span><span class="html">Script</span> <span class="attr">Src</span><span class="kwrd">="~/Scripts/LiveCommentPreview.js"</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">   4:  </span>    <span class="kwrd">&lt;/</span><span class="html">Scripts</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   5:  </span>    <span class="kwrd">&lt;</span><span class="html">Styles</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   6:  </span>        <span class="kwrd">&lt;</span><span class="html">Style</span> <span class="attr">href</span><span class="kwrd">="~/skins/_System/csharp.css"</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">   7:  </span>        <span class="kwrd">&lt;</span><span class="html">Style</span> <span class="attr">href</span><span class="kwrd">="~/skins/_System/commonstyle.css"</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">   8:  </span>        <span class="kwrd">&lt;</span><span class="html">Style</span> <span class="attr">href</span><span class="kwrd">="~/skins/_System/commonlayout.css"</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">   9:  </span>        <span class="kwrd">&lt;</span><span class="html">Style</span> <span class="attr">href</span><span class="kwrd">="~/scripts/lightbox.css"</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">  10:  </span>        <span class="kwrd">&lt;</span><span class="html">Style</span> <span class="attr">href</span><span class="kwrd">="print.css"</span> <span class="attr">media</span><span class="kwrd">="print"</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">  11:  </span>    <span class="kwrd">&lt;/</span><span class="html">Styles</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  12:  </span><span class="kwrd">&lt;/</span><span class="html">SkinTemplate</span><span class="kwrd">&gt;</span></pre>
</div>
<ul>
<li> Save and close the <strong>Skins.config</strong> file.</li>
<li>Now open the <strong>PostComment.ascx</strong> file under the controls folder for the skin in Visual Studio or in a Text editor. In my example, it will be under <strong>\Skins\gray\Controls</strong></li>
<li>Scroll down to the bottom of the page, and paste the following line of code at the location you want to display the <strong>Live Preview</strong>.</li>
</ul>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span><span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">="comment livepreview"</span><span class="kwrd">&gt;&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
</div>
<p>Depending on how the rest of your comment page is laid out, so as to not break the page rendering on the browser, you may need to enclose this DIV tag in a table row or something else as follows.</p>
<div class="csharpcode">
<pre><span class="lnum">   1:  </span><span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   2:  </span>    <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">colSpan</span><span class="kwrd">="3"</span><span class="kwrd">&gt;</span>Live Preview</pre>
<pre><span class="lnum">   3:  </span>        <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">="comment livepreview"</span><span class="kwrd">&gt;&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   4:  </span>    <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   5:  </span><span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
</div>
<ul>
<li> Next, browse to one of your posts, and click the link to for the comments/feedback.</li>
<li>Start typing a comment, and you should see the comment in realtime in the Live preview pane.</li>
</ul>
<h2>Troubleshooting the Live Preview Comments implementation.</h2>
<p>If you don&#8217;t see the live preview, first ensure that the javascript has been included.</p>
<ul>
<li> Right click the blog post page, and click View Source.</li>
<li> Search for LiveCommentPreview.js.</li>
<li> Copy the full URL for LiveCommentPreview.js file and paste it in the address bar of a new browser window and press enter.</li>
<li> The LiveCommentPreview.js file should be opened.</li>
<li> If you get a file not found error, then look closely at the full path to LiveCommentPreview.js and correct it in the location in Skins.config file and try again.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2007/01/29/how-to-add-live-comment-preview-for-subtext-blog-comments_50/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fix for Subtext 404 Page Not Found Errors In Multiple Blogs Scenario</title>
		<link>http://mycodetrip.com/2006/12/14/subtext-error-solution-fix-404-page-not-found-errors-multiple-blogs_52/</link>
		<comments>http://mycodetrip.com/2006/12/14/subtext-error-solution-fix-404-page-not-found-errors-multiple-blogs_52/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 03:00:53 +0000</pubDate>
		<dc:creator>Shiva Manjunath</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[SubText]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=52</guid>
		<description><![CDATA[Fix for Subtext 404 Page Not Found Errors In Multiple Blogs Implementation Scenario.]]></description>
			<content:encoded><![CDATA[<p>If you have installed more than one blog using the <a rel="nofollow" href="http://subtextproject.com/" target="_blank">SubText </a>Framework and followed the subtext 1.9.2.30 installation instructions step by step, the step 7 instructs you to # <a rel="nofollow" href="http://subtextproject.com/Configuration/ConfiguringACustom404Page/tabid/121/Default.aspx" target="_blank">Configure the Custom 404 page</a>. I accidentally missed this step when I installed multiple subtext blogs and later found that I was getting the HTTP 404 Page Not Found Error. A solution to this was provided by <a rel="nofollow" href="http://stevenharman.net/" target="_blank">Steve Harman</a> when he told me that the step 7 of the installation instruction should fix this problem. I tried that and found that it did, indeed, fix the problem. So now, when I browse to either of my 2 blogs, say http://theshiva.us/technicalblog/ or  http://theshiva.us/travelblog/ without the default.aspx extension, the default page of that blog is displayed.</p>
<p>However, while inspecting the live HTTP headers for this request, a friend and I identified a possible searchbot issue with this Custom 404 page redirect fix. The HTTP header show a 302 Found code, which implies &#8220;The requested resource resides temporarily under a different URI&#8221;.</p>
<p><img style="height: 560px; width: 364px;" title="subtext-01-404-page-not-found-redirect-302-code" src="http://img440.imageshack.us/img440/7135/subtext01404pagenotfounjt0.jpg" alt="subtext-01-404-page-not-found-redirect-302-code" /></p>
<p>So when a the bot &#8211; say googlebot -  visits the root of either of the 2 blogs, and gets this status code of 302, it may not index the page assuming that the page move is a temporary one. In turn, this means that since the bot refrained from indexing the main root page of the blog, the underlying posts may never get indexed &#8211; unless,  of course &#8211; there are inbound links to those pages from other website or blogs. The correct approach to the redirect would be to return a 301 status code which implies &#8220;The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.&#8221;</p>
<h2>Fix the Redirect Issues in Subtext&#8217;s 404 Page Not Found</h2>
<p>The friend suggested a workaround / hack to fix the 404 Page Not Found errors without losing out on the bot indexing. I tried it and it works, so here it is.</p>
<p>First, rollback the step 7 instruction of the SubText installation for the 404 custom error page and set it back to what the original setting was.</p>
<p>Next, create physical folders for each of the many subtext blogs that you are hosting. For example, in my case, for the 2 blogs that I had originally created, I would create 2 physical folders by the name of technicalblog and travelblog under the root folder of my website http://theshiva.us/ on my host.</p>
<p>Finally, create a blank <span style="font-weight: bold;">default.aspx</span> file inside each of the folders you just created using any text editor, and add a line for the Page directive to it.</p>
<p><img style="height: 299px; width: 384px;" title="subtext-02-404-page-not-found-create-default-aspx-page" src="http://img185.imageshack.us/img185/7043/subtext02404pagenotfounss7.jpg" alt="subtext-02-404-page-not-found-create-default-aspx-page" /></p>
<p>Although  &#8211; as you will realize later &#8211; a blank <span style="font-weight: bold;">default.aspx</span> file is sufficient, it is recommended that you add this line to the default.aspx file.</p>
<p>Now browse to the root URL of each of your blogs without using the default.aspx extension. For example, in my case, I would browse to http://theshiva.us/technicalblog/ or http://theshiva.us/travelblog/ and see that the HTTP headers look fine.</p>
<h2>How did the Fix work ?</h2>
<p>When IIS gets the request for the root blog URL (without the <span style="font-weight: bold;">default.aspx </span>in the URL), it looks to see if the folder exists, and if it has a default.aspx inside the folder, it passed the request to the subtext application to resolve the URL and handle the request. From there, the HTTPHandler of subtext gets the URL to resolve and redirect. So when we added the physical folder and the default.aspx file under that folder, the URL was passed on to the Subtext application which resolved it correctly.</p>
<p><img style="height: 431px; width: 370px;" title="subtext-02-404-page-not-found-200-OK-code" src="http://img338.imageshack.us/img338/9043/subtext03404pagenotfounrb6.jpg" alt="subtext-02-404-page-not-found-200-OK-code" /></p>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2006/12/14/subtext-error-solution-fix-404-page-not-found-errors-multiple-blogs_52/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to add Google Analytics to your SubText Blogs</title>
		<link>http://mycodetrip.com/2006/12/11/how-to-add-google-analytics-to-subtext-blog_54/</link>
		<comments>http://mycodetrip.com/2006/12/11/how-to-add-google-analytics-to-subtext-blog_54/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 03:04:49 +0000</pubDate>
		<dc:creator>Shiva Manjunath</dc:creator>
				<category><![CDATA[Tips / HowTos]]></category>
		<category><![CDATA[SubText]]></category>

		<guid isPermaLink="false">http://mycodetrip.com/?p=54</guid>
		<description><![CDATA[How to add Google Analytics to your SubText Blogs]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>In this post, I will walk you through adding Google Analytics, a highly sophisticated website traffic analysis tool, to your blogs running on the <a rel="nofollow" href="http://subtextproject.com/" target="_blank">SubText Blogging Framework</a>.</p>
<h2>Post History</h2>
<p>Last Updated on: 11.Dec.2006</p>
<p>Applies to: SubText 1.9.2.30</p>
<p>Pre-requisites: An existing Gmail account.</p>
<h2>Sign up for Google Analytics</h2>
<p>Visit the Google Analytics website at <a rel="nofollow" href="http://www.google.com/analytics/" target="_blank">http://www.google.com/analytics/</a> and sign in with your Gmail account.</p>
<p>After you are logged in, click the <strong>Sign Up</strong> button.</p>
<p>In the <strong>General Information</strong> screen, enter the website details as requested and Click <strong>Next</strong>.</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-signup-account-information.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-signup-account-information_tn.gif" alt="google-analytics-signup-account-information" /></a></p>
<p>In the <strong>Contact Information</strong> screen, enter your contact information and Click <strong>Next</strong>.</p>
<p>Read the user agreement conditions in the ‘<strong>Accept User Agreement</strong>‘ Screen carefully, and if you agree to it, check the “Yes, I agree to the above terms and conditions” box and click <strong>Create New Account</strong>.</p>
<p>The <strong>Analytics  &#8211; Tracking Instruction</strong> screen will be displayed.</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-tracking-code-and-instructions.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-tracking-code-and-instructions_tn.gif" alt="google-analytics-tracking-code-and-instructions" /></a></p>
<p>Copy the entire script in the box, and paste it temporarily in a text document like a new notepad or wordpad document. Click <strong>Next</strong>.</p>
<p>You will now be taken to the main Analytics screen. At the top, you will see a message saying that ‘<strong>Tracking for your website has not yet been validated</strong>‘. Don’t panic. This is expected because you haven’t added the code in your website pages that will allow Goggle Analytics to track your website.</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-check-tracking-status.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-check-tracking-status_tn.gif" alt="google-analytics-check-tracking-status" /></a></p>
<h2>Add the Google Analytics Tracking Code to your SubText Blogs Pages.</h2>
<p>The easiest way to ensure that the Google Analytics Tracking Code to your subtext blog is to add it in the blog skins&#8217; master page control (<strong>PageTemplate.ascx</strong>). Since this page control is visible in all the pages in your website  &#8211; except the admin pages, where you don&#8217;t want this code anyway &#8211; this is the recommended method to include the tracking code. So let’s go ahead and add the tracking code to your blog skins&#8217; master page control</p>
<p>In a text editor or in Visual Studio (if you have it), open the <strong>PageTemplate.ascx</strong> page located in the <strong><em>site_root\</em>Skins\<span style="font-style: italic;">skin_name</span></strong>\ folder and paste the tracking code immediately below the last <strong>&lt; Register&gt; </strong>line at the top of the page so that the script appears as shown below.</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-tracking-code-in-subtext-website-page.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-tracking-code-in-subtext-website-page_tn.gif" alt="google-analytics-tracking-code-in-subtext-website-page" /></a></p>
<p>Save and close the <strong>PageTemplate.ascx</strong> file. If your site is hosted somewhere, copy and overwrite this <strong>PageTemplate.ascx</strong> onto the corresponding folder in the host.</p>
<p>If you are hosting multiple SubText blogs on the same domain, then repeat this <strong>PageTemplate.ascx</strong> modification for each skin for each of those blogs.</p>
<p>Next, open a browser window and visit the website.</p>
<p>Now right click on the page and click <strong>View Source</strong> and ensure that the Google Analytics tracking code is visible.</p>
<h2>Confirm the Tracking Code on your Google Analytics Account</h2>
<p>Visit the <a rel="nofollow" href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> website and sign in with your Gmail account.</p>
<p>You will now be taken to the main Analytics screen. At the top, you will see a message saying that ‘<strong>Tracking for your website has not been validated</strong>‘. Now that we have added the tracking code, click the <strong>Check Status</strong> Button.</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-check-tracking-status.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-check-tracking-status_tn.gif" alt="google-analytics-check-tracking-status" /></a></p>
<p>It is quite likely that you will be informed that the <strong>Tracking is Not Installed</strong>.</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-tracking-status.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-tracking-status_tn.gif" alt="google-analytics-tracking-status" /></a></p>
<p>Here is the important part. <span style="text-decoration: underline;">Be patient</span>. Often, it takes anywhere from a few minutes to a few hours for Google Analytics to detect the tracking code on your site and start gathering traffic statistics. So if you do get the ‘<strong>Tracking is Not Installed</strong>‘ message, just wait patiently. Take a walk, drink coffee, or if it is late at night, go to bed and then logon to your google analytics account again.</p>
<p>If the Tracking is successfully detected, then you will see it your website listed in the Website Profiles Table. The status column in the website profiles table will also show a status of ‘<strong>Receiving Data</strong>‘</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-website-profiles-table.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-website-profiles-table_tn.gif" alt="google-analytics-website-profiles-table" /></a></p>
<p>Click the “<strong>View Reports</strong>” and you are ready to see the traffic on your website !</p>
<p><a rel="lightbox" href="http://theshiva.us/images/blogimages/google-analytics-website-traffic-statistics.gif"><img src="http://theshiva.us/images/blogimages/google-analytics-website-traffic-statistics_tn.gif" alt="google-analytics-website-traffic-statistics" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mycodetrip.com/2006/12/11/how-to-add-google-analytics-to-subtext-blog_54/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

