Scritta Missing_String's

3 partecipanti

Pagina 1 di 2 1, 2  Successivo

Risolto Scritta Missing_String's

Messaggio Da McLaren Mercedes Mer 24 Mag 2017 - 18:19

Ragazzi perchè mi da questa scritta ? e anche quando vado a mettere non mi piace esce questa scritta come faccio a cambiare "MISSING_STRING'S" e "MISSING_STRING'S" non mi piace??
File allegati
Scritta Missing_String's Attachment
Immagine.png Non hai il permesso di scaricare i file.(111 KB) Scaricato 13 volte


Ultima modifica di McLaren Mercedes il Lun 12 Giu 2017 - 22:17 - modificato 1 volta.
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Mer 24 Mag 2017 - 21:15

Ciao @McLaren Mercedes

è un problema tecnico, devono essersi dimenticati di inserire il contenuto da sostituire a quel placeholder (segnaposto) :bene:

pardon, il problema è di uno script che hai inserito per avere quel sistema di reputazione... deve essere inserito male il placeholder per il numero di utenti a cui piace/non piace quel post
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Gio 25 Mag 2017 - 17:03

Dove posso trovare altri script ?
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Sab 27 Mag 2017 - 13:18

In PDA > Moduli > HTML & Javascript > Gestione del codice javascript Wink

lo devi aver aggiunto tu manualmente seguendo qualche tutorial :bene:
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Sab 27 Mag 2017 - 13:26

io ho Reputazione 

Codice:
$(function() {
  // General Configuration of the plugin
  var config = {
    position_left : false, // 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 : 'Ottimo %{USERNAME}\'s post',
    title_minus : 'Negativo%{USERNAME}\'s post',
 
    title_like_singular : '%{VOTES} persona che gli piace%{USERNAME}\'s post',
    title_like_plural : '%{VOTES}  persone che gli piacciono%{USERNAME}\'s post',
 
    title_dislike_singular : '%{VOTES} persona che non gli piace %{USERNAME}\'s post',
    title_dislike_plural : '%{VOTES} persone che non gli piace %{USERNAME}\'s post',
 
    title_vote_bar : '%{VOTES} la gente è piaciuto %{USERNAME}\'s post %{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]);
  }
});

e Grazie

Codice:
$(function() {
  var message = function(child, parent) {
        var pseudo = $(child, parent).text(),
            icon = '<img src="http://i18.servimg.com/u/f18/18/21/60/73/fa_sta10.png" alt=""/>';
 
        return '<div id="fa_thanks_message">' + icon + ' Grazie ! Questa risposta è una delle migliori ! ' + pseudo + ' ! ' + icon + '</div>';
      },
   
      version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
      node = document.createElement(version ? 'DIV' : 'TR'),
      post = $(version ? 'div' : 'tr' + '.post'),
      j = post.length,
      i = 0;
 
  if (version == 'badapple') {
    if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
 
  node.id = 'fa_thanks'; // id for style modifications
  if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
 
  for (; i < j; i++) {
 
    if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
   
      post[i].className += ' thanked'; // mark the thanked post with a class
      (version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
   
      switch (version) {
     
        case 0 : // phpbb2
          node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
          node.firstChild.className = post[i].firstChild.className;
          post[i].parentNode.insertBefore(node, post[i].nextSibling);
          break;
       
        case 1 : // phpbb3
          post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
          break;
       
        case 2 : // punbb
          node.className = 'postfoot';
          node.style.margin = '0';
          post[i].appendChild(node);
          break;
       
        case 3 : // invision
          node.className = 'post-footer';
          node.style.backgroundColor = post[i].style.backgroundColor;
          post[i].appendChild(node);
          break;
     
      }
   
      break; // break out of the for loop when the thanked post is found
    }
 
  }
});

Che però il grazie non funziona 
dove posso trovare entrambi ? Very Happy
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Sab 27 Mag 2017 - 14:01

Ciao,

penso sia dovuto al fatto che utilizzi la versione ModernBB e che lo script non sia ottimizzato per questo codice javascript Embarassed

edit: si confermo, infatti la versione ModernBB non è inclusa in questo script.. prova a sostituire il primo codice con questo (dovrei aver aggiunto ModernBB nello script):
Codice:
$(function() {
  // General Configuration of the plugin
  var config = {
    position_left : false, // 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 : 'Ottimo %{USERNAME}\'s post',
    title_minus : 'Negativo%{USERNAME}\'s post',
  
    title_like_singular : '%{VOTES} persona che gli piace%{USERNAME}\'s post',
    title_like_plural : '%{VOTES}  persone che gli piacciono%{USERNAME}\'s post',
  
    title_dislike_singular : '%{VOTES} persona che non gli piace %{USERNAME}\'s post',
    title_dislike_plural : '%{VOTES} persone che non gli piace %{USERNAME}\'s post',
  
    title_vote_bar : '%{VOTES} la gente è piaciuto %{USERNAME}\'s post %{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' ? 4 : $('body[id="modernbb"]')[0], // 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', '.postprofile-name a'][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]);
  }
});
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Sab 27 Mag 2017 - 14:09

Ancora non funziona Sad
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Sab 27 Mag 2017 - 14:13

Nuovo tentativo?
Codice:
$(function() {
  // General Configuration of the plugin
  var config = {
    position_left : false, // 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 : 'Ottimo %{USERNAME}\'s post',
    title_minus : 'Negativo%{USERNAME}\'s post',
  
    title_like_singular : '%{VOTES} persona che gli piace%{USERNAME}\'s post',
    title_like_plural : '%{VOTES}  persone che gli piacciono%{USERNAME}\'s post',
  
    title_dislike_singular : '%{VOTES} persona che non gli piace %{USERNAME}\'s post',
    title_dislike_plural : '%{VOTES} persone che non gli piace %{USERNAME}\'s post',
  
    title_vote_bar : '%{VOTES} la gente è piaciuto %{USERNAME}\'s post %{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 = $('body[id="modernbb"]')[0] ? 4 : $('.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', '.postprofile-name a'][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
 console.log(version);
  // 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]);
  }
});
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Sab 27 Mag 2017 - 14:26

PERFETTO ! Ora puoi fare qualcosa anche per il "Grazie" Very Happy
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Mar 30 Mag 2017 - 10:47

Illustrami di nuovo il problema Wink

perdonami mi sono perso ahah
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Mar 30 Mag 2017 - 12:39

Ahahah Scusami, non ce il tasto "Grazie" http://prntscr.com/fdrd1r così http://prntscr.com/fdrd7b prima del cambio del tema avevo la scritta "merci" ma ora non più.. il mio codice..

Codice:
$(function() {
  var message = function(child, parent) {
        var pseudo = $(child, parent).text(),
            icon = '<img src="http://i18.servimg.com/u/f18/18/21/60/73/fa_sta10.png" alt=""/>';
  
        return '<div id="fa_thanks_message">' + icon + ' Grazie ! Questa risposta è una delle migliori ! ' + pseudo + ' ! ' + icon + '</div>';
      },
    
      version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
      node = document.createElement(version ? 'DIV' : 'TR'),
      post = $(version ? 'div' : 'tr' + '.post'),
      j = post.length,
      i = 0;
 
  if (version == 'badapple') {
    if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
 
  node.id = 'fa_thanks'; // id for style modifications
  if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
 
  for (; i < j; i++) {
  
    if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
    
      post[i].className += ' thanked'; // mark the thanked post with a class
      (version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
    
      switch (version) {
      
        case 0 : // phpbb2
          node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
          node.firstChild.className = post[i].firstChild.className;
          post[i].parentNode.insertBefore(node, post[i].nextSibling);
          break;
        
        case 1 : // phpbb3
          post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
          break;
        
        case 2 : // punbb
          node.className = 'postfoot';
          node.style.margin = '0';
          post[i].appendChild(node);
          break;
        
        case 3 : // invision
          node.className = 'post-footer';
          node.style.backgroundColor = post[i].style.backgroundColor;
          post[i].appendChild(node);
          break;
      
      }
    
      break; // break out of the for loop when the thanked post is found
    }
  
  }
});

dovrebbe essere questo  Embarassed.

Grazie @Niko
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Sab 3 Giu 2017 - 20:22

Prova con questo:
Codice:
$(function() {
  var message = function(child, parent) {
        var pseudo = $(child, parent).text(),
            icon = '<img src="http://i18.servimg.com/u/f18/18/21/60/73/fa_sta10.png" alt=""/>';
 
        return '<div id="fa_thanks_message">' + icon + ' Grazie ! Questa risposta è una delle migliori ! ' + pseudo + ' ! ' + icon + '</div>';
      },
   
      version = $('body[id="modernbb"]')[0] ? 4 : $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
      node = document.createElement(version ? 'DIV' : 'TR'),
      post = $(version ? 'div' : 'tr' + '.post'),
      j = post.length,
      i = 0;
 
  if (version == 'badapple') {
    if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
 
  node.id = 'fa_thanks'; // id for style modifications
  if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
 
  for (; i < j; i++) {
 
    if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
   
      post[i].className += ' thanked'; // mark the thanked post with a class
      (version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
   
      switch (version) {
     
        case 0 : // phpbb2
          node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
          node.firstChild.className = post[i].firstChild.className;
          post[i].parentNode.insertBefore(node, post[i].nextSibling);
          break;
       
        case 1 : // phpbb3
          post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
          break;
       
        case 2 : // punbb
          node.className = 'postfoot';
          node.style.margin = '0';
          post[i].appendChild(node);
          break;
       
        case 3 : // invision
          node.className = 'post-footer';
          node.style.backgroundColor = post[i].style.backgroundColor;
          post[i].appendChild(node);
          break;

case 4 : // ModernBB
          node.className = 'post-head';
          node.style.backgroundColor = post[i].style.backgroundColor;
          post[i].appendChild(node);
          break;
     
      }
   
      break; // break out of the for loop when the thanked post is found
    }
 
  }
});
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Sab 3 Giu 2017 - 20:29

Su alcuni c'è il cuore ma quando lo premo carica la pagina e non fa nulla, Su altri (La maggior parte) dei commenti non c'è il cuoricino ( Scritta Missing_String's 2764 )
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Lun 5 Giu 2017 - 1:05

Hai un link di esempio? Wink
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Lun 5 Giu 2017 - 10:07

Qui c'è http://prntscr.com/fg1cia 
Qui no http://prntscr.com/fg1cpc 
ma quando c'è e clicco il cuore non da nulla..
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Mar 6 Giu 2017 - 21:46

Mi serve il link di un topic dove funziona e uno dove non funziona Embarassed

comunque Ricorda che solo chi ha creato quel topic può vedere il tasto grazie.. solo l'autore può ringraziare qualcuno che ha risposto al suo topic :bene:
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Mer 7 Giu 2017 - 13:07

Niko ha scritto:Mi serve il link di un topic dove funziona e uno dove non funziona Embarassed

comunque Ricorda che solo chi ha creato quel topic può vedere il tasto grazie.. solo l'autore può ringraziare qualcuno che ha risposto al suo topic :bene:
Grazie, Non lo sapevo ! 

Comunque 
Sempre questo "https://prnt.sc/fg1cia" è sempre sezione staff come ho scritto nell'altro argomento se vuoi ti metto staffer.

il secondo "https://prnt.sc/fg1cpc" http://thetamultigaming.italiaforum.net/t45-richiesta-per-entrare-nel-team (Non funzionante)
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Mer 7 Giu 2017 - 23:46

Hai provato a verificare questo? :good:

Niko ha scritto:comunque Ricorda che solo chi ha creato quel topic può vedere il tasto grazie.. solo l'autore può ringraziare qualcuno che ha risposto al suo topic :bene:
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Gio 8 Giu 2017 - 8:17

Ora provo con 2 miei profili a scrivere su Benvenuti così lo possiate leggere ance voi happy  Scritta Missing_String's 1f44d
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Gio 8 Giu 2017 - 8:24

Eccolo qui ! Ho visto però quando ho fatto "Grazie" il bottone del cuoricino non ha fatto nulla ha solo caricato la pagina e basta, Non ha aggiunto nulla nella risposta di un'altro "http://thetamultigaming.italiaforum.net/t55-ciao-questa-e-una-prova?thank=141" 

Prima a me su un'altro Stile quando cliccavo "Grazie" diceva "{Username} ha ringraziato [username della risposta] ed è come voglio fare io in pratica Wink
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Gio 8 Giu 2017 - 23:21

@McLaren Mercedes dunque.. la scritta che dicevi tu era uno script aggiuntivo e non la funzione in sé...
tuttavia effettivamente la funzione "Reputazione > Grazie" sembrerebbe non funzionare su ModernBB Embarassed

Coucou @MattiaDes ci pensi tu? in effetti cliccando sul tasto "grazie" ovvero il cuoricino non succede proprio nulla Evil or Very Mad
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da McLaren Mercedes Ven 9 Giu 2017 - 8:10

Ahhh, quindi è proprio generale.. Pensavo che avevo io dei problemi col mio forum  Embarassed
McLaren Mercedes
McLaren Mercedes
****

Sesso : Maschio
Età : 22
Messaggi : 309
Località : Roma - Venezia

http://thetamultigaming.italiaforum.net/
McLaren Mercedes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da MattiaDes Ven 9 Giu 2017 - 22:16

Ciao  ragazzi, perdonatemi per la scarsa presenta, ma a causa degli esami sono un po' assente happy

Ho provato a fare dei test e a me il tasto "Grazie" risulta funzionare. Nel senso: una volta cliccato, la pagina viene ricaricata e la reputazione dell'utente viene incrementata.

Ciò che non cambia è l'icona del tasto "Grazie", che anche dopo averlo premuto rimane la medesima. Purtroppo per quanto riguarda questa questione attualmente c'è poco da fare Embarassed la maggior parte delle immagini non è possibile gestirla dal pannello di amministrazione e, per ora, i tecnici non se ne vogliono occupare


Scritta Missing_String's Z_user10

Scritta Missing_String's 1300 Scritta Missing_String's 2203 Scritta Missing_String's 392
MattiaDes
MattiaDes
Amministratore
Amministratore

Sesso : Maschio
Età : 27
Messaggi : 5129
Località : Italy

http://www.habbolifeforum.com
MattiaDes è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da Niko Ven 9 Giu 2017 - 23:16

Però l'icona dovrebbe cambiare come accade nelle altre versioni...

per esempio su questo forum se clicchi su grazie, compare l'icona "ringraziato" Wink
inoltre, il ringraziare un post aggiunge una classe al topic, mentre non succede su modernBB Embarassed
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9425
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Scritta Missing_String's

Messaggio Da MattiaDes Sab 10 Giu 2017 - 10:22

Eh avete ragione silent

Proverò a farlo presente... dubito che faranno qualcosa a livello di "immagini", infatti ModernBB utilizza delle iconcine in CSS che non sono gestibili dal pannello di amministrazione. Speriamo però che ci aggiungano una classe apposita in modo che uno possa gestirla e personalizzarla tramite CSS


Scritta Missing_String's Z_user10

Scritta Missing_String's 1300 Scritta Missing_String's 2203 Scritta Missing_String's 392
MattiaDes
MattiaDes
Amministratore
Amministratore

Sesso : Maschio
Età : 27
Messaggi : 5129
Località : Italy

http://www.habbolifeforum.com
MattiaDes è stato ringraziato dall'autore di questo topic.

Pagina 1 di 2 1, 2  Successivo

Visualizza l'argomento precedente Visualizza l'argomento successivo Torna in alto

- Argomenti simili

 
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.