Add Page Number (with First and Last Page) Navigation Link for Blogger (Blogspot) with Gadget Element and Manual Hack أضف الصفحة عدد (مع الأولى والصفحة الأخيرة) الملاحة لينك للمدون (Blogspot) مع الأداة والعنصر دليل هاك

Blogger free blog publishing platform uses a pretty limited navigation features that only display “Older Posts” or “Newer Posts” link to let readers navigate and browse to other pages on homepage (index), archive, category and label pages. مدون منصة حرة بلوق نشر استخدامات محدودة جدا الملاحة السمات إلا أن عرض "كبار السن الوظائف" أو "أحدث الوظائف" لربط القراء اسمحوا التنقل وتصفح لصفحات أخرى على الصفحة الرئيسية (الرقم القياسي) ، الأرشيف ، والفئة العلامة صفحة. Unlike WordPress blog that supports plugin to customize the page navigation link to numbered pages listing to make it more user friendly, Blogger, whether hosted on blogspot.com or custom domain does not have such flexibility. وخلافا للبلوق ووردبرس] أن تدعم البرنامج المساعد لتخصيص صفحة الملاحة وصلة إلى صفحات مرقمة من القائمة لجعلها أكثر ملاءمة للمستخدمين ، مدون ، واستضافت على ما إذا كان blogspot.com أو العرف المجال لا تملك مثل هذه المرونة.

However, it’s still possible to change and replace the typical classic “Older Posts” and “Newer Posts” navigation link on Blogger blog to numbered pages navigation, as illustrated in figure below by using a CSS and JavaScript hack wrote by Mohamed Rias. بيد أنه لا يزال من الممكن تغيير واستبدال النمطية الكلاسيكية "كبار السن الوظائف" و "أحدث الوظائف" الملاحة وصلة على مدون بلوق لصفحات مرقمة الملاحة ، كما هو موضح في الشكل أدناه باستخدام جافا سكريبت المغلق والإختراق كتب محمد اتفاقات التكامل الإقليمي.

Numbered Page Navigation for Blogger

As shown in image above, a navigation link consists of page numbers, first page, last page, next page and previous page (when applicable) is display on Blogger blog instead of the usual “Older Items” and “Newer Items” text links. وكما هو مبين في الصورة أعلاه ، وتتألف من ربط الملاحة أرقام الصفحات ، الصفحة الأولى ، الصفحة الأخيرة ، في الصفحة التالية والصفحة السابقة (عند الاقتضاء) هو مدون على عرض بلوق بدلا من العدد المعتاد "البنود من كبار السن" و "أحدث البنود" نص الروابط.

To add the “new” navigation link with page number to Blogger blog, simply add in a new Page Element Gadget in the Blogger. إضافة إلى "الجديد" الملاحة صلة مع رقم الصفحة لمدون بلوق ، ببساطة إضافة صفحة جديدة في العنصر الأداة في مدون. To do so, follow the guide below: إلى ذلك ، يتبع الدليل التالية :

  1. Login to الدخول لتتمكن من Blogger مدون account Dashboard . حساب لوحة التحكم الرئيسية.
  2. Click on the Layout link for the blog that you want to modify (if you’re viewing the blog and logged in to Blogger or Google Account, just click on Customize on the Next Blog toolbar. انقر على ارتباط النسق لبلوق التي تريد تعديل (إذا كنت مشاهدة بلوق والدخول في لمدون أو حساب Google ، فقط اضغط على تخصيص التالي المدونة على شريط الأدوات.
  3. Go to Page Element tab (by default). الذهاب إلى الصفحة علامة التبويب العنصر (افتراضي).
  4. Click on Add a Gadget anywhere in the layout. انقر على إضافة أداة في أي مكان في التصميم.
  5. In the Add a Gadget window, select HTML/JavaScript . في إضافة أداة نافذة ، اختر هتمل / جافا سكريبت.
  6. Add the following code into the Content text field. أضف الشفرة التالية في محتوى النص المجال. Title field can be left blank, or just type in any description such as “Page Navigation” to differentiate it from the rest of widgets. عنوان الميدان يمكن أن تترك فارغة ، أو مجرد نوع في أي وصف مثل "الصفحة الملاحة" لتمييزه عن بقية الحاجيات.

    <style>
    .showpageArea { . showpageArea (
    padding: 0 2px;margin-top:10px;margin-bottom:10px; التضخيم : 0 2px ؛ هامش قمة : 10px ؛ هامش القاع : 10px ؛
    } )

    .showpageArea a { . showpageArea أ (
    border: 1px solid #505050; الحدود : 1px الصلبة # 505050 ؛
    color: #000000;font-weight:normal; اللون : # 000000 ؛ الخط الوزن : طبيعية ؛
    padding: 3px 6px !important; التضخيم : 3px 6px! الهامة ؛
    padding: 1px 4px ;margin:0px 4px; التضخيم : 1px 4px ؛ الهامش : 0px 4px ؛
    text-decoration: none; زخرفة النصوص : لا شيء ؛
    } )

    .showpageArea a:hover { . showpageArea أ : (تحوم
    font-size:11px; حجم الخط : 11px ؛
    border: 1px solid #333; الحدود : 1px الصلبة # 333 ؛
    color: #000000; اللون : # 000000 ؛
    background-color: #FFFFFF; خلفية الالوان : # FFFFFF ؛
    } )

    .showpageNum a { . showpageNum أ (
    border: 1px solid #505050; الحدود : 1px الصلبة # 505050 ؛
    color: #000000;font-weight:normal; اللون : # 000000 ؛ الخط الوزن : طبيعية ؛
    padding: 3px 6px !important; التضخيم : 3px 6px! الهامة ؛
    padding: 1px 4px ;margin:0px 4px; التضخيم : 1px 4px ؛ الهامش : 0px 4px ؛
    text-decoration: none; زخرفة النصوص : لا شيء ؛
    } )

    .showpageNum a:hover { . showpageNum أ : (تحوم
    font-size:11px; حجم الخط : 11px ؛
    border: 1px solid #333; الحدود : 1px الصلبة # 333 ؛
    color: #000000; اللون : # 000000 ؛
    background-color: #FFFFFF; خلفية الالوان : # FFFFFF ؛

    } )
    .showpagePoint { . showpagePoint (
    font-size:11px; حجم الخط : 11px ؛
    padding: 2px 4px 2px 4px; التضخيم : 2px 4px 2px 4px ؛
    margin: 2px; هامش : 2px ؛
    font-weight: bold; الخط الوزن : جريئة ؛
    border: 1px solid #333; الحدود : 1px الصلبة # 333 ؛
    color: #fff; اللون : # الاتحاد الفرنسي ؛
    background-color: #000000; خلفية الالوان : # 000000 ؛
    } )

    .showpage a:hover { . showpage أ : (تحوم
    font-size:11px; حجم الخط : 11px ؛
    border: 1px solid #333; الحدود : 1px الصلبة # 333 ؛
    color: #000000; اللون : # 000000 ؛
    background-color: #FFFFFF; خلفية الالوان : # FFFFFF ؛
    } )

    .showpageNum a:link,.showpage a:link { . showpageNum أ : صلة ،. showpage أ : (صلة
    font-size:11px; حجم الخط : 11px ؛
    padding: 2px 4px 2px 4px; التضخيم : 2px 4px 2px 4px ؛
    margin: 2px; هامش : 2px ؛
    text-decoration: none; زخرفة النصوص : لا شيء ؛
    border: 1px solid #0066cc; الحدود : 1px الصلبة # 0066cc ؛
    color: #0066cc; اللون : # 0066cc ؛
    background-color: #FFFFFF;} خلفية الالوان : # FFFFFF ؛)

    .showpageNum a:hover { . showpageNum أ : (تحوم
    font-size:11px; حجم الخط : 11px ؛
    border: 1px solid #333; الحدود : 1px الصلبة # 333 ؛
    color: #000000; اللون : # 000000 ؛
    background-color: #FFFFFF; خلفية الالوان : # FFFFFF ؛
    } )
    </style> </ النمط>

    <script type=”text/javascript”> <scripttype="text/javascript">

    function showpageCount(json) { وظيفة showpageCount (json) (
    var thisUrl = location.href; فار thisUrl = location.href ؛
    var htmlMap = new Array(); فار htmlMap = مجموعة جديدة () ؛
    var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==”.blogspot.com/”; فار isFirstPage = thisUrl.substring (thisUrl.length - 14 ، thisUrl.length)==". blogspot.com / "؛
    var isLablePage = thisUrl.indexOf(”/search/label/”)!=-1; فار isLablePage = thisUrl.indexOf ( "/ البحث / العلامة /")!=- 1 ؛
    var isPage = thisUrl.indexOf(”/search?updated”)!=-1; فار isPage = thisUrl.indexOf ( "/ البحث؟ تحديث")!=- 1 ؛
    var thisLable = isLablePage ? فار thisLable = isLablePage؟ thisUrl.substr(thisUrl.indexOf(”/search/label/”)+14,thisUrl.length) : “”; thisUrl.substr (thisUrl.indexOf ( "/ البحث / العلامة /") +14 ، thisUrl.length) : "" ؛
    thisLable = thisLable.indexOf(”?”)!=-1 ? thisLable = thisLable.indexOf ("؟")!=-1؟ thisLable.substr(0,thisLable.indexOf(”?”)) : thisLable; thisLable.substr (0 ، thisLable.indexOf ("؟")): thisLable ؛
    var thisNum = 1; فار thisNum = 1 ؛
    var postNum=1; فار postNum = 1 ؛
    var itemCount = 0; فار itemCount = 0 ؛
    var fFlag = 0; فار fFlag = 0 ؛
    var eFlag = 0; فار eFlag = 0 ؛
    var html= ”; فار هتمل = "؛
    var upPageHtml =”; فار upPageHtml = "؛
    var downPageHtml =”; فار downPageHtml = "؛

    var pageCount=5; فار pageCount = 5 ؛
    var displayPageNum=3; فار displayPageNum = 3 ؛
    var firstPageWord = ‘First’; فار firstPageWord = 'أولا' ؛
    var endPageWord = ‘Last’; فار endPageWord = 'الماضي' ؛
    var upPageWord =’Previous’; فار upPageWord = 'السابق' ؛
    var downPageWord =’Next’; فار downPageWord = 'التالي' ؛

    var labelHtml = ‘<span class=”showpageNum”><a href=”/search/label/’+thisLable+’?&max-results=’+pageCount+’”>’; فار labelHtml = '<spanclass="showpageNum"> <ahref="/search/label/'+thisLable+'؟&max-results='+pageCount+'">' ؛

    for(var i=0, post; post = json.feed.entry[i]; i++) { ل(فار ط = 0 ، بعد ؛ بعد json.feed.entry = [ط] ؛ ط + +) (
    var timestamp = post.published.$t.substr(0,10); فار = post.published الزمني. t.substr دولار (0،10) ؛
    var title = post.title.$t; عنوان فار = post.title. ر دولار ؛
    if(isLablePage){ إذا (isLablePage) (
    if(title!=”){ إذا (عنوان!="){
    if(post.category){ إذا (post.category) (
    for(var c=0, post_category; post_category = post.category[c]; c++) { ل(فار ج = 0 ، post_category ؛ post_category = post.category [ج] ؛ ج + +) (
    if(encodeURIComponent(post_category.term)==thisLable){ إذا (encodeURIComponent (post_category.term) == thisLable) (
    if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){ إذا (itemCount == 0 | | (itemCount ٪ pageCount == (pageCount - 1))) (
    if(thisUrl.indexOf(timestamp)!=-1 ){ إذا (thisUrl.indexOf (الزمني)! =- 1) (
    thisNum = postNum; thisNum = postNum ؛
    } )

    postNum++; postNum + + ؛
    htmlMap[htmlMap.length] = ‘/search/label/’+thisLable+’?updated-max=’+timestamp+’T00%3A00%3A00%2B08%3A00&max-results=’+pageCount; htmlMap [htmlMap.length] = '/ البحث / العلامة /' + + thisLable '؟ تحديث ماكس =' + + الطابع الزمني 'T00 ٪ 3A00 ٪ 3A00 ٪ 2B08 ٪ 3A00 & ماكس النتائج =' + pageCount ؛
    } )
    } )
    } )
    }//end if(post.category){ ) / / نهاية اذا (post.category) (

    itemCount++; itemCount + + ؛
    } )

    }else{ ) والا (
    if(title!=”){ إذا (عنوان!="){
    if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){ إذا (itemCount == 0 | | (itemCount ٪ pageCount == (pageCount - 1))) (
    if(thisUrl.indexOf(timestamp)!=-1 ){ إذا (thisUrl.indexOf (الزمني)! =- 1) (
    thisNum = postNum; thisNum = postNum ؛
    } )

    if(title!=”) postNum++; إذا (عنوان! = ") postNum + + ؛
    htmlMap[htmlMap.length] = ‘/search?updated-max=’+timestamp+’T00%3A00%3A00%2B08%3A00&max-results=’+pageCount; htmlMap [htmlMap.length] = '/ البحث؟ تحديث ماكس =' + + الطابع الزمني 'T00 ٪ 3A00 ٪ 3A00 ٪ 2B08 ٪ 3A00 & ماكس النتائج =' + pageCount ؛
    } )
    } )
    itemCount++; itemCount + + ؛
    } )
    } )

    for(var p =0;p< htmlMap.length;p++){ ل(فار ع = 0 ؛ ع <htmlMap.length ؛ ع + +) (
    if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){ إذا (ع> = (thisNum - displayPageNum - 1) & & ع <(thisNum + displayPageNum)) (
    if(fFlag ==0 && p == thisNum-2){ إذا (fFlag == 0 & & ع == thisNum - 2) (
    if(thisNum==2){ إذا (thisNum == 2) (
    if(isLablePage){ إذا (isLablePage) (
    upPageHtml = labelHtml + upPageWord +’</a></span>’; upPageHtml = labelHtml + + upPageWord '</ أ> </ تمتد>' ؛
    }else{ ) والا (
    upPageHtml = ‘<span class=”showpage”><a href=”/”>’+ upPageWord +’</a></span>’; upPageHtml = '<spanclass="showpage"> <ahref="/">' upPageWord + + '</ أ> </ تمتد>' ؛
    } )
    }else{ ) والا (
    upPageHtml = ‘<span class=”showpage”><a href=”‘+htmlMap[p]+’”>’+ upPageWord +’</a></span>’; upPageHtml = '<spanclass="showpage"> <ahref="'+htmlMap[p]+'">' upPageWord + + '</ أ> </ تمتد>' ؛
    } )

    fFlag++; fFlag + + ؛
    } )

    if(p==(thisNum-1)){ إذا (ع == (thisNum - 1)) (
    html += ‘&nbsp;<span class=”showpagePoint”><u>’+thisNum+’</u></span>’; هتمل + = '<spanclass="showpagePoint"> <u>' thisNum + + '</ ش> </ تمتد>' ؛
    }else{ ) والا (
    if(p==0){ إذا (ع == 0) (
    if(isLablePage){ إذا (isLablePage) (
    html = labelHtml+’1</a></span>’; هتمل = labelHtml + '1</ أ> </ تمتد>' ؛
    }else{ ) والا (
    html += ‘<span class=”showpageNum”><a href=”/”>1</a></span>’; هتمل + = '<spanclass="showpageNum"> <ahref="/"> 1 </ أ> </ تمتد>' ؛
    } )
    }else{ ) والا (
    html += ‘<span class=”showpageNum”><a href=”‘+htmlMap[p]+’”>’+ (p+1) +’ </a></span>’; هتمل + = '<spanclass="showpageNum"> <ahref="'+htmlMap[p]+'">' + (ع +1) + '</ أ> </ تمتد>' ؛
    } )
    } )

    if(eFlag ==0 && p == thisNum){ إذا (eFlag == 0 & & == thisNum ع) (
    downPageHtml = ‘<span class=”showpage”> <a href=”‘+htmlMap[p]+’”>’+ downPageWord +’</a></span>’; downPageHtml = '<spanclass="showpage"> <ahref="'+htmlMap[p]+'">' downPageWord + + '</ أ> </ تمتد>' ؛
    eFlag++; eFlag + + ؛
    } )
    }//end if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){ ) / / نهاية اذا (ع> = (thisNum - displayPageNum - 1) & & ع <(thisNum + displayPageNum)) (
    }//end for(var p =0;p< htmlMap.length;p++){ ) / / نهاية ل(فار ع = 0 ؛ ع <htmlMap.length ؛ ع + +) (

    if(thisNum>1){ إذا (thisNum> 1) (
    if(!isLablePage){ إذا (! isLablePage) (
    html = ‘<span class=”showpage”><a href=”/”>’+ firstPageWord +’ </a></span>’+upPageHtml+’ ‘+html +’ ‘; هتمل = '<spanclass="showpage"> <ahref="/">' firstPageWord + + '</ أ> </ تمتد>' upPageHtml + + '' + + هتمل '' ؛
    }else{ ) والا (
    html = ”+labelHtml + firstPageWord +’ </a></span>’+upPageHtml+’ ‘+html +’ ‘; هتمل = "labelHtml + + + firstPageWord' </ أ> </ تمتد> 'upPageHtml + +' '+ + هتمل' '؛
    } )
    } )

    html = ‘<div class=”showpageArea”><span style=”font-size:11px;padding: 2px 4px 2px 4px;margin: 2px 2px 2px 2px;color: #000000;border: 1px solid #333; background-color: #FFFFFF;” class=”showpage”>Page ‘+thisNum+’ of ‘+(postNum-1)+’: </span>’+html; هتمل = '<divclass="showpageArea"> <= تمتد على غرار" الخط الحجم : 11px ؛ التضخيم : 2px 4px 2px 4px ؛ الهامش : 2px 2px 2px 2px ؛ اللون : # 000000 ؛ الحدود : 1px الصلبة # 333 ؛ خلفية - اللون : # FFFFFF ؛ "الطبقة =" showpage "> الصفحة' thisNum + + '' + (postNum - 1) + ': </ تمتد>' + هتمل ؛

    if(thisNum<(postNum-1)){ إذا (thisNum <(postNum - 1)) (
    html += downPageHtml; هتمل = + downPageHtml ؛
    html += ‘<span class=”showpage”><a href=”‘+htmlMap[htmlMap.length-1]+’”> ‘+endPageWord+’</a></span>’; هتمل + = '<spanclass="showpage"> <ahref="'+htmlMap[htmlMap.length-1]+'">' endPageWord + + '</ أ> </ تمتد>' ؛
    } )

    if(postNum==1) postNum++; إذا (postNum == 1) postNum + + ؛
    html += ‘</div>’; هتمل + = '</ div>' ؛

    if(isPage || isFirstPage || isLablePage){ إذا (isPage | | isFirstPage | | isLablePage) (
    var pageArea = document.getElementsByName(”pageArea”); فار pageArea = document.getElementsByName ( "pageArea") ؛
    var blogPager = document.getElementById(”blog-pager”); فار blogPager = document.getElementById ( "بلوق - الاستدعاء") ؛

    if(postNum <= 2){ إذا (postNum <= 2) (
    html =”; هتمل = "؛
    } )

    for(var p =0;p< pageArea.length;p++){ ل(فار ع = 0 ؛ ع <pageArea.length ؛ ع + +) (
    pageArea[p].innerHTML = html; pageArea [ع]. هتمل innerHTML = ؛
    } )

    if(pageArea&&pageArea.length>0){ إذا (pageArea & & pageArea.length> 0) (
    html =”; هتمل = "؛
    } )

    if(blogPager){ إذا (blogPager) (
    blogPager.innerHTML = html; blogPager.innerHTML هتمل = ؛
    } )
    } )

    } )
    </script> </ سكريبت>

    <script src=”/feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999″ type=”text/javascript”></script> <scriptsrc="/feeds/posts/summary؟alt=json-in-script&callback=showpageCount&max-results=99999" type="text/javascript"> </ سكريبت>

  7. Click Save button. انقر فوق الزر حفظ.
  8. Drag and drop the newly added HTML/JavaScript gadget to directly right below the Blog Posts element. سحب وإسقاط حديثا واضاف هتمل / جافا سكريبت لمباشرة الأداة الحق دون المدونة الوظائف عنصر. Location of Page Navigation Gadget
  9. Click on Save button to make the change effective. انقر على زر لإنقاذ لجعل التغيير الفعال.

For user who don’t want to use the Page Element widget or gadget, it’s possible to manually editing the HTML file, although it’s more difficult to do and should only be tried by blogger with technical expertise. لمستخدم الذين لا يريدون استخدام الصفحة العنصر القطعة أو الأداة ، فمن الممكن يدويا لتحرير هتمل الملف ، على الرغم من أنه أكثر صعوبة في ذلك وينبغي أن يحاكم إلا من قبل مدون مع الخبرة التقنية.

  1. Login to الدخول لتتمكن من Blogger مدون account Dashboard . حساب لوحة التحكم الرئيسية.
  2. Click on the Layout link for the blog that you want to modify (if you’re viewing the blog and logged in to Blogger or Google Account, just click on Customize on the Next Blog toolbar. انقر على ارتباط النسق لبلوق التي تريد تعديل (إذا كنت مشاهدة بلوق والدخول في لمدون أو حساب Google ، فقط اضغط على تخصيص التالي المدونة على شريط الأدوات.
  3. Go to Edit HTML tab (there is no need to expand widget templates). اذهب إلى علامة التبويب تحرير هتمل (ليست هناك حاجة لتوسيع قوالب عناصر واجهة المستخدم).
  4. Search for the following line: ]]></b:skin> البحث عن السطر التالي ]]></b:skin>
  5. Copy the following CSS code and paste or append the code above the line: نسخة التالية المغلق ولصق رمز أو إرفاق رمز فوق الخط :

    .showpageArea {
    padding: 0 2px;margin-bottom:10px;margin-top:10px;
    }

    .showpageArea a {
    border: 1px solid #505050;
    color: #000000;font-weight:normal;
    padding: 3px 6px !important;
    padding: 1px 4px ;margin:0px 4px;
    text-decoration: none;
    }

    .showpageArea a:hover {
    font-size:11px;
    border: 1px solid #333;
    color: #000000;
    background-color: #FFFFFF;
    }

    .showpageNum a {
    border: 1px solid #505050;
    color: #000000;font-weight:normal;
    padding: 3px 6px !important;
    padding: 1px 4px ;margin:0px 4px;
    text-decoration: none;
    }

    .showpageNum a:hover {
    font-size:11px;
    border: 1px solid #333;
    color: #000000;
    background-color: #FFFFFF;
    }

    .showpagePoint {
    font-size:11px;
    padding: 2px 4px 2px 4px;
    margin: 2px;
    font-weight: bold;
    border: 1px solid #333;
    color: #fff;
    background-color: #000000;
    }

    .showpage a:hover {
    font-size:11px;
    border: 1px solid #333;
    color: #000000;
    background-color: #FFFFFF;
    }

    .showpageNum a:link,.showpage a:link {
    font-size:11px;
    padding: 2px 4px 2px 4px;
    margin: 2px;
    text-decoration: none;
    border: 1px solid #0066cc;
    color: #0066cc;
    background-color: #FFFFFF;
    }

    .showpageNum a:hover {
    font-size:11px;
    border: 1px solid #333;
    color: #000000;
    background-color: #FFFFFF;
    }

  6. Next, search for the following line of code in the template’s HTML code: المقبل ، للبحث عن السطر التالي من الشفرة في القالب هتمل رمز :

    <b:section class='main' id='main' showaddelement='no'>
    <b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
    </b:section>

    Note: The ‘no’ after “showaddelement” can be ‘yes’ for some bloggers. ملاحظة : 'لا' بعد "showaddelement" يمكن نعم لبعض المدونين.

  7. Add and append the following JavaScript code right after the </b:section> line: أضف وارفاق التالية جافا سكريبت مدونة الحق بعد </ ب : الباب> الخط :

    &lt;script type=&quot;text/javascript&quot;&gt; <scripttype="text/javascript">

    function showpageCount(json) { وظيفة showpageCount (json) (
    var thisUrl = location.href; فار thisUrl = location.href ؛
    var htmlMap = new Array(); فار htmlMap = مجموعة جديدة () ؛
    var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==&quot;.blogspot.com/&quot;; فار isFirstPage = thisUrl.substring (thisUrl.length - 14 ، thisUrl.length)==". blogspot.com / "؛
    var isLablePage = thisUrl.indexOf(&quot;/search/label/&quot;)!=-1; فار isLablePage = thisUrl.indexOf ( "/ البحث / العلامة /")!=- 1 ؛
    var isPage = thisUrl.indexOf(&quot;/search?updated&quot;)!=-1; فار isPage = thisUrl.indexOf ( "/ البحث؟ تحديث")!=- 1 ؛
    var thisLable = isLablePage ? فار thisLable = isLablePage؟ thisUrl.substr(thisUrl.indexOf(&quot;/search/label/&quot;)+14,thisUrl.length) : &quot;&quot;; thisUrl.substr (thisUrl.indexOf ( "/ البحث / العلامة /") +14 ، thisUrl.length) : "" ؛
    thisLable = thisLable.indexOf(&quot;?&quot;)!=-1 ? thisLable = thisLable.indexOf ("؟")!=-1؟ thisLable.substr(0,thisLable.indexOf(&quot;?&quot;)) : thisLable; thisLable.substr (0 ، thisLable.indexOf ("؟")): thisLable ؛
    var thisNum = 1; فار thisNum = 1 ؛
    var postNum=1; فار postNum = 1 ؛
    var itemCount = 0; فار itemCount = 0 ؛
    var fFlag = 0; فار fFlag = 0 ؛
    var eFlag = 0; فار eFlag = 0 ؛
    var html= &#39;&#39;; فار هتمل = ''؛
    var upPageHtml =&#39;&#39;; فار upPageHtml = ''؛
    var downPageHtml =&#39;&#39;; فار downPageHtml = ''؛

    var pageCount=5; فار pageCount = 5 ؛
    var displayPageNum=3; فار displayPageNum = 3 ؛
    var firstPageWord = &#39;First&#39;; فار firstPageWord = 'أولا' ؛
    var endPageWord = &#39;Last&#39;; فار endPageWord = 'الماضي' ؛
    var upPageWord =&#39;Previous&#39;; فار upPageWord = 'السابق' ؛
    var downPageWord =&#39;Next&#39;; فار downPageWord = 'التالي' ؛

    var labelHtml = &#39;&lt;span class=&quot;showpageNum&quot;&gt;&lt;a href=&quot;/search/label/&#39;+thisLable+&#39;?&amp;max-results=&#39;+pageCount+&#39;&quot;&gt;&#39;; فار labelHtml = '<spanclass="showpageNum"> <أ href =" / البحث / العلامة / '+ + thisLable'؟ & ماكس النتائج = & # 39 ؛ + pageCount +'">'؛

    for(var i=0, post; post = json.feed.entry[i]; i++) { ل(فار ط = 0 ، بعد ؛ بعد json.feed.entry = [ط] ؛ ط + +) (
    var timestamp = post.published.$t.substr(0,10); فار = post.published الزمني. t.substr دولار (0،10) ؛
    var title = post.title.$t; عنوان فار = post.title. ر دولار ؛
    if(isLablePage){ إذا (isLablePage) (
    if(title!=&#39;&#39;){ إذا (عنوان!=''){
    if(post.category){ إذا (post.category) (
    for(var c=0, post_category; post_category = post.category[c]; c++) { ل(فار ج = 0 ، post_category ؛ post_category = post.category [ج] ؛ ج + +) (
    if(encodeURIComponent(post_category.term)==thisLable){ إذا (encodeURIComponent (post_category.term) == thisLable) (
    if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){ إذا (itemCount == 0 | | (itemCount ٪ pageCount == (pageCount - 1))) (
    if(thisUrl.indexOf(timestamp)!=-1 ){ إذا (thisUrl.indexOf (الزمني)! =- 1) (
    thisNum = postNum; thisNum = postNum ؛
    } )

    postNum++; postNum + + ؛
    htmlMap[htmlMap.length] = &#39;/search/label/&#39;+thisLable+&#39;?updated-max=&#39;+timestamp+&#39;T00%3A00%3A00%2B08%3A00&amp;max-results=&#39;+pageCount; htmlMap [htmlMap.length] = '/ البحث / العلامة /' + + thisLable '؟ تحديث ماكس =' + + الطابع الزمني 'T00 ٪ 3A00 ٪ 3A00 ٪ 2B08 ٪ 3A00 & ماكس النتائج = '+ pageCount ؛
    } )
    } )
    } )
    }//end if(post.category){ ) / / نهاية اذا (post.category) (

    itemCount++; itemCount + + ؛
    } )

    }else{ ) والا (
    if(title!=&#39;&#39;){ إذا (عنوان!=''){
    if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){ إذا (itemCount == 0 | | (itemCount ٪ pageCount == (pageCount - 1))) (
    if(thisUrl.indexOf(timestamp)!=-1 ){ إذا (thisUrl.indexOf (الزمني)! =- 1) (
    thisNum = postNum; thisNum = postNum ؛
    } )

    if(title!=&#39;&#39;) postNum++; إذا (عنوان!='') postNum + + ؛
    htmlMap[htmlMap.length] = &#39;/search?updated-max=&#39;+timestamp+&#39;T00%3A00%3A00%2B08%3A00&amp;max-results=&#39;+pageCount; htmlMap [htmlMap.length] = '/ البحث؟ تحديث ماكس =' + + الطابع الزمني 'T00 ٪ 3A00 ٪ 3A00 ٪ 2B08 ٪ 3A00 & ماكس النتائج =' + pageCount ؛
    } )
    } )
    itemCount++; itemCount + + ؛
    } )
    } )

    for(var p =0;p&lt; htmlMap.length;p++){ ل(فار ع = 0 ؛ ع <htmlMap.length ؛ ع + +) (
    if(p&gt;=(thisNum-displayPageNum-1) &amp;&amp; p&lt;(thisNum+displayPageNum)){ إذا (ع> = (thisNum - displayPageNum - 1) & & ع <(thisNum + displayPageNum)) (
    if(fFlag ==0 &amp;&amp; p == thisNum-2){ إذا (fFlag == 0 & & ع == thisNum - 2) (
    if(thisNum==2){ إذا (thisNum == 2) (
    if(isLablePage){ إذا (isLablePage) (
    upPageHtml = labelHtml + upPageWord +&#39;&lt;/a&gt;&lt;/span&gt;&#39;; upPageHtml = labelHtml + + upPageWord '</ أ> </ تمتد>' ؛
    }else{ ) والا (
    upPageHtml = &#39;&lt;span class=&quot;showpage&quot;&gt;&lt;a href=&quot;/&quot;&gt;&#39;+ upPageWord +&#39;&lt;/a&gt;&lt;/span&gt;&#39;; upPageHtml = '<spanclass="showpage"> <ahref="/">' upPageWord + + '</ أ> </ تمتد> '؛
    } )
    }else{ ) والا (
    upPageHtml = &#39;&lt;span class=&quot;showpage&quot;&gt;&lt;a href=&quot;&#39;+htmlMap[p]+&#39;&quot;&gt;&#39;+ upPageWord +&#39;&lt;/a&gt;&lt;/span&gt;&#39;; upPageHtml = '<spanclass="showpage"> <ahref="'+htmlMap[p]+'">' + + & upPageWord # 39 ؛ </ أ> </ تمتد> '؛
    } )

    fFlag++; fFlag + + ؛
    } )

    if(p==(thisNum-1)){ إذا (ع == (thisNum - 1)) (
    html += &#39;&amp;nbsp;&lt;span class=&quot;showpagePoint&quot;&gt;&lt;u&gt;&#39;+thisNum+&#39;&lt;/u&gt;&lt;/span&gt;&#39;; هتمل + = '<spanclass="showpagePoint"> <u>' thisNum + + '</ ش> </ تمتد>' ؛ ؛
    }else{ ) والا (
    if(p==0){ إذا (ع == 0) (
    if(isLablePage){ إذا (isLablePage) (
    html = labelHtml+&#39;1&lt;/a&gt;&lt;/span&gt;&#39;; هتمل = labelHtml + '1</ أ> </ تمتد>' ؛
    }else{ ) والا (
    html += &#39;&lt;span class=&quot;showpageNum&quot;&gt;&lt;a href=&quot;/&quot;&gt;1&lt;/a&gt;&lt;/span&gt;&#39;; هتمل + = '<spanclass="showpageNum"> <ahref="/"> 1 </ أ> </ تمتد>' ؛
    } )
    }else{ ) والا (
    html += &#39;&lt;span class=&quot;showpageNum&quot;&gt;&lt;a href=&quot;&#39;+htmlMap[p]+&#39;&quot;&gt;&#39;+ (p+1) +&#39; &lt;/a&gt;&lt;/span&gt;&#39;; هتمل + = '<spanclass="showpageNum"> <ahref="'+htmlMap[p]+'">' + (ع +1) + '</ أ> </ تمتد>' ؛
    } )
    } )

    if(eFlag ==0 &amp;&amp; p == thisNum){ إذا (eFlag == 0 & & == thisNum ع) (
    downPageHtml = &#39;&lt;span class=&quot;showpage&quot;&gt; &lt;a href=&quot;&#39;+htmlMap[p]+&#39;&quot;&gt;&#39;+ downPageWord +&#39;&lt;/a&gt;&lt;/span&gt;&#39;; downPageHtml = '<spanclass="showpage"> <ahref="'+htmlMap[p]+'">' + + & downPageWord # 39 ؛ </ أ> </ تمتد> '؛
    eFlag++; eFlag + + ؛
    } )
    }//end if(p&gt;=(thisNum-displayPageNum-1) &amp;&amp; p&lt;(thisNum+displayPageNum)){ ) / / نهاية اذا (ع> = (thisNum - displayPageNum - 1) & & ع <(thisNum + displayPageNum)) (
    }//end for(var p =0;p&lt; htmlMap.length;p++){ ) / / نهاية ل(فار ع = 0 ؛ ع <htmlMap.length ؛ ع + +) (

    if(thisNum&gt;1){ إذا (thisNum> 1) (
    if(!isLablePage){ إذا (! isLablePage) (
    html = &#39;&lt;span class=&quot;showpage&quot;&gt;&lt;a href=&quot;/&quot;&gt;&#39;+ firstPageWord +&#39; &lt;/a&gt;&lt;/span&gt;&#39;+upPageHtml+&#39; &#39;+html +&#39; &#39;; هتمل = '<spanclass="showpage"> <ahref="/">' firstPageWord + + '</ أ> </ تمتد> 'upPageHtml + +' '+ + هتمل' '؛
    }else{ ) والا (
    html = &#39;&#39;+labelHtml + firstPageWord +&#39; &lt;/a&gt;&lt;/span&gt;&#39;+upPageHtml+&#39; &#39;+html +&#39; &#39;; هتمل = ''labelHtml + + + firstPageWord' </ أ> </ تمتد> 'upPageHtml + +' '+ + هتمل' ؛ '؛
    } )
    } )

    html = &#39;&lt;div class=&quot;showpageArea&quot;&gt;&lt;span style=&quot;font-size:11px;padding: 2px 4px 2px 4px;margin: 2px 2px 2px 2px;color: #000000;border: 1px solid #333; background-color: #FFFFFF;&quot; class=&quot;showpage&quot;&gt;Page &#39;+thisNum+&#39; of &#39;+(postNum-1)+&#39;: &lt;/span&gt;&#39;+html; هتمل = '<divclass="showpageArea"> <= تمتد على غرار" الخط الحجم : 11px ؛ التضخيم : 2px 4px 2px 4px ؛ الهامش : 2px 2px 2px 2px ؛ اللون : # 000000 ؛ الحدود : 1px الصلبة # 333 ؛ بين لون الخلفية : # FFFFFF ؛ "الطبقة =" showpage "> الصفحة' thisNum + + '' + (postNum - 1) + ' ؛ : </ تمتد> '+ هتمل ؛

    if(thisNum&lt;(postNum-1)){ إذا (thisNum <(postNum - 1)) (
    html += downPageHtml; هتمل = + downPageHtml ؛
    html += &#39;&lt;span class=&quot;showpage&quot;&gt;&lt;a href=&quot;&#39;+htmlMap[htmlMap.length-1]+&#39;&quot;&gt; &#39;+endPageWord+&#39;&lt;/a&gt;&lt;/span&gt;&#39;; هتمل + = '<spanclass="showpage"> <ahref="'+htmlMap[htmlMap.length-1]+'">' ؛ endPageWord + + '</ أ> </ تمتد>' ؛
    } )

    if(postNum==1) postNum++; إذا (postNum == 1) postNum + + ؛
    html += &#39;&lt;/div&gt;&#39;; هتمل + = '</ div>' ؛

    if(isPage || isFirstPage || isLablePage){ إذا (isPage | | isFirstPage | | isLablePage) (
    var pageArea = document.getElementsByName(&quot;pageArea&quot;); فار pageArea = document.getElementsByName ( "pageArea") ؛
    var blogPager = document.getElementById(&quot;blog-pager&quot;); فار blogPager = document.getElementById ( "بلوق - الاستدعاء") ؛

    if(postNum &lt;= 2){ إذا (postNum <= 2) (
    html =&#39;&#39;; هتمل = ''؛
    } )

    for(var p =0;p&lt; pageArea.length;p++){ ل(فار ع = 0 ؛ ع <pageArea.length ؛ ع + +) (
    pageArea[p].innerHTML = html; pageArea [ع]. هتمل innerHTML = ؛
    } )

    if(pageArea&amp;&amp;pageArea.length&gt;0){ إذا (pageArea & & pageArea.length> 0) (
    html =&#39;&#39;; هتمل = ''؛
    } )

    if(blogPager){ إذا (blogPager) (
    blogPager.innerHTML = html; blogPager.innerHTML هتمل = ؛
    } )
    } )

    } )
    &lt;/script&gt; </ سكريبت>

    &lt;script src=&quot;/feeds/posts/summary?alt=json-in-script&amp;callback=showpageCount&amp;max-results=99999&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; <scriptsrc="/feeds/posts/summary؟alt=json-in-script&callback=showpageCount&max-results=99999" type="text/javascript"> </ سكريبت>

  8. Click on Preview button to ensure that no code error been found. انقر على زر معاينة لضمان أن لا يتم العثور على رمز خطأ. No effect on the navigation hack can be seen though. أي أثر على الملاحة الإختراق ويمكن ملاحظة رغم.
  9. Click on Save Template to save the change. انقر على حفظ القالب لانقاذ تغيير.

Customization and Modification تكييف وتعديل

  1. For user who is not using blogspot.com domain (using self-hosted domain name), modify the .blogspot.com and 14 (13 characters of domain name + 1) in the line of var isFirstPage = thisUrl.substring(thisUrl.length-14,thisUrl.length)==&quot;.blogspot.com/&quot;; accordingly. وبالنسبة للمستخدم الذي لا تستخدم blogspot.com المجال (باستخدام الذاتي استضافت اسم النطاق) ، وتعديل. blogspot.com و 14 (13 حرفا من اسم نطاق + 1) في خط فار isFirstPage = thisUrl.substring (thisUrl.length -14 ، thisUrl.length)==". blogspot.com / "؛ وفقا لذلك.
  2. The value in the line of var pageCount =5; determines the number of posts to be shown on each page. قيمة في خط فار pageCount = 5 ؛ يحدد عدد الوظائف التي تظهر على كل صفحة.
  3. The value in the line of var displayPageNum = 3; defines the number of page links in the navigation bar to be displayed (eg 1 - 2 - 3). قيمة في خط فار displayPageNum = 3 ؛ ويحدد عددا من صفحة الروابط في شريط التنقل ليتم عرضها (على سبيل المثال 1 -- 2 -- 3).
  4. User who knows CSS and Java Script can customize the code to their likings. المستخدم الذي يعرف المغلق وجافا سكريبت يمكن تخصيص رمز لالميول.

Source 1 مصدر 1 and و Source 2 مصدر 2

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. هام : هذه هي آلة الصفحة المترجمة التي تقدم "كما هي" دون ضمان. Machine translation may be difficult to understand. الترجمة الآلية قد يكون من الصعب فهم. Please refer to يرجى الرجوع إلى original English article المادة الانكليزية الأصلية whenever possible. كلما كان ذلك ممكنا.

Share and contribute or get technical support and help at وحصة المساهمة أو الحصول على الدعم التقني والمساعدة في My Digital Life Forums بلادي الرقمي الحياة المنتديات .



9 Responses to “Add Page Number (with First and Last Page) Navigation Link for Blogger (Blogspot) with Gadget Element and Manual Hack” 9 الردود على "أضف الصفحة عدد (مع الأولى والصفحة الأخيرة) الملاحة لينك للمدون (Blogspot) مع الأداة والعنصر دليل هاك"

  1. JK
    October 19th, 2008 10:14 أكتوبر 19th ، 2008 10:14
    1

    Everything OK. كل شيء حسنا. But while trying this found some problems. ولكن بينما كان يحاول العثور على بعض هذه المشاكل. For example, when I click on ‘next’ page, some times it shows the same page, especially after 6th or 7th page. فعلى سبيل المثال ، عندما كنت أنقر على 'القادم' صفحة ، وبعض الأوقات يظهر في الصفحة نفسها ، وخصوصا بعد 6th أو 7th صفحة. I think it is because of the script used. وأعتقد أنه بسبب الخط الذي يستعمله. It is not as smooth as wordpress navigation - Jkwebtalks ومن لا بالسلاسة الملاحة ووردبرس] -- Jkwebtalks

  2. zigunawan
    October 23rd, 2008 09:43 أكتوبر 23rd ، 2008 09:43
    2

    my blogs is still in classic blogger, could this treat i used to my blog? بلوق بلادي لا تزال في الكلاسيكية مدون ، ويمكن علاج هذا كنت بلدي بلوق؟

    And how to showing the page number on wordpress, the page number plugin just only support up to 2.5 version. وكيف تظهر على صفحة عدد وردبرس] ، ورقم الصفحة فقط دعم البرنامج المساعد فقط ما يصل الى 2.5 النسخة. is there any idea? هل هناك أي فكرة؟ or just waiting for plugin the new version release? أو فقط في انتظار النسخة الجديدة من البرنامج المساعد الإفراج؟

    thanks! شكرا!

  3. moonlightafridi
    November 13th, 2008 18:10 تشرين الثاني / نوفمبر 13th ، 2008 18:10
    3

    not working ……. لا عمل.......
    coz I did the same as u written above . coz فعلت نفس ش مكتوبة أعلاه.
    but no page numbering could be shown . ترقيم الصفحات ولكن لا يمكن أن تظهر.

  4. moonlightafridi
    November 13th, 2008 18:37 تشرين الثاني / نوفمبر 13th ، 2008 18:37
    4

    I’ve done now ……… فعلت الآن.........
    page’s number are shown in my blog الصفحة عدد ترد في بلادي بلوق
    but How to arrange pages in my blog ? ولكن كيف لترتيب الصفحات في بلادي بلوق؟

  5. zigunawan
    November 15th, 2008 02:52 تشرين الثاني / نوفمبر 15th ، 2008 02:52
    5

    not work on my blogspot! لا العمل على بلدي blogspot! may I wrong place the code? هل لي أن المكان غير مدونة؟

  6. zigunawan
    November 15th, 2008 06:34 تشرين الثاني / نوفمبر 15th ، 2008 06:34
    6

    it’s work now on my Free cell phone theme انه العمل الآن على بلادي الحرة موضوع الهاتف الخليوي ! !
    but sometime, there,s an error like this ولكن ما ، هناك ، ق خطأ مثل هذا
    “No posts match your query.” "وظائف لا تطابق بحثك."
    is there any solution! هل هناك أي حل!

  7. lasse اسي
    November 21st, 2008 04:23 تشرين الثاني / نوفمبر 21st ، 2008 04:23
    7

    This doesnt work at all for me. هذا doesn't العمل على كل بالنسبة لي. Nothing changes at all. لم يتغير شيء على الإطلاق.

  8. Ravi رافي
    November 22nd, 2008 05:49 تشرين الثاني / نوفمبر 22nd ، 2008 05:49
    8

    Its not working for me, I copied the code above and I am using the new blogger. أعماله لا تعمل بالنسبة لي ، أنا نسخ الشفرة أعلاه ، وأنا باستخدام الجديد مدون. Could yoou please help me on this. يمكن yoou الرجاء مساعدتي على هذا.

    Ravi رافي

  9. Ravi رافي
    November 23rd, 2008 19:21 تشرين الثاني / نوفمبر 23rd ، 2008 19:21
    9

    It’sa Leora Ka Bal solution. كا انها Leora بال حل.

Leave a Reply ترك الرد

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> يمكنك استخدام هذه العلامات : <ahref="" title=""> <abbrtitle=""> <acronymtitle=""> <b><blockquotecite=""> <cite><code><ديل datetime = ""> <em><i><qcite=""> <strike><strong>

Subscribe to comments feature has been disabled. الاشتراك في تعليقات تم تعطيل الميزة. To receive notification of latest comments posted, subscribe to لتلقي إشعار آخر التعليقات من موقع ، اشترك My Digital Life Comments RSS feed بلادي الرقمي الحياة التعليقات آر إس إس or أو register to receive سجل لتلقي new comments in daily email digest. تعليقات جديدة في البريد الإلكتروني يوميا هضم.
Custom Search

New Articles المواد الجديدة

Incoming Search Terms for the Article ابحث الواردة للشروط المنصوص عليها في المادة