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.

Reputation bar

3 posters

Go down

In progress Reputation bar

Post by Bokssha October 31st 2014, 1:17 pm

Hello...  
I was folowing this tutorial about reputation bar.
My question is how to change the position of the blocks or images,can I place it somewhere else,
I want to place it somewhere close to the rep number... ? 
Thanks in adwance.

Reputation bar U10
Bokssha
Bokssha
Forumember

Female Posts : 158
Reputation : 0
Language : Serbian
Location : Srbia / Belgrade

http://drekavac.serbianforum.info/

Back to top Go down

In progress Re: Reputation bar

Post by _Twisted_Mods_ October 31st 2014, 1:30 pm

acp>users & groups>profiles
you should be able to click the arrows next to Reputation and move it lower
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2108
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Reputation bar

Post by Bokssha October 31st 2014, 1:41 pm

Hey _Twisted_Mods_  ,  I dont want to move number of reputation, I want to move the blocks
   I added using this  tutorial .   I put the image of what I want to do.  Very Happy
Bokssha
Bokssha
Forumember

Female Posts : 158
Reputation : 0
Language : Serbian
Location : Srbia / Belgrade

http://drekavac.serbianforum.info/

Back to top Go down

In progress Re: Reputation bar

Post by _Twisted_Mods_ October 31st 2014, 2:13 pm

i was gonna try to help but i cant even get it to work on my forum
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2108
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Reputation bar

Post by Ange Tuteur October 31st 2014, 7:34 pm

Hello Bokssha,

Try replacing your script by :
Code:
$(document).ready(function() {
  
  var version = 'phpbb2';
  
  var settings = {
      repName : 'Rep',
      repStyle : 'block',
      repImage : 'http://i57.servimg.com/u/f57/18/21/41/30/star12.png'
    };
  
  var repLv = {
      lv1 : 1,
      lv2 : 5,
      lv3 : 10,
      lv4 : 20,
      lv5 : 40,
      lv6 : 65,
      lv7 : 80,
      lv8 : 100
    };
  
    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+).*');
    var replace = new RegExp('(<span class="label"><span style="color:#[0-9a-f]+;">' + settings.repName + '</span>:\\s</span>\\s\\d+<br>)','i');
 
   if (ver.phpbb2) {
      $('.postdetails.poster-profile').each(function() {
          var rep = Number($(this).text().replace(reg,'$1'));
          $(this).html($(this).html().replace(replace,'$1<div id="repu"></div>'));
          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 + ')');
      });
    }
});
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top


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