How To Add The Blogger “Read More” Expandable Posts Link

Feb 14, 2010

How To Add The Blogger “Read More” Expandable Posts Link


This is a pretty popular Blogger hack that lots of people have asked me about. Instead of answering to each email individually, I thought it would make more sense to write an article about it.
With this hack, you can choose to display a select amount of text from the beginning of each post as a teaser instead of showing the entire post on the front page of your blog. Then when people want to read the rest of the post, they can click a “read more” link to see the full post. This is very handy if you have lots of long articles all on one page. (Note that you’ll need to have post pages enabled in order to make this feature work.)

Step #1 – Update Your Template Code

First you need to edit your existing code so I recommend copying and pasting it into notepad or any text editor. Also, it’s smart at this point to create a backup of your template just in case something goes wrong. Now do a search (CTRL + F) within the text editor for the following code post-header-line-1. This is the default code that Blogger includes but some custom templates remove or change this code so you might have trouble finding it. If you can’t locate this text then try searching for <data:post.body/> instead. Your template will for sure have this since it’s the tag that actually prints the body of your post.
Now depending on which code you were able to find will determine how easy the next steps will be. You might need to do some detective work first in order to get this working properly in your custom template. The idea is to get this new code into your template before the <data:post.body/> tag. Keep reading and hopefully the explanation will illustrate the concept clear enough so you are able to adapt this hack to your custom template.
Add the following code below the <div class=’post-header-line-1′/> and <div class=’post-header-line’> tags if you’ve got both.
<b:if cond='data:blog.pageType == "item"'>
<style>.fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>.fullpost{display:none;}</style>

The result should look something like this:
new-code-block.png
If you don’t have the default <div class='post-header-line-1'/> tag then your result should look something like this instead. This is how it would be done in the MushBlue Blogger custom template:
new-code-block-mush.png
Notice in both examples that the code in yellow and the <data:post.body/> tags are the same — it’s just tag above it that will differ based on the template you’re using.
Now let’s add one more bit of code which will actually create the “read more” link in your post. This code will go below the <data:post.body/> tag so copy the following and paste it in. Feel free to change the “Read more…” text to whatever you want the link to look like. Be careful not to delete any other code during this process.
<b:if cond='data:blog.pageType != "item"'><br />
<a expr:href='data:post.url'>Read more...</a>
</b:if>
</b:if>

Yes, there are supposed to be two </b:if> tags in the above code so don’t think it’ s a mistake. The result should look like this:
new-code-block-2.png
This code will be the same no matter what template you are using. Just make sure it goes below the <data:post.body/> as shown in the image above.
Now let’s look at what the final result should be. Here’s the updated code block you just worked on all put together:
new-code-block-3.png
Ok, you’re all done editing the template code. Paste it back into your Blogger html window and save it. If you get an error, you made a mistake. The most common mistake is to accidentally delete a > or < while pasting in the new code. If it saved successfully, it’s time to move onto the next step and modify a quick Blogger format setting.

Step #2 – Add a Class Tag in Your Default Post Template

For this step, you need to navigate in your Blogger account to “Settings” => “Formatting” and scroll all the way down to the bottom. It’s the last option called “Post Template”. You’re going to paste in the following code:
<span class="fullpost">
</span>
You’ll want to keep the spaces in there which will make sense later. After you save this, it will look like this:
post-template2.png

Step #3 – Create a New Post

Ok, we’ve got everything all setup so it’s time to go and test it out. Hopefully you’ve got a new post in mind for your blog. If not, then we’ll just create a test post which you can later delete. When you click on the “Posting” tab, you’ll notice that the post text area is now pre-populated with the <span class=”fullpost”> and </span> tags. If not, then you didn’t save it properly so go back and re-read step #2.
So when writing your new post, anything you put above the <span class=”fullpost”> tag will be the teaser text. The main body of your post needs to go in between the <span class=”fullpost”> and </span> tags in order for the “read more…” link to work properly. See the screenshot below. Sometimes pictures illustrate better than words.
post-template-result2.png
Now publish or preview your post to see the “read more” hack working on your blog. If it doesn’t show up for some reason, go back and run through the steps again. Most likely you pasted the code blocks in the wrong places. It’s difficult to troubleshoot these issues since each template can be unique so please make sure to double-check your template before asking for help in the comments section below.
Here’s the live post with the “read more…” link properly working based on the text I used above in the post text area.
post-results.png

Additional Info

If you want to go back and update your old posts with this new “read more…” feature you can. Just go back and edit each post manually. Essentially you’ll need to paste in the <span class=”fullpost”> and </span> tags breaking apart the post into two parts.
For some posts, you might not want to use this feature at all. If that’s the case, just delete the <span class=”fullpost”> and </span> tags from within your new post text area. Then your new post will show up entirely just like it used to before you implemented this hack. Enjoy!

50 Great Widgets For Your Blog

Feb 4, 2010

50 Great Widgets For Your Blog 

    Blog Widgets
Widgets are a handy, easy and simple way to add some flare to your blog. Whether you’d like to display the number of currently online visitors to your site or simply the weather report for Los Angeles, you can do it with widgets. We’ve assembled a list of 50 useful or simply cool widgets for your pleasure. And remember, the first rule of widgetizing your blog is – don’t overdo it!
MyBlogLog’s Recent Readers – this widget can easily be called a hit amongst blog owners; its popularity even managed to convince Yahoo into buying MyBlogLog. The widget lets you see the avatars of recent visitors to your blog, provided they’re also members of MyBlogLog.
Mashable () – get the latest social networking news from this very site.
Flickr Flash Photo Stream Badge – display images from your Flickr () profile with a handy Flash photo stream.
Preview Anywhere – see a live preview of outgoing links in a small popup which activates on mouseover. Some find this annoying, while others might find it useful.
Twitter Badge – if your life is so interesting that everyone must know what you’re up to all the time, then a Twitter () badge is the ideal counterpart to your blog. It’ll proudly displays your recent tweets.
Digg News – display the latest Digg () links on your blog. Themeable and fully customizable.
FEEDJIT – real time traffic data directly in your blog’s sidebar.
LineBuzz – inline comments for your blog. Very handy for blogs with frequent lively discussions.
Flixn – display a stream directly from your webcam, so your blog visitors can always see what you’re up to.
    Flixn
3Jam – lets your visitors send messages to your mobile phone, without them knowing your phone number.
Jaxtr – with Jaxtr, your visitors can actually call you to your mobile phone; again, your number stays private.
LinkedInABox – show off your LinkedIn () profile. Perfect for personal blogs.
Box Widget – enable visitors to use box.net’s online storage directly on your web site.
Price of gas – displaying gas prices on your blog might seem unnecessary to some, but it’s cool if you have a traffic/travel related blog.
iBegin Weather Widget – Display weather information in your sidebar. Just like with Price of Gas, works great with travel-related blogs.
ClockLink – display time in various time zones with these nifty Flash clocks.
Film Loops – display the latest loops from your FilmLoops account.
Daily Painters – display paintings from famous painters on your blog.
WhoLinked – show your visitors which sites have recently linked to your web site. Works with all major blog platforms.
Criteo AutoRoll – displays links to blogs similar to your blog.
Bitty Browser – embed a cute, fully functional mini web browser to your blog.
Leafletter – create a mini website and embed it into your blog.
    Leafletter
WikiSeek – search Wikipedia (Wikipedia) with this simple widget.
FeedCount – show off the number of visitors to your blog with this handy little button.
Technorati Link Count – display the number of links your website has from one of the biggest blog authorities – Technorati.
MyPageRank – another good way to show how “big” your blog is is to show off your Google PageRank.
CheckPageRank – in addition to showing your PageRank, this widget also shows your Alexa ranking.
BlinkxIt – embed a link to related videos directly into your website.
Skype button – display your Skype (Skype) online/offline status on your blog.
RockYou Horoscope – not something I would personally use, but some people are into horoscope. Hell, most people are into horoscope. Anyway, this widget shows horoscope (doh!) and does it in a nicely designed colorful box.
    Horoscope
del.icio.us Tagometer – display how many times have del.icio.us users saved your page.
del.icio.us Linkrolls – this badge shows your latest bookmarks from del.icio.us.
Timelines – need to create a timeline? Seek no further. This widget makes it really easy.
PollDaddy – PollDaddy lets you create beautiful polls in no time, and display them at your blog.
Vizu – another poll-making widget, compatible with all major blog platforms.
AnswerTips – display definitions from Answers.com for various terms on your blog. The definitions are shown in bubbles which are activated on doubleclick.
AnswerBoxes – give your visitors a chance to enter a term themselves, and get a definition from Answers.com
Now Playing – if you got to share your current playlist contents with the world, Sigamp will do the trick. Works with most popular music players, including Foobar, Winamp, iTunes and others.
BuzzBoost – display headlines from your RSS feed on any website.
LibraryThing (LibraryThing) – show off the latest books you’ve been reading.
Plaxo Address Book – let your most faithful visitors access their address books direclty from your site.
    Plaxo
AuctionAds – a widget that displays auctioned items on eBay, and gives you a percentage of the price paid when sometimes buys an item.
aStore – similar to AuctionAds, only for Amazon. Create a mini-store on your site and receive profit when someone buys an item through your store.
Plazes – show your current location on a Plazes map.
Stockalicious – track your portfolio with this widget, and share it with others. Let everyone know how much money you’ve lost.
Yahoo! For Good – create a charity badge and ask for donations for a worthy cause.
Giftspace – your friends never know what to buy you for birthday? Let them know what you really want with this nifty widget.
MixMap – see where are the visitors to your MySpace (MySpace) profile from on a map.
    MixMap
Google Map Widget – display a searchable Google Map on your website.
Google Video Search – add a video search form and selected videos to your web site.
Odeo player – display an Odeo player for and podcast right there in your sidebar.

Put Paypal Donation Code to Your Blogspot

Feb 3, 2010

Put Paypal Donation Code to Your Blog/Site
Do you put this box in your blog/site? Well many of us want put this code on their own blog/site like those popular sites but they don’t how. Well i am very glad to teach you and going tell you how.
In order to receive donations, you need a paypal account. If you don’t have a paypal account, click here to sign up one.

Update: Put Paypal Donation Buttons to Blogspot 

How to: Put Paypal Donation Code to Your Blogspot

First login to your blogger dashboard, and go to Layout -&gt; Page Elements.

blogger 1


Add a Gadget, choose HTML/JavaScript and add the codes provided below.

gadget1
Paypal Donation Code:-



 <!-- The-Online-Quest Pay Pal Donation Form Code Start -->
 
<center><table border="1" width="143" cellspacing="0" cellpadding="0"  
bordercolorlight="#FFF8E8" bordercolordark="#EFE0C9">

<tr><td><center><img src=http://www.djyano.com/wp-content/
uploads/2009/03/credit-card.png /><center></td></tr>
<tr><td><form action="https://www.paypal.com/row/cgi-bin/webscr" 
name="_xclick" method="post">

<input value="Thank you for your support on Blog/Website Title"  
name="item_name" type="hidden"/>
<input value="YOUR PAYPAL EMAIL ADDRESS" name="business" 
type="hidden"/>

<input value="_xclick" name="cmd" type="hidden"/>
<!-- input type="hidden" name="amount" value="1.00" -->

<font face="Tahoma" size="3">Amount:</font><select name="amount" 
size="1">

<option selected value="1.00"/>1.00<option value="2.00"/>2.00<
option value="3.00"/>3.00
<option value="4.00"/>4.00<option value="5.00"/>5.00</select>
<font face="Tahoma" size="3">Currency in:</font><select name="
currency_code" size="1">

<option value="AUD"/>Australian Dollar<option selected value= 
"USD"/>USD<option value="GBP"/>British Pound
<option value="CAD"/>Canadian Dollars<option value="CZK"/> 
Czech Koruna<option value="DKK"/>Danish Kroner
<option value="EUR"/>EUR<option value="HKD"/>Hong Kong Dollars 
<option value="HUF"/>Hungarian Forint
<option value="JPY"/>Japanese YEN<option value="NZD"/>New 
Zealand Dollars<option value="NOK"/>Norwegian Kroner
<option value="PLN"/>Polisg Zlotych<option value="SGD"/>Singapore
 Dollars<option value="SEK"/>Swedish Kronor
<option value="CHF"/>Swiss Francs</select>
<p align="center"><input border="0" alt="Put Paypal Donation Code 
to Your Blog/Site" src="http://www.djyano.com/wp-content/uploads/
2009/03/buttin.png" name="submit" type="image"/></td></tr></form> 
</p>

<tr><td><center><b><font face="Tahoma" size="1.5">Powered by <a  
href="http://www.djyano.com/put-paypal-donation-code-to-your-blo
gsite" target="_blank"><img src="http://www.djyano.com/wp-conte
nt/uploads/2009/03/logo2.gif"></a></font></b></center></td></tr> 
</table></center>

 
<!-- End of The-Online-Quest Pay Pal Donation Form Code -->





What you need to edit before you save your HTML/JavaScript:-


Find this code at the seventh line and change Blog/Website Title to your Blog title.


value="Thank you for your support on Blog/Website Title" name="item_name" type="hidden"/&gt;
 
Find this code at the ninth line and change YOUR PAYPAL EMAIL ADDRESS to your Paypal email.
 
value="YOUR PAYPAL EMAIL ADDRESS" name="business" type="hidden"/&gt;


Once you’ve satisfied, click the Save button and enjoy your new Paypal Donation Code.


Please don’t remove Powered by , please provide credits for my hard work.