طلب كود التقييم

4 مشترك

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

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

مُساهمة من طرف abigan الأربعاء مايو 24, 2017 10:33 am

السلام عليكم 
عندي طلب بسيط لو ممكن  silent 
كود التقييم
هذه صورة له

https://d.top4top.net/p_509j6a2v1.png

وجدته في كثييير من المنتديات انا اريد مثله لو تكرمتم ♥
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

مُساهمة من طرف JoryAbdallah الأربعاء مايو 24, 2017 10:51 am

اهلا وسهلا بك
اذهب إلى لوحة الإدارة. عناصر اضافية. HTML و JAVASCRIPT. اكواد javascript تفعيل اكواد javascript اختار نعم
وسجل ثم انشاء كود الاسم اي شئ اختار المواضيع فقط
وضيف الكود جافا الاتي .. وسجل


الكود:


$(function() {
  // General Configuration of the plugin
  var config = {
    position_left : true, // true for left || false for right
    negative_vote : true, // true for negative votes || false for positive only
    vote_bar : true, // display a small bar under the vote buttons
 
    // button config
    icon_plus : '<img src="https://i18.servimg.com/u/f18/18/21/41/30/plus10.png" alt="+"/>',
    icon_minus : '<img src="https://i18.servimg.com/u/f18/18/21/41/30/minus10.png" alt="-"/>',
 
    // language config
    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}'
  },
   
   
  // function bound to the onclick handler of the vote buttons
  submit_vote = function() {
    var next = this.nextSibling, // the counter next to the vote button that was clicked
        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;
 
    // submit the vote asynchronously
    $.get(this.href, function() {
      next.innerHTML = +next.innerHTML + 1; // add to the vote count
      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 + ')');
      }
    });
 
    // revoke voting capabilities on the post once the vote is cast
    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', // version check
 
  // version data so we don't have to redefine these arrays during the loop
  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; // startup variables for later use in the loop
 
  // prevent execution if the version cannot be determined
  if (version == 'badapple') {
    if (window.console) console.warn('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
 
  for (; i < j; i++) {
    post = $(vote[i]).parentsUntil('.post').parent()[0];
    bar = $('.vote-bar', vote[i])[0]; // vote bar
    button = $('.vote-button', vote[i]); // plus and minus buttons
    pseudo = $(vdata.name, post).text() || 'MISSING_STRING'; // username of the poster
    ul = $(vdata.actions, post)[0]; // post actions
    li = document.createElement(vdata.tag); // vote system container
    li.className = 'fa_reputation';
 
    if (li.tagName == 'SPAN') li.style.display = 'inline-block';
 
    // calculate votes
    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;
    }
 
    // set up negative and positive titles with the correct grammar, votes, and usernames
    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);
 
    // define the vote counts
    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'); // get the vote count containers for use as insertion points
 
    // create positive vote button
    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]);
 
    // create negative vote button
    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]);
    }
 
    // create vote bar
    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);
    }
 
    // finally insert the vote system and remove the default one
    config.position_left ? ul.insertBefore(li, ul.firstChild) : ul.appendChild(li);
    vote[i].parentNode.removeChild(vote[i]);
  }
});
JoryAbdallah
JoryAbdallah
 
 

انثى
عدد المساهمات : 3030
معدل النشاط : 8173
السُمعة : 295

http://taqnyiat.ahlamontada.com/

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

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

مُساهمة من طرف abigan الأربعاء مايو 24, 2017 11:00 am

مشكوووورة اختي عندي طلب زيادة
هل ممكن ازالة التقييم السلبي من الكود؟ يعني تتركين الايجابي فقط
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

مُساهمة من طرف FANSUBAR الأربعاء مايو 24, 2017 1:23 pm

نفضلي كل ما عليكي فعله هو تغير negative_vote من true الى false

الكود:
$(function() {
  // General Configuration of the plugin
  var config = {
    position_left : true, // true for left || false for right
    negative_vote : false, // true for negative votes || false for positive only
    vote_bar : true, // display a small bar under the vote buttons
  
    // button config
    icon_plus : '<img src="https://i18.servimg.com/u/f18/18/21/41/30/plus10.png" alt="+"/>',
    icon_minus : '<img src="https://i18.servimg.com/u/f18/18/21/41/30/minus10.png" alt="-"/>',
  
    // language config
    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}'
  },
    
    
  // function bound to the onclick handler of the vote buttons
  submit_vote = function() {
    var next = this.nextSibling, // the counter next to the vote button that was clicked
        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;
  
    // submit the vote asynchronously
    $.get(this.href, function() {
      next.innerHTML = +next.innerHTML + 1; // add to the vote count
      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 + ')');
      }
    });
  
    // revoke voting capabilities on the post once the vote is cast
    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', // version check
 
  // version data so we don't have to redefine these arrays during the loop
  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; // startup variables for later use in the loop
 
  // prevent execution if the version cannot be determined
  if (version == 'badapple') {
    if (window.console) console.warn('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
 
  for (; i < j; i++) {
    post = $(vote[i]).parentsUntil('.post').parent()[0];
    bar = $('.vote-bar', vote[i])[0]; // vote bar
    button = $('.vote-button', vote[i]); // plus and minus buttons
    pseudo = $(vdata.name, post).text() || 'MISSING_STRING'; // username of the poster
    ul = $(vdata.actions, post)[0]; // post actions
    li = document.createElement(vdata.tag); // vote system container
    li.className = 'fa_reputation';
  
    if (li.tagName == 'SPAN') li.style.display = 'inline-block';
  
    // calculate votes
    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;
    }
  
    // set up negative and positive titles with the correct grammar, votes, and usernames
    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);
  
    // define the vote counts
    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'); // get the vote count containers for use as insertion points
  
    // create positive vote button
    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]);
  
    // create negative vote button
    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]);
    }
  
    // create vote bar
    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);
    }
  
    // finally insert the vote system and remove the default one
    config.position_left ? ul.insertBefore(li, ul.firstChild) : ul.appendChild(li);
    vote[i].parentNode.removeChild(vote[i]);
  }
});
FANSUBAR
FANSUBAR
 
 

ذكر
عدد المساهمات : 93
معدل النشاط : 2649
السُمعة : 1

http://koreafanz.yoo7.com

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

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

مُساهمة من طرف abigan الأربعاء مايو 24, 2017 5:25 pm

مشكورين جدا على المساعدة ^^ لكن الغريب في الكود انه عندما اقيم احد لا يتغير لون اليد للون ابرد '-' يبقى نفس اللون اين المشكلة؟؟  لا أدري
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

مُساهمة من طرف JoryAbdallah الأربعاء مايو 24, 2017 9:13 pm

لو سمحت صورة للامر لنعرف مشكله الامر
JoryAbdallah
JoryAbdallah
 
 

انثى
عدد المساهمات : 3030
معدل النشاط : 8173
السُمعة : 295

http://taqnyiat.ahlamontada.com/

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

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

مُساهمة من طرف روبي ديزاين الأربعاء مايو 24, 2017 10:39 pm

هذا الكود مثل اللي عندي هو مايتغير اللون ونما ينكتب رقم جنب اليد واحد او ثنين المهم حسب اللي قيموك 
بالتوفيق
روبي ديزاين
روبي ديزاين
 
 

انثى
عدد المساهمات : 303
معدل النشاط : 3107
السُمعة : 24

http://roubi-des.site123.me

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

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

مُساهمة من طرف abigan الخميس مايو 25, 2017 12:03 am

JoryAbdallah كتب:لو سمحت صورة للامر لنعرف مشكله الامر

لم افهم الطلب اختي احضر لك صورة للكود بعد الضغط عليه؟
روبي ديزاين كتب:هذا الكود مثل اللي عندي هو مايتغير اللون ونما ينكتب رقم جنب اليد واحد او ثنين المهم حسب اللي قيموك 
بالتوفيق
في منتداك يا روبي اللون يصير افتح بعد التقييم اما هذا الكود لا يتغير
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

مُساهمة من طرف JoryAbdallah الخميس مايو 25, 2017 12:38 am

يا اختي الكريمة حددي ماهو الكود الذي قمتي باضافته هل ماكان بردي
ام برد العضو
بالاضافه صورة عن عمل الكود بمنتداك نعم صورة
وتاكدي ان كود مضاف على المواضيع وليس جميع الصفحات
من خلال
لوحة الادارة. عناصر اضافية. HTML و JAVASCRIPT. اكواد javascript
واختاري الكود واضيفي المواضيع فقط
وليس جميع صفحات
بانتظارك
JoryAbdallah
JoryAbdallah
 
 

انثى
عدد المساهمات : 3030
معدل النشاط : 8173
السُمعة : 295

http://taqnyiat.ahlamontada.com/

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

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

مُساهمة من طرف abigan الخميس مايو 25, 2017 1:07 am

اولا الكود الذي اخذت به هو كود الأخ
ولكن المشكلة موجودة في الكود الذي وضعته انت ايضا اختي

الكود يظهر هكذا عندي

طلب كود التقييم P_5095l41o2


بينما المفروض يكون هكذا

طلب كود التقييم P_509iui261



يعني يكون واضح انه تم التقييم

اتمنىاني وضحت كل شيء
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

مُساهمة من طرف JoryAbdallah الخميس مايو 25, 2017 1:50 am

الجواب للحل وضحت لك
اذهب الى
لوحة الادارة. عناصر اضافية. HTML و JAVASCRIPT. اكواد javascript
واختاري الكود واضيفي المواضيع فقط
JoryAbdallah
JoryAbdallah
 
 

انثى
عدد المساهمات : 3030
معدل النشاط : 8173
السُمعة : 295

http://taqnyiat.ahlamontada.com/

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

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

مُساهمة من طرف abigan الخميس مايو 25, 2017 4:42 pm

طلب كود التقييم P_510m0ml41
https://c.top4top.net/p_510m0ml41.png

انا متاكدة يا اختي من وضعه في المواضيع
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

مُساهمة من طرف JoryAbdallah الخميس مايو 25, 2017 5:27 pm

اه فهمت ﻻبد من اضافه كود css
من خلال لوحة الادارة. مظهر المنتدى. صور والوان. الوان. ورقة 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;
    }


.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;
}
JoryAbdallah
JoryAbdallah
 
 

انثى
عدد المساهمات : 3030
معدل النشاط : 8173
السُمعة : 295

http://taqnyiat.ahlamontada.com/

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

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

مُساهمة من طرف abigan الخميس مايو 25, 2017 7:30 pm

شكراااااااا جزيلاااا لقد تم الحل
abigan
abigan
 
 

انثى
عدد المساهمات : 274
معدل النشاط : 4911
السُمعة : 3

https://noujoum.yoo7.com/

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

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

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

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