البحث عن
]]></b:skin>
فوقه
/* most commented style*/
#most-commented
ul,#most-commented li,#most-commented ul li { margin: 0; list-style: none;
color: #444; font-family: 'Tajawal', sans-serif; font-size: 14px;
text-align:right; } #most-commented ul li { position: relative; overflow:
hidden; background: #fff; margin: 3.5px 0; padding: 7px 45px 7px 10px;
white-space: nowrap; text-overflow: ellipsis; box-shadow: inset 0 0 #333;
border: 1px solid #e6e6e6; transition: all .5s; border-radius: 5px; }
#most-commented ul li:hover { box-shadow: inset -320px 0 #333; }
#most-commented ul li a { color: #444; font-weight: bold; text-decoration:
none; transition: all .3s; }.count-most { position: absolute; right: 0; top:
0; width: 35px; height: 100%; margin: 0; padding: 7px 0; background-color:
#222; color: #fff!important; text-align: center; transition: all .3s; }
#most-commented ul li a:hover { color: #fff; } #most-commented ul li:hover a {
color: #fff; }
/* most commented style*/
ضعها بالمكان المناسب
الاضافه لـ إعداد اللغة HTML/JavaScript
اي مكااان
<div id="most-commented"></div>
<script> //<![CDATA[ var numPosts=10;
var homePage="www.faisal2n.com";
var postTitlear=new Array();
var postUrlar=new Array();
var postCommentar=new Array();
var totalpost;document.write('<div id="most-commented"><ul>');
function mostComment(j){var a=j.feed.entry.length;totalpost=a;
for(var f=0;f<a;f++){ var h=j.feed.entry[f]; var c=h.title.$t;var b; var
g;if(f==j.feed.entry.length){break} for(var d=0;d<h.link.length;d++){
if(h.link[d].rel=="alternate"){g=h.link[d].href;break}} for(var
d=0;d<h.link.length;d++){
if(h.link[d].rel=="replies"&&h.link[d].type=="text/html"){b=h.link[d].title.split("
")[0];}}; postTitlear.push(c); postUrlar.push(g);
postCommentar.push(b)}sortPosts(); for(var f=0;f<numPosts;f++){var
e='<li><span
class="count-most">'+postCommentar[f]+'</span><a
href="'+postUrlar[f]+'" title="'+postTitlear[f]+'"
target="_blank">'+postTitlear[f]+'</a>'; document.write(e)}} function
sortPosts(){function c(d,f){var e=postTitlear[d];
postTitlear[d]=postTitlear[f]; postTitlear[f]=e; var e=postUrlar[d];
postUrlar[d]=postUrlar[f]; postUrlar[f]=e; var e=postCommentar[d];
postCommentar[d]=postCommentar[f]; postCommentar[f]=e} for(var
b=0;b<postTitlear.length-1;b++){ for(var
a=b+1;a<postTitlear.length;a++){
if(parseInt(postCommentar[b])<parseInt(postCommentar[a])){c(b,a)}}}}
document.write('<script
src="https://'+homePage+'/feeds/posts/default?max-results=9999&orderby=published&alt=json-in-script&callback=mostComment"><\/script>');
document.write('</li>') document.write('</ul>')
document.write('</div>'); //]]> </script>
وسلامتكم
ليست هناك تعليقات: