Aug 25, 2010

The Blogger “Read More” Expandable Posts Link

ဒီဟာလည္း Read more button လုပ္တာပါပဲ။ လြယ္လဲလြယ္လုိ႔ ေနာက္ပီးေတာ့ သူ႔မွာ တျခားျဖည့္စရာ javascript ေတြလည္း မလုိဘူးေလ. Edit html မွာ copy ကူးထည့္လုိက္ရံုပဲ။ ဒီ Read more ကေတာ့ သူ႔ကုိ ႏွိပ္လုိက္တာနဲ႔ အဲဒီ ပုိစ့္ ကုိတစ္ခုတည္း သပ္သပ္ေဖာ္ျပမွာ ျဖစ္ပါတယ္။ ပုိစ္ေအာက္ေျခမွာလည္း comment box ကုိ ေတြ႔ရမွာ ျဖစ္ပါတယ္။ အရင္က ေရးခဲ့ဖူးတဲ့ Read more လုိပါပဲ ။ ဒါေပမယ့္ blogger new editor နဲ႔ လုပ္တာ မဟုတ္ပါဘူး ။
Step #1 - Update Your Template Code
အရင္ဆံုး widge ကုိ expend အရင္လုပ္ပါ။ ျပီးရင္ post-header-line-1 ဆုိတဲ့ကုတ္ကုိ ရွာပါ။ ျပီးရင္ ေအာက္က ကုတ္ေတြကုိ < class="’post-header-line-1′/"> တို႔ < class="’post-header-line’"> တုိ႔ ေနာက္ကေန ထည့္ပါ။

< b:if cond='data:blog.pageType == "item"'>
< style> .fullpost{display:inline;}</style>
< p> < data:post.body/></p>
< b:else/>
< style > .fullpost{display:none;} < /style>




ျပီးရင္ Read more ကုိ ႏွိပ္လုိက္ရင္ ေပၚေအာင္ ကုတ္ထည့္ပါမယ္။ ေအာက္ကကုတ္ပါ။

< b:if cond='data:blog.pageType != "item"'> < br />
< a expr:href='data:post.url'> Read more...< /a>
< /b:if>
< /b:if>



ဒီမွာ if ႏွစ္ခုျဖစ္ေနလုိ႔ မွားမယ္ ထင္ေနဦးမယ္။ မမွားပါဘူး။ ကုတ္ေတြ အားလံုးထည့္ပီးရင္ final ပံုက ဒီမွာပါ။ အ၀ါနဲ႔ ျပထားတာက အဲဒါ ျဖည့္လုိက္တဲ့ကုတ္ေတြပါ။

Step #2 - Add a Class Tag in Your Default Post Template
ျပီးရင္ post template ကုိ ျပင္ပါမယ္။ settings က formatting ကို သြားပီးေတာ့ ေအာက္ဆံုးအကြက္မွာ

< class="fullpost">
< /span>

အတုိင္းျဖည့္လုိက္ပါ ။ save setting လုပ္ပါ။ ဒါဆုိရင္ New post လုပ္မယ္ ၾကံတုိင္း အဲဒီ span ကုိ ေတြ႔ရမွာ ျဖစ္ပါတယ္။

Step #3 - Create a New Post
ပုိစ္ အသစ္ကုိတင္ႏုိင္ပါပီ။ အဲဒါ တင္တဲ့ အခါမွာ span tab ႏွစ္ခုၾကားထဲမွာ ထည့္ရမယ့္ အေၾကာင္းေတြက ေတာ့ Read more ကုိ ႏွိပ္လုိက္ရင္ ေပၚေစခ်င္တဲ့ အရာေတြ ျဖစ္ပါတယ္။ ေအာက္က ပံုမွာၾကည့္ပါ။

MORE info -> http://bloggingforbread.blogspot.com/2008/02/add-blogger-read-more-expandable-posts.html