blogger

How to get the blogger first image URL in the post

霸气de小男生 提交于 2020-01-14 06:11:54
问题 I want the URL of the FIrst image in the post and then use it as background image of a DIV 回答1: To get the URL of the first image in the post you can use the following data tag inside the Blogger template <data:blog.postImageUrl/> For setting it as the background , you would do something like <div class="newphoto" ></div> <script> document.getElementsByClassName('newphoto')[0].style.backgroundImage = "url('<data:blog.postImageUrl/>')" ; </script> or via jQuery $('.newphoto').css("background

Limitation in the number of posts to fetch with Blogger API (error 400)

给你一囗甜甜゛ 提交于 2020-01-13 20:00:06
问题 I am trying to fetch all the post from a blog using the Blogger API. The maximum number of posts to fetch seems to be limited to 20 for some unknown reasons. If I try this URL: https://www.googleapis.com/blogger/v3/blogs/3089072491354463482/posts?maxResults=20&fields=items(title)&key=AIzaSyAJO5J-pRCaGOIeRLIJfvAPwxpMLKvwebU I get the following response (listing the last 20 post titles as expected): { "items": [ { "title": "El Caballero" }, { "title": "Une traversée de frontière… étonnante!" },

How to add internationalization support to Blogger?

孤街醉人 提交于 2020-01-13 18:30:10
问题 How to add internationalization support to Blogger? Is it possible to deal with multiple languages within one blog? Is it possible to add own translation and don't use Google Translate widget? Thanks. 回答1: These should be set in html head of your blog (Design -> Edit HTML, insert after <head>) <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js' type='text/javascript'></script> <script src='http://csjs.googlecode.com/files/csjs_1.1.3.js' type='text/javascript'><

how to put non removable credit link

允我心安 提交于 2020-01-11 07:54:33
问题 I want to put a non removable credit link on my blogger templates but I don't know how. I have seen many templates using it but they are revealing their secrets. All of them obfuscate their codes. This is the below that I want to hapen. <a href="http://www.example.com" id="credit">Site name</a> When they change the example.com - they will be redirected to example.com when they remove or change the class "credit" they will be redirected.. They are putting their javascript code before . 回答1:

让你的Blog重获青春

喜你入骨 提交于 2020-01-08 10:24:08
3 Anne Zelenka 是一位生活在科罗拉多丹佛城的女技术Blogger,看看她怎么来看现在硅谷知名IT博客中的一些消极思想。女Blogger的笔触还是非常柔和,我道来未免有些生硬。以下为译文: 知名博客的倦怠情绪正在硅谷蔓延。 包括 Arrington 和 Scoble 都提出了这样的问题。也许他们只是 有点嫉妒 ,但作一个职业的Blogger的确是一件令人感到枯燥的事情。他甚至会让你变得麻木不仁。 如果你感到你的不快并不仅仅来自于嫉恨会怎么办?你可能只是感到疲倦。你看过太多,作过太多,所有的事情都那么相近,你知道太多的信息。你需要返回一种菜鸟的情绪,让所有的事情看起来都充满各种未知的可能,一切都那么的新鲜而让人激动。 那么如何才能返回这种菜鸟的情绪呢?这里是我会试的几种方式。 1,阅读新的东西。技术博客领域只是一片孤岛。那你其它的兴趣呢?时政、经济、法律、教育、衣着、饮食还是明星八卦?尝试阅读这些领域的Blog。看看那些并非和你那样对技术或者金钱念念不忘的人,那些技术以外的五彩生活。你也可以成为另一个读者,另一个评论者,在另一个圈子里。 2,作一些你并不擅长的事情。寻找学习一样新事物时的激动,重温菜鸟看问题的感受,把新的想法注入到你就的工作中。这些事情不一定是网上的,整理花园、学习油画或者是参加皮划艇运动都可以。 3,脚踏实地。无论是工作还是生活,都不会总是一日千里

How to add more than one selector in javascript

萝らか妹 提交于 2020-01-07 09:32:16
问题 How can i add more the one variable in JavaScript : var selector = 'a[href$=png]:has(img)'; So that it can get images with other format like jpg, jpeg and bmp also. Full script https://googledrive.com/host/0Bx94NfJgN888WWVnNTk5UHhhbk0 回答1: You can use multiple selectors in the same statement to select anything that matches either of your selectors, like so: $('.selector1, .selector2') This will match any element with the class selector1 or selector2. Therefore you could try something like the

Make thumbnail images on blogger homepage clickable

前提是你 提交于 2020-01-07 08:32:37
问题 i would like to have only the thumbnail images on the blog homepage clickable and linked to its article page Thanks http://jpst.it/y1x0 回答1: First thing first, you must add your code into the question. i took the code from your link and updated it with the hyperlink. Try this <script type='text/javascript'> //<![CDATA[ function removeHtmlTag(strx, chop) { if (strx.indexOf("<") != -1) { var s = strx.split("<"); for (var i = 0; i < s.length; i++) { if (s[i].indexOf(">") != -1) { s[i] = s[i]

Blogger css drop down menu shifts sub menu items to the right only in IE

烂漫一生 提交于 2020-01-07 02:16:47
问题 I am trying to add a css drop down menu to my blog in blogger. I am using some code that I found for a drop down menu. It works perfect in Firefox and Chrome but not in IE. I am using IE9 but have a meta tag to emulate IE7. In IE, the sub menu items are shifted over to the right instead of appearing directly below the main menu items. (Using my code as an example, the "2010 Interviews," "2011 Interviews," etc are not directly under "Radio Interviews" when I hover. They are shifted right. I

Blogger - data:post.snippet to replace data:blog.metaDescription for *:description

江枫思渺然 提交于 2020-01-05 08:21:37
问题 I am trying to figure out how to use the data:post.snippet function in blogger to bypass the Settings > Search preferences > Meta tags > Description or post Search Description that is being used as the variable for metaDescription. The snippet function would be a great way to set the description for facebook and twitter. Is there anyway to pickup the snippet as a data:blog variable? <b:if cond='data:blog.metaDescription != ""'> <meta expr:content='data:post.snippet' property='og:description'/

URL and customMetaData option in Blogger API

徘徊边缘 提交于 2020-01-05 04:23:12
问题 I am creating posts using Blogger API. In documentation of Blogger API: https://developers.google.com/blogger/docs/3.0/reference/posts In resource representation of Posts, I am interested in 2 columns: url and customMetaData Property name Value Description url string The URL where this post is displayed. customMetaData string The JSON metadata for the post. I am able to set title and content, but URL and Search Description are not working. I want to send Search Description in customMetaData,