طلب كود تقييم موضوع

2 مشترك

اذهب الى الأسفل

تم الحل طلب كود تقييم موضوع

مُساهمة من طرف زائر السبت 10 مارس 2018 - 21:49

طلب كود تقييم موضوع 


عدل سابقا من قبل lucy heartfilia في الأحد 11 مارس 2018 - 14:24 عدل 1 مرات
Anonymous
زائر
زائر


الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف وهبة الساحر الأحد 11 مارس 2018 - 0:09

مرحبا,

يمكنك البحث فى التقنيات هناك الكثير من اكواد التقييم 
ولكن انا لى رأى اخر ؟
قوم بتجربة هذا الرمز وانت اول من يقوم بتجربته لى 
ضع هذا الرمز فى الجافا سكربيت .. مكان وضعه فى كل الصفحات
الكود:
$(function() {
  var config = {
    position_left : true,
    negative_vote : true,
    vote_bar : true,
 
    icon_plus : '<img src="http://i18.servimg.com/u/f18/18/21/41/30/plus10.png" alt="+"/>',
    icon_minus : '<img src="http://i18.servimg.com/u/f18/18/21/41/30/minus10.png" alt="-"/>',
 
    title_plus : 'شاهد %{USERNAME}\'اخر اعجاب',
    title_minus : 'شاهد %{USERNAME}\'اخر اعجاب سلبى',
 
    title_like_singular : '%{VOTES} persoon vind %{USERNAME}\'اخر اعجاب',
    title_like_plural : '%{VOTES} personen vinden %{USERNAME}\'اخر اعجاب',
 
    title_dislike_singular : '%{VOTES} ابحث عن شخص %{USERNAME}\'اعجاب سلبى',
    title_dislike_plural : '%{VOTES} الاعضاء %{USERNAME}\'اعجاب سلبى',
 
    title_vote_bar : '%{VOTES} الاعضاء %{USERNAME}\'اخر اعجاب %{PERCENT}'
  },
   
   
  submit_vote = function() {
    var next = this.nextSibling,
        box = this.parentNode,
        bar = box.getElementsByTagName('DIV'),
        vote = box.getElementsByTagName('A'),
        mode = /eval=plus/.test(this.href) ? 1 : 0,
        i = 0, j = vote.length, pos, neg, percent;
 
    $.get(this.href, function() {
      next.innerHTML = +next.innerHTML + 1;
      next.title = next.title.replace(/(\d+)/, function(M, $1) { return +$1 + 1 });
   
      pos = +vote[0].nextSibling.innerHTML;
      neg = vote[1] ? +vote[1].nextSibling.innerHTML : 0;
      percent = pos == 0 ? '0%' : pos == neg ? '50%' : Math.round(pos / (pos + neg) * 100) + '%';
   
      if (bar[0]) {
        bar[0].style.display = '';
        bar[0].firstChild.style.width = percent;
        box.title = box.title.replace(/\d+\/\d+/, pos + '/' + ( pos + neg )).replace(/\(\d+%\)/, '(' + percent + ')');
      }
    });
 
    for (; i < j; i++) {
      vote[i].href = '#';
      vote[i].className = vote[i].className.replace(/fa_vote/, 'fa_voted');
      vote[i].onclick = function() { return false };
    }
 
    return false;
  },
   
  vote = $('.vote'), i = 0, j = vote.length,
  version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple',
 
  vdata = {
    tag : ['SPAN', 'LI', 'SPAN', 'LI'][version],
    name : ['.name', '.postprofile dt > strong', '.username', '.popmenubutton'][version],
    actions : ['.post-options', '.profile-icons', '.post-options', '.posting-icons'][version],
  },
 
  post, plus, minus, n_pos, n_neg, title_pos, title_neg, li, ul, bar, button, total, percent, span, pseudo, vote_bar;
 
  if (version == 'badapple') {
    if (window.console) console.warn('لم يتم تحسين هذا المكون الإضافي لمنتداك. اتصل بمنتدى الدعم للحصول على مزيد من المساعدة.');
    return;
  }
 
  for (; i < j; i++) {
    post = $(vote[i]).parentsUntil('.post').parent()[0];
    bar = $('.vote-bar', vote[i])[0];
    button = $('.vote-button', vote[i]);
    pseudo = $(vdata.name, post).text() || 'MISSING_STRING';
    ul = $(vdata.actions, post)[0];
    li = document.createElement(vdata.tag);
    li.className = 'fa_reputation';
 
    if (li.tagName == 'SPAN') li.style.display = 'inline-block';
 
    if (bar) {
      total = +bar.title.replace(/.*?\((\d+).*/, '$1');
      percent = +bar.title.replace(/.*?(\d+)%.*/, '$1');
   
      n_pos = Math.round(total * (percent / 100));
      n_neg = total - n_pos;
    } else {
      n_pos = 0;
      n_neg = 0;
    }
 
    title_pos = (n_pos == 1 ? config.title_like_singular : config.title_like_plural).replace(/%\{USERNAME\}/g, pseudo).replace(/%\{VOTES\}/g, n_pos);
    title_neg = (n_neg == 1 ? config.title_dislike_singular : config.title_dislike_plural).replace(/%\{USERNAME\}/g, pseudo).replace(/%\{VOTES\}/g, n_neg);
 
    li.innerHTML = '<span class="fa_count fa_positive" title="' + title_pos + '">' + n_pos + '</span>' + (config.negative_vote ? '&nbsp;<span class="fa_count fa_negative" title="' + title_neg + '">' + n_neg + '</span>' : '');
    span = li.getElementsByTagName('SPAN');
 
    plus = document.createElement('A');
    plus.href = button[0] ? button[0].firstChild.href : '#';
    plus.onclick = button[0] ? submit_vote : function() { return false };
    plus.className = 'fa_vote' + (button[0] ? '' : 'd') + ' fa_plus';
    plus.innerHTML = config.icon_plus;
    plus.title = (button[0] ? config.title_plus : title_pos).replace(/%\{USERNAME\}/g, pseudo);
 
    span[0] && li.insertBefore(plus, span[0]);
 
    if (config.negative_vote) {
      minus = document.createElement('A');
      minus.href = button[1] ? button[1].firstChild.href : '#';
      minus.onclick = button[1] ? submit_vote : function() { return false };
      minus.className = 'fa_vote' + (button[1] ? '' : 'd') + ' fa_minus';
      minus.innerHTML = config.icon_minus;
      minus.title = (button[1] ? config.title_minus : title_neg).replace(/%\{USERNAME\}/g, pseudo);
   
      span[1] && li.insertBefore(minus, span[1]);
    }
 
    if (config.vote_bar) {
      vote_bar = document.createElement('DIV');
      vote_bar.className = 'fa_votebar';
      vote_bar.innerHTML = '<div class="fa_votebar_inner" style="width:' + percent + '%;"></div>';
      vote_bar.style.display = bar ? '' : 'none';
      li.title = config.title_vote_bar.replace(/%\{USERNAME\}/, pseudo).replace(/%\{VOTES\}/, n_pos + '/' + (n_pos + n_neg)).replace(/%\{PERCENT\}/, '(' + percent + '%)');
      li.appendChild(vote_bar);
    }
 
    config.position_left ? ul.insertBefore(li, ul.firstChild) : ul.appendChild(li);
    vote[i].parentNode.removeChild(vote[i]);
  }
});
وايضا ضع هذا الرمز فى ورقة التصميم الـ css
الكود:
.fa_vote, .fa_voted, .fa_count {
  font-size:12px;
  font-family:Verdana, Arial, Helvetica, Sans-serif;
  display:inline-block !important;
  width:auto !important;
  transition:300ms;
}
 
.fa_voted, .fa_vote:hover { opacity:0.4 }
.fa_voted { cursor:default }
 
.fa_count {
  font-weight:bold;
  margin:0 3px;
  cursor:default;
}
 
.fa_positive { color:#4A0 }
.fa_negative { color:#A44 }
 
.fa_votebar, .fa_votebar_inner {
  background:#C44;
  height:3px;
}
 
.fa_votebar_inner {
  background:#4A0;
  transition:300ms;
}
وهبة الساحر
وهبة الساحر
 
 

ذكر
عدد المساهمات : 9061
معدل النشاط : 14596
السُمعة : 135

https://3arb-way.yoo7.com

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف زائر الأحد 11 مارس 2018 - 6:12

لم ينجح معي كود
Anonymous
زائر
زائر


الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف وهبة الساحر الأحد 11 مارس 2018 - 11:01

الرمز يعمل جيدا لدى 
ادخل الى الجافا وقم بأختيار مكان وضعه واختار المواضيع
الرمز يعمل اذا لم تقوم بالتعديل على قالب viewtopic_body
هل قمت بتعديل عليه من قبل ؟ 

الكود:
$(function() {
  var config = {
    position_left : true,
    negative_vote : true,
    vote_bar : true,
 
    icon_plus : '<img src="http://i18.servimg.com/u/f18/18/21/41/30/plus10.png" alt="+"/>',
    icon_minus : '<img src="http://i18.servimg.com/u/f18/18/21/41/30/minus10.png" alt="-"/>',
 
    title_plus : 'اعجبنى %{USERNAME}\'',
    title_minus : 'لم يعحبنى %{USERNAME}\'',
 
    title_like_singular : 'تم الاعجاب عدد %{VOTES}  %{USERNAME}\'',
    title_like_plural : '%{VOTES} اعجبنى هذه المساهمة %{USERNAME}\'',
 
    title_dislike_singular : 'لم تعجبنى عدد %{VOTES} %{USERNAME}\'',
    title_dislike_plural : '%{VOTES} لم يعجبنى هذه المساهمة %{USERNAME}\'',
 
    title_vote_bar : '%{VOTES} الاعضاء %{USERNAME}\'اخر اعجاب %{PERCENT}'
  },
   
   
  submit_vote = function() {
    var next = this.nextSibling,
        box = this.parentNode,
        bar = box.getElementsByTagName('DIV'),
        vote = box.getElementsByTagName('A'),
        mode = /eval=plus/.test(this.href) ? 1 : 0,
        i = 0, j = vote.length, pos, neg, percent;
 
    $.get(this.href, function() {
      next.innerHTML = +next.innerHTML + 1;
      next.title = next.title.replace(/(\d+)/, function(M, $1) { return +$1 + 1 });
   
      pos = +vote[0].nextSibling.innerHTML;
      neg = vote[1] ? +vote[1].nextSibling.innerHTML : 0;
      percent = pos == 0 ? '0%' : pos == neg ? '50%' : Math.round(pos / (pos + neg) * 100) + '%';
   
      if (bar[0]) {
        bar[0].style.display = '';
        bar[0].firstChild.style.width = percent;
        box.title = box.title.replace(/\d+\/\d+/, pos + '/' + ( pos + neg )).replace(/\(\d+%\)/, '(' + percent + ')');
      }
    });
 
    for (; i < j; i++) {
      vote[i].href = '#';
      vote[i].className = vote[i].className.replace(/fa_vote/, 'fa_voted');
      vote[i].onclick = function() { return false };
    }
 
    return false;
  },
   
  vote = $('.vote'), i = 0, j = vote.length,
  version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple',
 
  vdata = {
    tag : ['SPAN', 'LI', 'SPAN', 'LI'][version],
    name : ['.name', '.postprofile dt > strong', '.username', '.popmenubutton'][version],
    actions : ['.post-options', '.profile-icons', '.post-options', '.posting-icons'][version],
  },
 
  post, plus, minus, n_pos, n_neg, title_pos, title_neg, li, ul, bar, button, total, percent, span, pseudo, vote_bar;
 
  if (version == 'badapple') {
    if (window.console) console.warn('لم يتم تحسين هذا المكون الإضافي لمنتداك. اتصل بمنتدى الدعم للحصول على مزيد من المساعدة.');
    return;
  }
 
  for (; i < j; i++) {
    post = $(vote[i]).parentsUntil('.post').parent()[0];
    bar = $('.vote-bar', vote[i])[0];
    button = $('.vote-button', vote[i]);
    pseudo = $(vdata.name, post).text() || 'MISSING_STRING';
    ul = $(vdata.actions, post)[0];
    li = document.createElement(vdata.tag);
    li.className = 'fa_reputation';
 
    if (li.tagName == 'SPAN') li.style.display = 'inline-block';
 
    if (bar) {
      total = +bar.title.replace(/.*?\((\d+).*/, '$1');
      percent = +bar.title.replace(/.*?(\d+)%.*/, '$1');
   
      n_pos = Math.round(total * (percent / 100));
      n_neg = total - n_pos;
    } else {
      n_pos = 0;
      n_neg = 0;
    }
 
    title_pos = (n_pos == 1 ? config.title_like_singular : config.title_like_plural).replace(/%\{USERNAME\}/g, pseudo).replace(/%\{VOTES\}/g, n_pos);
    title_neg = (n_neg == 1 ? config.title_dislike_singular : config.title_dislike_plural).replace(/%\{USERNAME\}/g, pseudo).replace(/%\{VOTES\}/g, n_neg);
 
    li.innerHTML = '<span class="fa_count fa_positive" title="' + title_pos + '">' + n_pos + '</span>' + (config.negative_vote ? '&nbsp;<span class="fa_count fa_negative" title="' + title_neg + '">' + n_neg + '</span>' : '');
    span = li.getElementsByTagName('SPAN');
 
    plus = document.createElement('A');
    plus.href = button[0] ? button[0].firstChild.href : '#';
    plus.onclick = button[0] ? submit_vote : function() { return false };
    plus.className = 'fa_vote' + (button[0] ? '' : 'd') + ' fa_plus';
    plus.innerHTML = config.icon_plus;
    plus.title = (button[0] ? config.title_plus : title_pos).replace(/%\{USERNAME\}/g, pseudo);
 
    span[0] && li.insertBefore(plus, span[0]);
 
    if (config.negative_vote) {
      minus = document.createElement('A');
      minus.href = button[1] ? button[1].firstChild.href : '#';
      minus.onclick = button[1] ? submit_vote : function() { return false };
      minus.className = 'fa_vote' + (button[1] ? '' : 'd') + ' fa_minus';
      minus.innerHTML = config.icon_minus;
      minus.title = (button[1] ? config.title_minus : title_neg).replace(/%\{USERNAME\}/g, pseudo);
   
      span[1] && li.insertBefore(minus, span[1]);
    }
 
    if (config.vote_bar) {
      vote_bar = document.createElement('DIV');
      vote_bar.className = 'fa_votebar';
      vote_bar.innerHTML = '<div class="fa_votebar_inner" style="width:' + percent + '%;"></div>';
      vote_bar.style.display = bar ? '' : 'none';
      li.title = config.title_vote_bar.replace(/%\{USERNAME\}/, pseudo).replace(/%\{VOTES\}/, n_pos + '/' + (n_pos + n_neg)).replace(/%\{PERCENT\}/, '(' + percent + '%)');
      li.appendChild(vote_bar);
    }
 
    config.position_left ? ul.insertBefore(li, ul.firstChild) : ul.appendChild(li);
    vote[i].parentNode.removeChild(vote[i]);
  }
});

وهبة الساحر
وهبة الساحر
 
 

ذكر
عدد المساهمات : 9061
معدل النشاط : 14596
السُمعة : 135

https://3arb-way.yoo7.com

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف زائر الأحد 11 مارس 2018 - 13:52

لا لم اقم باي تعديل 


سارسل لم عضوية اضافية مع رقم سري لكي تدخل الى لوحةا الادارة 
Anonymous
زائر
زائر


الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف وهبة الساحر الأحد 11 مارس 2018 - 14:06

تم الاستلام المرجوا الانتظار لحين تركيبه على منتداك


عدل سابقا من قبل وهبة الساحر في الأحد 11 مارس 2018 - 14:18 عدل 1 مرات
وهبة الساحر
وهبة الساحر
 
 

ذكر
عدد المساهمات : 9061
معدل النشاط : 14596
السُمعة : 135

https://3arb-way.yoo7.com

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف وهبة الساحر الأحد 11 مارس 2018 - 14:17

يبدوا انك لم تفعل خاصية السمعة فى منتداك لذلك هى لم تظهر 
اما الان بعد تفعيل السمعة على منتداك فى الرمز يعمل جيدا بدون اى مشكلة 
مبروك عليك  silent
وهبة الساحر
وهبة الساحر
 
 

ذكر
عدد المساهمات : 9061
معدل النشاط : 14596
السُمعة : 135

https://3arb-way.yoo7.com

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف زائر الأحد 11 مارس 2018 - 14:23

وهبة الساحر كتب:
يبدوا انك لم تفعل خاصية السمعة فى منتداك لذلك هى لم تظهر 
اما الان بعد تفعيل السمعة على منتداك فى الرمز يعمل جيدا بدون اى مشكلة 
مبروك عليك  silent
شكرا لك  وبارك الله فيك على المجهود  Cool يغلق
Anonymous
زائر
زائر


الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: طلب كود تقييم موضوع

مُساهمة من طرف اعصار الأحد 18 مارس 2018 - 7:55

تم الحل ينقل للأرشيف
avatar
اعصار
احلى مساعد
احلى مساعد

ذكر
عدد المساهمات : 3194
معدل النشاط : 8729
السُمعة : 49

https://www.helpub.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

الرجوع الى أعلى الصفحة

- مواضيع مماثلة

 
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى