09-12-2013, 08:59 AM
#2
مدون جديد
تاريخ التسجيل: Sep 2013
الدولة: Morocco
المشاركات: 6
رد: حذف السلايدر من القالب
أضن يجب حذف السكريبت ده
كود PHP:
& lt ; script & gt ;
/* Script from:http://simplexdesign.blogspot.com/ */
imgr = new Array();
imgr [ 0 ] = & quot ; http : //lh3.ggpht.com/_kViOplhgIHI/TKxBIScZTiI/AAAAAAAAAWE/PM7AQ1lf6ME/noimages.jpg";
showRandomImg = true ;
aBold = true ;
summaryPost = 150 ;
numposts1 = 12 ;
label1 = & quot ; Home ،برامج & quot ;;
function removeHtmlTag ( strx , chop ){var s = strx . split (& quot ;& lt ;& quot ;);for(var i = 0 ; i & lt ; s . length ; i ++){if( s [ i ]. indexOf (& quot ;& gt ;& quot ;)!=- 1 ){ s [ i ]= s [ i ]. substring ( s [ i ]. indexOf (& quot ;& gt ;& quot ;)+ 1 , s [ i ]. length )}} s = s . join (& quot ;& quot ;); s = s . substring ( 0 , chop - 1 );return s }
function showrecentposts1 ( json ){ j =( showRandomImg )? Math . floor (( imgr . length + 1 )* Math . random ()): 0 ; img =new Array();for(var i = 0 ; i & lt ; numposts1 ; i ++){var entry = json . feed . entry [ i ];var posttitle = entry . title . $t ;var pcm ;var posturl ;if( i == json . feed . entry . length )break;for(var k = 0 ; k & lt ; entry . link . length ; k ++){if( entry . link [ k ]. rel == 'alternate' ){ posturl = entry . link [ k ]. href ;break}}for(var k = 0 ; k & lt ; entry . link . length ; k ++){if( entry . link [ k ]. rel == 'replies' & amp ;& amp ; entry . link [ k ]. type == 'text/html' ){ pcm = entry . link [ k ]. title . split (& quot ;& quot ;)[ 0 ];break}}
if (& quot ; content & quot ; in entry ) {
var postcontent = entry . content . $t ;}
else
if (& quot ; summary & quot ; in entry ) {
var postcontent = entry . summary . $t ;}
else var postcontent = & quot ;& quot ;;
postdate = entry . published . $t ;
if( j & gt ; imgr . length - 1 ) j = 0 ;
img [ i ] = imgr [ j ];
s = postcontent ; a = s . indexOf (& quot ;& lt ; img & quot ;); b = s . indexOf (& quot ; src =\& quot ;& quot ;, a ); c = s . indexOf (& quot ;\& quot ;& quot ;, b + 5 ); d = s . substr ( b + 5 , c - b - 5 );
if(( a !=- 1 )& amp ;& amp ;( b !=- 1 )& amp ;& amp ;( c !=- 1 )& amp ;& amp ;( d !=& quot ;& quot ;)) img [ i ] = d ;
var month =[ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ];var month2 =[& quot ; يناير & quot ;,& quot ; فبراير & quot ;,& quot ; مارس & quot ;,& quot ; ابريل & quot ;,& quot ; مايو & quot ;,& quot ; يونيو & quot ;,& quot ; يوليو & quot ;,& quot ; أغسطس & quot ;,& quot ; سبتمبر & quot ;,& quot ; أكتوبر & quot ;,& quot ; نوفمبر & quot ;,& quot ; ديسمبر & quot ;];var day = postdate . split (& quot ;-& quot ;)[ 2 ]. substring ( 0 , 2 );var m = postdate . split (& quot ;-& quot ;)[ 1 ];var y = postdate . split (& quot ;-& quot ;)[ 0 ];for(var u2 = 0 ; u2 & lt ; month . length ; u2 ++){if( parseInt ( m )== month [ u2 ]){ m = month2 [ u2 ];break;
}}
var daystr = day + ' ' + m + ' ' + y ;
var trtd = '<div class="contentdiv"><div class="alwansf"><a href="' + posturl + '"><img width="635" height="385" class="alignnone" src="' + img [ i ]+ '"/></a><div class="sliderPostInfo"></div></div><div class="alwanip"><h6><a href="' + posturl + '">' + posttitle + '</a></h6><div class="alwand" >' + daystr + '</div><p>' + removeHtmlTag ( postcontent , summaryPost )+ '...</p></div></div>' ;
document . write ( trtd );
j ++;
}}
& lt ;/ script & gt ;
__________________
إبتسم للحياة وفكر بإيجابية
من مواضيع Annajeh.com