The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Problem with reputation bars

3 posters

Go down

Solved Problem with reputation bars

Post by Sara♥ July 29th 2014, 2:17 pm

I have tried to add reputation bars to my forum and followed the correct steps in doing so from here -> https://help.forumotion.com/t132299-add-a-bar-for-reputation ..but instead of those tiny little green bars popping under the avatar of a username, a green line like this comes out > Problem with reputation bars 2vl9r3a

Can anyone help me with this? Id really appreciate it Smile
Sara♥
Sara♥
Forumember

Female Posts : 39
Reputation : 1
Language : English
Location : Paradise

http://www.merchantmu.rigala.net

Back to top Go down

Solved Re: Problem with reputation bars

Post by Ape July 29th 2014, 2:55 pm

Hi ya again
Some of us have been changing the bar to something like what we have here on Fm by reading this thread first
https://help.forumotion.com/t48922-change-the-reputation-bar


Also did you change the code here ?
to the one your forum is on
Code:
$(document).ready(function() {
  
  var version = 'phpbb3';
  
  var settings = {
      repName : 'Reputation',
      repStyle : 'block',
      repImage : 'http://i57.servimg.com/u/f57/18/21/41/30/star12.png'
    };
  
  var repLv = {
      lv1 : 1,
      lv2 : 2,
      lv3 : 3,
      lv4 : 4,
      lv5 : 5,
      lv6 : 6,
      lv7 : 7,
      lv8 : 8
    };
  
  if (settings.repStyle.toLowerCase() == 'block') { var repBlock = '<span id="rLv" class="repuBlock">' }
    else if (settings.repStyle.toLowerCase() == 'image') { var repBlock = '<img id="rLv" src="'+settings.repImage+'"/>' }
    else { var repBlock = '<span id="rLv" class="repuBlock">' }
  
  var ver = { phpbb2 : version.toLowerCase() == 'phpbb2', phpbb3 :
version.toLowerCase() == 'phpbb3', punbb : version.toLowerCase() ==
'punbb', invision : version.toLowerCase() == 'invision' };
    var reg = new RegExp('.*'+settings.repName+':\\s+(\\d+).*');
 
   if (ver.phpbb3 || ver.punbb || ver.invision) {
  
    if (ver.phpbb3 || ver.invision) { var profSel = '.postprofile'; var
addRepu = $(this).find('dt').append('<div id="repu">'); }
      else if (ver.punbb) { var profSel = '.user'; var addRepu = $(this).find('.user-ident').prepend('<div id="repu">'); }
      $(profSel).each(function() {
          var rep = Number($(this).text().replace(reg,'$1'));
          addRepu;
          if (rep >= repLv.lv1) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv2 }
          if (rep >= repLv.lv2) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv3 }
          if (rep >= repLv.lv3) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv4 }
          if (rep >= repLv.lv4) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv5 }
          if (rep >= repLv.lv5) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv6 }
          if (rep >= repLv.lv6) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv7 }
          if (rep >= repLv.lv7) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv8 }
          if (rep >= repLv.lv8) { $(this).find('#repu').append(repBlock); var next = 'MAX' }
          $(this).find('#repu').attr('title','Reputation level ' + $(this).find('#rLv').length + '\nNext : (' + next + ')');
      });
    }
    else if (ver.phpbb2) {
      $('td .postdetails.poster-profile').each(function() {
          var rep = Number($(this).text().replace(reg,'$1'));
          $(this).parent().find('.name').next().after('<div id="repu">');
          if (rep >= repLv.lv1) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv2  }
          if (rep >= repLv.lv2) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv3  }
          if (rep >= repLv.lv3) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv4  }
          if (rep >= repLv.lv4) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv5  }
          if (rep >= repLv.lv5) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv6  }
          if (rep >= repLv.lv6) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv7  }
          if (rep >= repLv.lv7) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv8  }
          if (rep >= repLv.lv8) { $(this).parent().find('#repu').append(repBlock); var next = 'MAX'  }
  
        $(this).parent().find('#repu').attr('title','Reputation level ' +
 $(this).parent().find('#rLv').length  + '\nNext : (' + next + ')');
      });
    }
});
for your forum it should be
Adding the javascript

Go to Administration panel ► Modules ► Javascript codes management ► Create a new script.

Title : Reputation Bars
Placement : In the topics
Paste the code below and submit :
Code:
$(document).ready(function() {
  
  var version = 'phpbb2';
  
  var settings = {
      repName : 'Reputation',
      repStyle : 'block',
      repImage : 'http://i57.servimg.com/u/f57/18/21/41/30/star12.png'
    };
  
  var repLv = {
      lv1 : 1,
      lv2 : 2,
      lv3 : 3,
      lv4 : 4,
      lv5 : 5,
      lv6 : 6,
      lv7 : 7,
      lv8 : 8
    };
  
  if (settings.repStyle.toLowerCase() == 'block') { var repBlock = '<span id="rLv" class="repuBlock">' }
    else if (settings.repStyle.toLowerCase() == 'image') { var repBlock = '<img id="rLv" src="'+settings.repImage+'"/>' }
    else { var repBlock = '<span id="rLv" class="repuBlock">' }
  
  var ver = { phpbb2 : version.toLowerCase() == 'phpbb2', phpbb3 :
version.toLowerCase() == 'phpbb3', punbb : version.toLowerCase() ==
'punbb', invision : version.toLowerCase() == 'invision' };
    var reg = new RegExp('.*'+settings.repName+':\\s+(\\d+).*');
 
   if (ver.phpbb3 || ver.punbb || ver.invision) {
  
    if (ver.phpbb3 || ver.invision) { var profSel = '.postprofile'; var
addRepu = $(this).find('dt').append('<div id="repu">'); }
      else if (ver.punbb) { var profSel = '.user'; var addRepu = $(this).find('.user-ident').prepend('<div id="repu">'); }
      $(profSel).each(function() {
          var rep = Number($(this).text().replace(reg,'$1'));
          addRepu;
          if (rep >= repLv.lv1) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv2 }
          if (rep >= repLv.lv2) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv3 }
          if (rep >= repLv.lv3) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv4 }
          if (rep >= repLv.lv4) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv5 }
          if (rep >= repLv.lv5) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv6 }
          if (rep >= repLv.lv6) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv7 }
          if (rep >= repLv.lv7) { $(this).find('#repu').append(repBlock); var next = rep + '/' + repLv.lv8 }
          if (rep >= repLv.lv8) { $(this).find('#repu').append(repBlock); var next = 'MAX' }
          $(this).find('#repu').attr('title','Reputation level ' + $(this).find('#rLv').length + '\nNext : (' + next + ')');
      });
    }
    else if (ver.phpbb2) {
      $('td .postdetails.poster-profile').each(function() {
          var rep = Number($(this).text().replace(reg,'$1'));
          $(this).parent().find('.name').next().after('<div id="repu">');
          if (rep >= repLv.lv1) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv2  }
          if (rep >= repLv.lv2) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv3  }
          if (rep >= repLv.lv3) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv4  }
          if (rep >= repLv.lv4) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv5  }
          if (rep >= repLv.lv5) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv6  }
          if (rep >= repLv.lv6) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv7  }
          if (rep >= repLv.lv7) { $(this).parent().find('#repu').append(repBlock); var next = rep + '/' + repLv.lv8  }
          if (rep >= repLv.lv8) { $(this).parent().find('#repu').append(repBlock); var next = 'MAX'  }
  
        $(this).parent().find('#repu').attr('title','Reputation level ' +
 $(this).parent().find('#rLv').length  + '\nNext : (' + next + ')');
      });
    }
});


Problem with reputation bars Left1212Problem with reputation bars Center11Problem with reputation bars Right112
Problem with reputation bars Ape_b110
Problem with reputation bars Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19436
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Problem with reputation bars

Post by Sara♥ July 30th 2014, 8:41 pm

oh great it works thanks! Very Happy is there a way to make it go under the avatar tho? Smile
Sara♥
Sara♥
Forumember

Female Posts : 39
Reputation : 1
Language : English
Location : Paradise

http://www.merchantmu.rigala.net

Back to top Go down

Solved Re: Problem with reputation bars

Post by Ape July 31st 2014, 12:32 am

Sorry that i Do not know sorry


Problem with reputation bars Left1212Problem with reputation bars Center11Problem with reputation bars Right112
Problem with reputation bars Ape_b110
Problem with reputation bars Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19436
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Problem with reputation bars

Post by Sara♥ August 3rd 2014, 1:11 pm

alright thanks! I have another question, is it possible to add multiple rank images? 
Like this -> Problem with reputation bars 2dgjrbr
Sara♥
Sara♥
Forumember

Female Posts : 39
Reputation : 1
Language : English
Location : Paradise

http://www.merchantmu.rigala.net

Back to top Go down

Solved Re: Problem with reputation bars

Post by Ape August 3rd 2014, 2:48 pm

You can use the profile fields:
https://help.forumotion.com/t11187-personalized-profile-fields-warning-system
ok this is for the warning system but you can also add ranks to the same sort of system.


Problem with reputation bars Left1212Problem with reputation bars Center11Problem with reputation bars Right112
Problem with reputation bars Ape_b110
Problem with reputation bars Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19436
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Problem with reputation bars

Post by SLGray August 4th 2014, 12:00 am

Please start new topics for questions/issues that are not related.

Is the issue with the reputation bars solved?


Problem with reputation bars Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Problem with reputation bars

Post by Sara♥ August 4th 2014, 10:19 am

alright thankyou and yes problem solved Smile
Sara♥
Sara♥
Forumember

Female Posts : 39
Reputation : 1
Language : English
Location : Paradise

http://www.merchantmu.rigala.net

Back to top Go down

Solved Re: Problem with reputation bars

Post by Ape August 4th 2014, 11:32 am

Topic solved and archived


Problem with reputation bars Left1212Problem with reputation bars Center11Problem with reputation bars Right112
Problem with reputation bars Ape_b110
Problem with reputation bars Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19436
Reputation : 2010
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum