<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Help Center Topic: Blogger: Image insertion in blogposts based on date</title>
		<link>http://www.labnol.org/forums/topic/blogger-image-insertion-in-blogposts-based-on-date</link>
		<description>Help Center Topic: Blogger: Image insertion in blogposts based on date</description>
		<language>en-US</language>
		<pubDate>Fri, 19 Mar 2010 12:50:15 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.labnol.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://www.labnol.org/forums/rss/topic/blogger-image-insertion-in-blogposts-based-on-date" rel="self" type="application/rss+xml" />

		<item>
			<title>Aneesh on "Blogger: Image insertion in blogposts based on date"</title>
			<link>http://www.labnol.org/forums/topic/blogger-image-insertion-in-blogposts-based-on-date#post-6270</link>
			<pubDate>Thu, 06 Aug 2009 19:53:30 +0000</pubDate>
			<dc:creator>Aneesh</dc:creator>
			<guid isPermaLink="false">6270@http://www.labnol.org/forums/</guid>
			<description>&#60;p&#62;Hmm is it possible but complicated.. :)&#60;/p&#62;
&#60;p&#62;the Post date is contained in the post url..So you can pass the post url to sume javascript function which grabs the date from the url and then outputs the proper &#60;/p&#62;
&#60;p&#62;&#38;lt;script type='text/javascript'&#38;gt;outputimage(&#38;quot;&#38;lt;data:post.url/&#38;gt;&#38;quot;);&#38;lt;/script&#38;gt;&#60;/p&#62;
&#60;p&#62;data:post.url will give you the post url..&#60;/p&#62;
&#60;p&#62;Place this code just above &#38;lt;data:post.body/&#38;gt;&#60;/p&#62;
&#60;p&#62;Also include an external javascript file(or you can embed the js code in your template itself) in the head section of your template..&#60;/p&#62;
&#60;p&#62;This Javascript should have a function named outputimage which accepts a string(the url) and grabs the date from it..And it should output the proper image code using the document.write function.&#60;/p&#62;
&#60;p&#62;This is a rough outline of how you can do it..If you want the javascript to work on the post pages only(and not on your label pages home page etc,then that too is possible if you use b:if conditional statements
&#60;/p&#62;</description>
		</item>
		<item>
			<title>investntrade on "Blogger: Image insertion in blogposts based on date"</title>
			<link>http://www.labnol.org/forums/topic/blogger-image-insertion-in-blogposts-based-on-date#post-6244</link>
			<pubDate>Tue, 04 Aug 2009 15:41:43 +0000</pubDate>
			<dc:creator>investntrade</dc:creator>
			<guid isPermaLink="false">6244@http://www.labnol.org/forums/</guid>
			<description>&#60;p&#62;Please note that I am looking for image changes on individual posts, not on the entire blog.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>investntrade on "Blogger: Image insertion in blogposts based on date"</title>
			<link>http://www.labnol.org/forums/topic/blogger-image-insertion-in-blogposts-based-on-date#post-6243</link>
			<pubDate>Tue, 04 Aug 2009 15:37:52 +0000</pubDate>
			<dc:creator>investntrade</dc:creator>
			<guid isPermaLink="false">6243@http://www.labnol.org/forums/</guid>
			<description>&#60;p&#62;For Blogger based blogs, is there any way to incorporate javascript (or some other programming script), to change the content of the blogpost based on certain details?&#60;/p&#62;
&#60;p&#62;Basically, this is what I want to achieve:&#60;br /&#62;
If the blogpost is less than 30 days old, then insert an image (say image1.jpg). If the blogpost is more than 30 days old, then insert image2.jpg
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
