Showing posts with label Google. Show all posts
Showing posts with label Google. Show all posts

Backup Blogspot

Trường hợp nguy hiểm nhất là Google xóa blog của bạn! Một khi blog đã bị xóa thì không thể lấy lại được, do đó backup là rất cần thiết!
Nếu gõ vào thanh địa chỉ
http://blogname.blogspot.com/search?max-results=N
sẽ mở ra một trang liệt kê N bài viết của blogname.blogspot.com. Như vậy nếu bạn save trang này lại tức là đã backup xong blog! Thật đơn giản phải không bạn?
Bạn nên chọn số N sao cho lớn hơn hoặc bằng số bài viết của blog (ví dụ N =1000). Số bài viết của blog có thể xem trong trang Dashboard hoặc trang Quản lý bài viết.
Muốn download tất cả các hình ảnh trên trang vừa mở, bạn dùng một addson của FireFox. Khi chạy add-on này FireFox sẽ down về hết các hình ảnh trên trang được mở.
Bạn cũng có thể backup bài viết dưới dạng xml (feed) theo địa chỉ
http://blogname.blogspot.com/feeds/posts/default?max-results=N
và dùng file xml này bạn có thể import vào một số database có hỗ trợ!
Backup các comments theo địa chỉ:
http://blogname.blogspot.com/feeds/comments/default?max-results=N

Insert Google Adsense Into Blogger XML Post Body

Have you ever tried to insert the Google Adsense code directly into your Blogger XML Template and may be get this error?

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The processing instruction target matching "[xX][mM][lL]" is not allowed.

So, you resolve to insert the Adsense code using blogger widgets. However that means your widgets can not appear within each post, the best spots to place your ads. Don't worry, there is a way of inserting Adsense code straight into your XML templates.

Since Blogger started using XML everything is more strict and standardized. The above error simply mean the Adsense code is not standized XML and solve it we need to replace all the html character such as '<' with '>' '"' with '"'.

For example:

<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXX";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

then would be

&lt;script type=&quot;text/javascript&quot;><!--
google_ad_client = "pub-XXXXXXXXXXXXXXX";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as&quot;;
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "000000";
//--></script&gt;
<script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;>
</script&gt;

You can use your text editor to replace all the HTML, but Blogcrowds also has an HTML parsed that takes care of everything for you. Now with the code you can paste it anywhere in your HTML code with no error at all.

Here are some tips for where in the XML Template you should paste the parsed HTML code. I used a barebone Minima template so it should be similar in all templates. Find the normal text and then add the bolded code are added by me:

1)Next To The Post






<div style="float:left;">
<!--parsed Adsense code-->
</div>

<div class='post-body'>
<p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>


2)After Post Before Credits








<div class='post-body'> <p><data:post.body/></p> <div style='clear: both;'/> <!-- clear for photos floats --> </div>

<div><!--parsed Adsense code--></div>

<div class='post-footer'> <p class='post-footer-line post-footer-line-1'> <span class='post-author'> <b:if cond='data:top.showAuthor'> <data:top.authorLabel/> <data:post.author/>






3)After Credits










<p class='post-footer-line post-footer-line-3'/>

<div><!--parsed Adsense code--></div>
</div>
</div>
</b:includable>
</b:widget>
</b:section>




Good Luck!!
/