I found some search hits on my blog were actually the false positives. The keywords the visitors used were actually hit on the Popular Post list.
I don't like this, so I remove it. It's the same reason why my blog doesn't have Recent Posts or some other whatsoever the lists they are. I hate when I click on a result and find out that's not what I am looking for at all. I have encountered a few times, that the results were from blogs' blogroll. What can you do about it? Nothing, no one do care. Search engine providers do not care, blog owners do not care. Hits are all they care. (The last sentence is not totally true but close)
I even added
I am thinking to add an AJAX version of Popular Posts list, but I haven't got a nice idea to do so. It's obviously I couldn't get the list from the official list since there is no API available.
If I could, I would put some buttons on. Visitors could decide if they want to load of lists of some things, such as Popular Posts, Recent Posts, Recent Comments, etc.
By the way, while I was removing the gadget, I saw Blogger has used a new good-looking dialog:
I was thinking to do something like this, which uses FeedBurner Awareness API to list popular entries. I have written an working code, here is the diff for my existing script:
I am not going to put this on. After I saw the results, I knew it's not a good idea. Because only entries currently in feed would get view counts or click-through, which doesn't reflect the real view counts. You can not really call them as popular posts. Popularly recent posts might make more sense.
I guess Popular Posts wouldn't come back anytime soon.
I don't like this, so I remove it. It's the same reason why my blog doesn't have Recent Posts or some other whatsoever the lists they are. I hate when I click on a result and find out that's not what I am looking for at all. I have encountered a few times, that the results were from blogs' blogroll. What can you do about it? Nothing, no one do care. Search engine providers do not care, blog owners do not care. Hits are all they care. (The last sentence is not totally true but close)
I even added
<meta content='noindex' name='robots'/>
to yearly/monthly archive pages for preventing more such occurrences. Search engines are still too dumb, let's all I could say.I am thinking to add an AJAX version of Popular Posts list, but I haven't got a nice idea to do so. It's obviously I couldn't get the list from the official list since there is no API available.
If I could, I would put some buttons on. Visitors could decide if they want to load of lists of some things, such as Popular Posts, Recent Posts, Recent Comments, etc.
By the way, while I was removing the gadget, I saw Blogger has used a new good-looking dialog:
Updated 2010-11-21
I was thinking to do something like this, which uses FeedBurner Awareness API to list popular entries. I have written an working code, here is the diff for my existing script:
diff -r c29f74858f02 src/static/g/fb/fb.js
--- a/src/static/g/fb/fb.js Mon Nov 01 19:45:52 2010 +0800
+++ b/src/static/g/fb/fb.js Sun Nov 21 14:19:49 2010 +0800
@@ -33,6 +33,21 @@
}
+function lilbtn_g_fb_get_resyndication_data(feed_url, dates, callback) {
+ if (!feed_url || !callback)
+ return
+ google.setOnLoadCallback(function() {
+ var query = "select * from xml where url='https://feedburner.google.com/api/awareness/1.0/GetResyndicationData?uri=" + encodeURIComponent(feed_url) + (!!dates ? "&dates=" + dates : "") + "'"
+ $.getJSON("http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(query) + "&format=json&callback=?", function(json) {
+ if (json.error)
+ callback(json)
+ else
+ callback(json.query.results.rsp);
+ });
+ })
+ }
+
+
function lilbtn_g_fb_text_render(feed_url, container, _texts) {
lilbtn_g_fb_get_feed_data(feed_url, function(rsp) {
if (container == undefined)
@@ -89,4 +104,46 @@
ele.attr('class', ele.attr('class') + ' lilbtn_g_fb_feedcount');
});
}
+
+
+function lilbtn_g_fb_popular_items_render(feed_url, container) {
+ lilbtn_g_fb_get_resyndication_data(feed_url, '2010-11-11,2010-11-19', function(rsp) {
+ if (container == undefined)
+ container = 'lilbtn_g_fb_popular_items';
+ var $ele = $('#' + container);
+ if (rsp.error || rsp.stat != 'ok') {
+ var msg = 'Error on retrieving resyndication data: ' + ((rsp.error) ? rsp.error.description : rsp.err.msg) + '; Click to check out lil\u2218btn website for help';
+ ele.html('<a href="http://lilbtn.appspot.com/help" class="lilbtn_g_fb_popular_items lilbtn_error""><img src="http://lilbtn.appspot.com/img/error.png" alt="' + msg + '" title="' + msg + '"/></a>');
+ return;
+ }
+ var items = {};
+ $.each(rsp.feed.entry, function(idx_e, entry) {
+ if(entry.item)
+ $.each(entry.item, function(idx_i, item) {
+ if (items[item.url]) {
+ items[item.url].score += parseInt(item.itemviews);
+ }
+ else {
+ items[item.url] = {title: item.title, url: item.url, score: parseInt(item.itemviews)};
+ }
+ });
+ });
+ var items_sort = [];
+ $.each(items, function(url, item) {
+ items_sort.push([item.score, item]);
+ });
+ // Sort from highest to lowest score
+ items_sort.sort(function(a,b){return b[0] - a[0];});
+ items = $.map(items_sort, function(item) {return item[1]});
+ delete items_sort;
+ var $ul = $('<ul/>');
+ $.each(items, function(idx, item) {
+ var $li = $('<li/>');
+ var $a = $('<a/>').attr('href', item.url).text(item.score + ': ' + item.title);
+ $li.append($a);
+ $ul.append($li);
+ });
+ $ele.append($ul);
+ });
+ }
// vim:ts=2:sw=2:et:ai:
I am not going to put this on. After I saw the results, I knew it's not a good idea. Because only entries currently in feed would get view counts or click-through, which doesn't reflect the real view counts. You can not really call them as popular posts. Popularly recent posts might make more sense.
I guess Popular Posts wouldn't come back anytime soon.
0 comments:
Post a Comment