Lên đầu trang
Xuống cuối trang

<!--
[Thủ Thuật Blog] Chia sẻ code Sitemap cực đẹp cho Blogspot
https://choiblogs.blogspot.com/2018/11/chia-se-code-sitemap-cuc-ep-cho-blogspot.html
-->

<style type="text/css">
#table-outer td{min-width:150px;color:#fff;}
#table-outer select,
#table-outer select,
#table-outer input{width:250px;border:1px solid #766469;color:#000;font-size:11px;padding:4px;}
#feedContainer li{border-top:#fff;border-bottom:1px solid #DADADA;margin-bottom:10px;float:left;width:100%;padding:5px 0;}
#feedContainer,
#feedContainer li{list-style:none;overflow:hidden;margin:0;}
#feedNav{text-align:center;line-height:30px;background-color:#fff;border-radius:3px;border:1px solid #fff;margin:10px 0 0;}
</style>
<div class="archiver"><div id="box_left" style="padding: 10px;"><div id="table-outer"><table border="0"><tbody>
<tr><td><label><span class="text">Sắp xếp:</span></label></td><td><select class="input" id="orderFeedBy"><option selected="" value="published">Phim Mới</option><option value="updated">Phim Cũ</option></select></td></tr>
<tr><td><label><span class="text">Danh sách nhãn:</span></label></td><td><span id="labelSorter"><select class="input" disabled=""><option selected="">Đợi Xíu...</option></select></span></td></tr>
<tr><td><label><span class="text">Từ khóa tìm kiếm (gõ có dấu):</span></label></td><td><form id="postSearcher"><input class="input" type="text" /></form></td></tr>
</tbody></table></div><header id="resultDesc"></header><br />
<ul id="feedContainer"></ul><div id="feedNav">Loading...</div>
<script type="text/javascript">
//<![CDATA[
var tocConfig = {
url: 'http://choiblogs.blogspot.com',
feedNum: 30,
labelName: (window['location']['hash'] && window['location']['hash'] != '#0' && window['location']['hash'] != '#search') ? encodeURIComponent(window['location']['hash']['substr'](1)) : false,
numChars: 300,
thumbWidth: 80,
navText: 'Xem thêm',
frontText: 'Bay lên đầu',
noImage: 'http://1.bp.blogspot.com/-htG7vy9vIAA/Tp0KrMUdoWI/AAAAAAAABAU/e7XkFtErqsU/s1600/grey.gif',
loading: '<span>Loading...</span>',
searching: '<span>Đang Tìm Kiếm...</span>',
MonthNames: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
noResult: 'No Result'
};

function getID(_0x444ex3) {
return document['getElementById'](_0x444ex3);
};
var head = document['getElementsByTagName']('head')[0],
tocContainer = getID('feedContainer'),
feedNav = getID('feedNav'),
orderByer = getID('orderFeedBy'),
labelSorter = getID('labelSorter'),
input = getID('postSearcher')['getElementsByTagName']('input')[0],
resultDesc = getID('resultDesc'),
nextPage, feedArchive, startPage = 0;

function cropFeed(_0x444exf, _0x444ex10) {
var _0x444ex11 = _0x444exf['split']('<');
for (var _0x444ex12 = 0; _0x444ex12 < _0x444ex11['length']; _0x444ex12++) {
if (_0x444ex11[_0x444ex12]['indexOf']('>') != -1) {
_0x444ex11[_0x444ex12] = _0x444ex11[_0x444ex12]['substring'](_0x444ex11[_0x444ex12]['indexOf']('>') + 1, _0x444ex11[_0x444ex12]['length']);
};
};
_0x444ex11 = _0x444ex11['join'](' ');
_0x444ex11 = _0x444ex11['substring'](0, _0x444ex10 - 1);
return _0x444ex11;
};

function showLabels(_0x444ex10) {
var _0x444ex14 = _0x444ex10['feed']['category'],
_0x444exf = '';
_0x444exf = '<select id=\'labelSorter\' onchange=\'changeSort(this.value);\'>';
_0x444exf += '<option value=\'\' selected>Thể Loại</option>';
for (var _0x444ex3 = 0; _0x444ex3 < _0x444ex14['length']; _0x444ex3++) {
_0x444exf += '<option value=\'' + decodeURIComponent(_0x444ex14[_0x444ex3]['term']) + '\'>' + _0x444ex14[_0x444ex3]['term']['toUpperCase']() + '</option>';
};
_0x444exf += '</select>';
labelSorter['innerHTML'] = _0x444exf;
};

function showFeedList(_0x444ex16) {
var _0x444ex17 = _0x444ex16['feed']['entry'],
_0x444ex18, _0x444ex19, _0x444ex1a, _0x444ex1b, _0x444ex12, _0x444ex1c, _0x444ex1d, _0x444ex1e, _0x444ex1f, _0x444ex20, _0x444ex10 = '';
if (typeof (_0x444ex16['feed']['entry']) !== 'undefined') {
for (var _0x444ex11 = 0; _0x444ex11 < tocConfig['feedNum']; _0x444ex11++) {
_0x444ex18 = (_0x444ex17) ? _0x444ex17[_0x444ex11] : '';
nextPage = '';
if (_0x444ex11 == _0x444ex16['feed']['entry']['length']) {
break;
};
_0x444ex19 = _0x444ex18['title']['$t'];
for (var _0x444exf = 0; _0x444exf < _0x444ex18['link']['length']; _0x444exf++) {
if (_0x444ex18['link'][_0x444exf]['rel'] == 'alternate') {
_0x444ex1a = _0x444ex18['link'][_0x444exf]['href'];
break;
};
};
for (var _0x444ex3 = 0; _0x444ex3 < _0x444ex16['feed']['link']['length']; _0x444ex3++) {
if (_0x444ex16['feed']['link'][_0x444ex3]['rel'] == 'next') {
nextPage = _0x444ex16['feed']['link'][_0x444ex3]['href'];
};
};
for (var _0x444ex14 = 0; _0x444ex14 < _0x444ex18['link']['length']; _0x444ex14++) {
if (_0x444ex18['link'][_0x444ex14]['rel'] == 'replies' && _0x444ex18['link'][_0x444ex14]['type'] == 'text/html') {
_0x444ex20 = _0x444ex18['link'][_0x444ex14]['title'];
break;
};
};
if ('content' in _0x444ex18) {
_0x444ex12 = _0x444ex18['content']['$t'];
} else {
if ('summary' in _0x444ex18) {
_0x444ex12 = _0x444ex18['summary']['$t'];
} else {
_0x444ex12 = '';
};
}; if ('media$thumbnail' in _0x444ex18) {
_0x444ex1b = _0x444ex18['media$thumbnail']['url']['replace'](/\/s[0-9]+\-c/, '/s' + tocConfig['thumbWidth'] + '-c');
} else {
_0x444ex1b = tocConfig['noImage']['replace'](/\/s[0-9]+\-c/, '/s' + tocConfig['thumbWidth'] + '-c');
};
postdate = _0x444ex18['published']['$t']['substring'](0, 10);
_0x444ex1c = postdate['substring'](0, 4);
_0x444ex1d = postdate['substring'](5, 7);
_0x444ex1e = postdate['substring'](8, 10);
_0x444ex1f = tocConfig['MonthNames'][parseInt(_0x444ex1d, 10) - 1];
_0x444ex10 += '<li><div>';
_0x444ex10 += '<a href=\'' + _0x444ex1a + '\' target=\'_blank\'><img style=\'float:left;width:' + tocConfig['thumbWidth'] + 'px;height:' + tocConfig['thumbWidth'] + 'px;margin-right:10px;\' src=\'' + _0x444ex1b + '\' alt=\'' + _0x444ex19 + '\' /></a>';
_0x444ex10 += '<h2 style=\'font-size:14px;\'><a href=\'' + _0x444ex1a + '\' target=\'_blank\'>' + _0x444ex19 + '</a></div>';
_0x444ex10 += '<div style=\'margin-top:5px;\'>' + cropFeed(_0x444ex12, tocConfig['numChars']) + '&hellip;<br style=\'clear:both;\'/></h2>';
_0x444ex10 += 'on: <span>' + _0x444ex1e + '</span>/<span>' + _0x444ex1f + '</span>/<span>' + _0x444ex1c + '</span></div></div></li>';
};
if (input['value'] !== '' && window['location']['hash'] == '#search') {
resultDesc['innerHTML'] = '<span>Search Result for Keyword <strong>&quot;' + input['value'] + '&quot;</strong></span>';
} else {
resultDesc['innerHTML'] = '';
};
feedContainer['innerHTML'] += _0x444ex10;
if (nextPage) {
if (window['location']['hash'] && window['location']['hash'] !== '#0') {
_0x444ex10 = '<a href=\'javascript:initResult(2);\' class=\'next\'>' + tocConfig['navText'] + '</a>';
} else {
_0x444ex10 = '<a href=\'javascript:initResult(1);\' class=\'next\'>' + tocConfig['navText'] + '</a>';
};
} else {
_0x444ex10 = '<a href=\'#table-outer\' onclick=\'jQuery(&apos;html, body&apos;).animate({scrollTop: jQuery(&apos;#table-outer&apos;).offset().top}, 1500); return false\' class=\'front\'>' + tocConfig['frontText'] + '</a>';
};
feedNav['innerHTML'] = _0x444ex10;
input['value'] = '';
labelSorter['getElementsByTagName']('select')[0]['removeAttribute']('disabled');
orderByer['removeAttribute']('disabled');
} else {
feedContainer['innerHTML'] = '';
alert(tocConfig['noResult']);
feedNav['innerHTML'] = '<a href=\'?reload=true\'>' + tocConfig['frontText'] + '</a>';
searchDesc['innerHTML'] = '';
};
};

function initResult(_0x444ex14) {
var _0x444ex3, _0x444ex10;
if (_0x444ex14 == 1) {
_0x444ex3 = nextPage['indexOf']('?');
_0x444ex10 = nextPage['substring'](_0x444ex3);
} else {
if (_0x444ex14 == 2) {
_0x444ex3 = nextPage['indexOf']('?');
_0x444ex10 = nextPage['substring'](_0x444ex3)['replace'](/\?/, '/-/' + window['location']['hash']['substr'](1) + '?');
} else {
_0x444ex10 = '?start-index=1&max-results=' + tocConfig['feedNum'] + '&orderby=' + orderByer['value'] + '&alt=json-in-script';
};
};
_0x444ex10 += '&callback=showFeedList';
updateScript(_0x444ex10);
};

function removeScript() {
var _0x444ex14 = getID('temporer-script');
_0x444ex14['parentNode']['removeChild'](_0x444ex14);
};

function buildLabels() {
var _0x444ex14 = document['createElement']('script');
_0x444ex14['type'] = 'text/javascript';
_0x444ex14['src'] = (tocConfig['url'] === '' ? window['location']['protocol'] + '//' + window['location']['host'] : tocConfig['url']) + '/feeds/posts/summary?max-results=0&alt=json-in-script&callback=showLabels';
head['appendChild'](_0x444ex14);
};

function updateScript(_0x444ex3) {
if (startPage == 1) {
removeScript();
};
feedNav['innerHTML'] = tocConfig['loading'];
if (tocConfig['labelName'] !== false) {
feedArchive = (tocConfig['url'] === '' ? window['location']['protocol'] + '//' + window['location']['host'] : tocConfig['url']) + '/feeds/posts/summary/-/' + tocConfig['labelName'] + _0x444ex3;
} else {
feedArchive = (tocConfig['url'] === '' ? window['location']['protocol'] + '//' + window['location']['host'] : tocConfig['url']) + '/feeds/posts/summary' + _0x444ex3;
};
var _0x444ex14 = document['createElement']('script');
_0x444ex14['type'] = 'text/javascript';
_0x444ex14['src'] = feedArchive;
_0x444ex14['id'] = 'temporer-script';
head['appendChild'](_0x444ex14);
startPage = 1;
};

function changeSort(_0x444ex10) {
removeScript();
tocContainer['innerHTML'] = '';
feedNav['innerHTML'] = tocConfig['loading'];
var _0x444ex3 = document['createElement']('script'),
_0x444exf = labelSorter['getElementsByTagName']('select')[0],
_0x444ex14 = (_0x444ex10 !== 0) ? '/-/' + _0x444ex10 : '';
_0x444ex3['type'] = 'text/javascript';
_0x444ex3['id'] = 'temporer-script';
_0x444ex3['src'] = (tocConfig['url'] === '' ? window['location']['protocol'] + '//' + window['location']['host'] : tocConfig['url']) + '/feeds/posts/summary' + _0x444ex14 + '?alt=json-in-script&max-results=' + tocConfig['feedNum'] + '&orderby=' + orderByer['value'] + '&callback=showFeedList';
head['appendChild'](_0x444ex3);
_0x444exf['disabled'] = true;
orderByer['disabled'] = true;
window['location']['hash'] = _0x444ex10;
};

function searchPost() {
removeScript();
tocContainer['innerHTML'] = '';
resultDesc['innerHTML'] = '';
feedNav['innerHTML'] = tocConfig['searching'];
var _0x444ex14 = document['createElement']('script');
_0x444ex14['type'] = 'text/javascript';
_0x444ex14['id'] = 'temporer-script';
_0x444ex14['src'] = (tocConfig['url'] === '' ? window['location']['protocol'] + '//' + window['location']['host'] : tocConfig['url']) + '/feeds/posts/summary?alt=json-in-script&orderby=published&q=' + input['value'] + '&max-results=9999&callback=showFeedList';
head['appendChild'](_0x444ex14);
window['location']['hash'] = '#search';
return false;
};
getID('postSearcher')['onsubmit'] = function () {
return searchPost();
};
orderByer['onchange'] = function () {
changeSort(0);
};
labelSorter['getElementsByTagName']('select')[0]['onchange'] = function () {
changeSort(this['value']);
};
window['onload'] = function () {
initResult(0);
buildLabels();
window['location']['hash'] = '#0';
};
//]]>
</script>
<div class="clear"></div></div></div>

feedNum: 30, : Số ký tự tối đa tiêu đề sẽ hiển thị.
numChars: 300, : Số ký tự mô tả bài viết sẽ hiển thị ( 0 là không hiển thị mô tả thay vào đó sẽ là dấu '...')
thumbWidth: 80, : Độ rộng của ảnh thumbnails bài viết, hãy thay đổi cho phù hợp với Blogspot của bạn.

NGUỒN:
https://forum.vietdesigner.net/threads/chia-se-code-sitemap-cuc-dep-cho-blogspot.104485/

Posted by Dung-Tran-Design Thứ Ba, 13 tháng 11, 2018

0 comments

Đăng nhận xét

_ Khi nhận xét không phải xác minh từ.
_ Bạn nhận xét xong sẽ được quản lý duyệt.
_ Spam link vào nhận xét xem như bạn đã chưa nhận xét !
_ Ghé thăm tôi vào những lúc bạn vui hoặc buồn và khi cần hổ trợ gì đó !
_ Khi bài viết nào có lỗi: xin vui lòng góp ý chân thành! cảm ơn!!!

Nhãn Đám Mây

Software (755) Video (582) Video-Fun (227) Thủ Thuật Blog (211) System tools (184) Hài Kịch (182) Video-Pro (179) Pictures-Fun (161) Tin gì (156) Tin gì ? (154) THỦ THUẬT INTETNET (136) Wallpaper (123) Pictures-Girl Xinh (117) Gift of life (110) Internet Tools (105) Games (75) Template PTS (67) Skin-Gaw2 (66) Giải Trí (65) Others (60) Video-Shock (58) Thủ Thuật Máy Tính (48) Design Tools (46) Download Tools (43) Music (43) CSS ChoiBlogs (41) Anti-Virus (39) Sức Khoẻ (32) Kỹ Năng Sống (30) MultiMedia (28) Video-Tools (28) Cosplay (25) USB Tools (24) Browsers (22) Desktop (22) PDF Tools (22) Phim (22) Rar-Zip-Tool (22) Video-Animals (21) Burning- Convert (19) Thơ và Nhạc (19) Drivers (18) Hoài Linh (18) Media Player (18) Pictures-Pro (18) Rao Bán (18) Registry Tool (18) Thủ Thuật Yahoo (18) Khóa Thư Mục-WebĐen-EXE (15) Virus (15) Add or Remove Programs (14) Thơ (14) Video-SHOW (14) Phong Lee (13) Game-Web (12) Video-Tài Liệu (12) Hide-IP Tools (11) List Xem Nhanh ChoiBlogs (11) Photos -pictures tools (11) Video-Thể Thao (11) Free Licence (10) Office Tools (10) Task Manager Tool (10) Thủ Thuật Facebook (10) Thủ Thuật Photoshop (10) Thủ Thuật Youtube (10) Vietnam's Got Talent (10) WiFi Tools (10) -Cổ tích Việt Nam- (9) DVD-Tools (9) HDD Tool (9) Thủ Thuật Android (Thiết Bị Di Động) (9) Video- Sao Nối Ngôi (9) Video-Bình Tinh (9) Video-Music (9) Video-VÕ HẠ TRÂM (9) Video-Thời Sự (8) Video-Thủ Thuật Đời Sống (8) Defrag tools (7) Flash Tools (7) HTML Tool (7) Hacker Tool (7) MP3 Tools (7) Thuý Nga (7) Từ Khóa Google (7) Icon Tools (6) Kiếm Tiền Online (6) Music-Girl Xinh (6) Tình Yêu (6) Video-Gương Mặt Thân Quen 2016 (6) Chí Tài (5) Game Flash (5) Game Tools (5) Góc nhìn (5) Mobile Tools (5) Nguyen Thi Anh Vien (5) Translate Tools (5) Webcam Tool (5) skin-blog (5) Firewalls (4) Game-mini (4) Screensaver Tools (4) Video-Cờ Cá Ngựa (4) Video-Kim Tử Long (4) Video-Thể Hình (4) Font View (3) Templates (3) Windows 7 (3) Windows Tools (3) Actions PTS (2) Audio tools (2) Editing tools (2) Event-Online (2) Font (2) Game-DOWNLOAD (2) Game-MU Đại Thiên Sứ (2) Ghost WINDOWN (2) Host Free (2) Infographic (2) Keylogger Tools (2) Nghệ Sĩ Minh Béo (2) Nhật Cường (2) PTS Brush (2) PTS Style (2) Sống Đẹp (2) Video-Game (2) Video-Quân Sự (2) Đạo Đời (2) CPU-Tools (1) Camera (1) Camera giao thông (1) Chính Sách Mới - Pháp Luật (1) Coppy Tools (1) Công Nghệ (1) Cảnh Giác (1) Dương Thúy Vi-Wuhsu (1) File Hệ Thống (1) Files Manager (1) Game-Gaw2 (1) Ghost XP (1) Hack Blog (1) Hệ Điều Hành (1) Icon Cảm Xúc (1) Iphone-Tools (1) Khám Phá (1) Music- Pic-Pro (1) PDS PhoToShop (1) Phần Cứng (1) Portable (1) Soft-Test (1) Soft-Việt Hóa (1) Sách Nói (1) TIVI Online (1) Thủ Thuật - Proshow Producer (1) Thủ Thuật Mobile (1) Thủ Thuật-Cốc Cốc (1) Thủ Thuật Di Động (1) Thủ Thuật FireFox (1) Thủ Thuật Phần Cứng (1) Thủ Thuật office (1) Thủ Thuật Điện (1) Thủ Thuật Đời Sống (1) Tin-Bảo Mật (1) Tình Yêu và Cuộc Sống (1) Tiện Ích FireFox (1) Tiện Ích Mouse (1) Tuyển THành Viên (1) Tài Liệu - Biểu Mẫu (1) Tình Yêu Giới Tính (1) Tự Kỷ (1) Video Tools (1) Video-Công Nghệ (1) Video-Cảnh Giác (1) Video-Giao Thông (1) Video-Hướng Dẫn Làm (1) Video-Movie (1) Video-NSƯT Bạch Long (1) Video-Sáng Tạo (1) Video-Thủ Thuật - Proshow Producer (1) Video-Vietnam's Got Talent 2014 (1) Video-Đời Sống (1) Video-Ơn Trời Cậu Đây Rồi (1) Yahoo Chat (1) [Danh Sách] Karaoke MrChoiBlog (Karaoke-Beat-Chuẩn) (1)

Đăng ký nhận bài viết mới

Bài đăng phổ biến

New Commets