Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] customize reputaion



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
this is the customize reputation codes that i used but it doesnt work..
please help me

my forum version is punbb

Code:
jQuery(document).ready(function(){
jQuery('.user-info .post_field:contains("Reputation")').attr('style','background-color: rgb(141, 177, 62)!important;background-image: url(http://i38.servimg.com/u/f38/17/31/71/58/highli10.png);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;color: rgb(255, 255, 255);font-weight: bold;display: block;margin: 0 auto;margin-bottom: 3px;padding: 3px 7px;text-align: center;text-shadow: rgba(0, 0, 0, 0.298039) 0px -1px 0px;background-position: 0px 1px;background-repeat: repeat no-repeat;');
        jQuery('.user-info .post_field:contains("Reputation: 0")').attr('style','background-color: rgb(16, 16, 16)!important;background-image: url(http://i38.servimg.com/u/f38/17/31/71/58/highli10.png);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;color: rgb(255, 255, 255);font-weight: bold;display: block;margin: 0 auto;margin-bottom: 3px;padding: 3px 7px;text-align: center;text-shadow: rgba(0,0,0,0.3) 0px -1px 0px;background-position: 0px 1px;background-repeat: repeat no-repeat;');
        });
$('.user-info .post_field:contains("Reputation")').each(function(){var rep=$(this).text().match(/\d+/g);$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep==0){$(this).find('.title').text('Neutral')}
if(rep>=1&&rep<10){$(this).find('.title').text('Regular')}
if(rep>=10&&rep<30){$(this).find('.title').text('Favored')}
if(rep>=30&&rep<50){$(this).find('.title').text('Popular')}
if(rep>=50&&rep<100){$(this).find('.title').text('Helper')}
if(rep>=100&&rep<200){$(this).find('.title').text('Excellent')}
if(rep>=200){$(this).find('.title').text('IM Famous')}})});

Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

2
Offline

  Shadow

avatar
Administrator
Administrator
If your forum version is not on English, change [ic]jQuery('.user-info .post_field:contains("Reputation")')[/ic] to your language

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

3
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
still the same.. my forum is in english language and im still getting the same result even in my test forum i cant make it work. when i use the old codes its working fine


do i need to add css?

Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

4
Offline

  Shadow

avatar
Administrator
Administrator
Well, try this:

Code:
[panda=js]jQuery(document).ready(function(){
    jQuery('.user-info .post_field:contains("Reputation")').attr('style','background-color: rgb(141, 177, 62)!important;background-image: url(http://i57.servimg.com/u/f57/17/68/86/50/highli12.png);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;color: rgb(255, 255, 255);font-weight: bold;display: block;margin: 0 auto;margin-bottom: 3px;width: 80%; text-align: center;text-shadow: rgba(0, 0, 0, 0.298039) 0px -1px 0px;background-position: 0px 1px;background-repeat: repeat no-repeat;bottom: -2px;');
  jQuery('.user-info .post_field:contains("Reputation: 0")').attr('style','background-color: rgb(222, 222, 222)!important;background-image: url(http://i57.servimg.com/u/f57/17/68/86/50/highli12.png);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;color: rgb(110, 110, 110);font-weight: bold;display: block;margin: 0 auto;margin-bottom: 3px;width: 80%; text-align: center;text-shadow: rgba(0, 0, 0, 0.298039) 0px -1px 0px;background-position: 0px 1px;background-repeat: repeat no-repeat;bottom: -2px;');

$('.user-info .post_field:contains("Reputation")').each(function(){var rep=$(this).text().match(/\d+/g);$(this).append('<span class="title" style="font-weight:normal"></span>');

if(rep==0){$(this).find('.title').text('Neutral')}
if(rep>=1&&rep<10){$(this).find('.title').text('Regular')}
if(rep>=10&&rep<30){$(this).find('.title').text('Favored')}
if(rep>=30&&rep<50){$(this).find('.title').text('Popular')}
if(rep>=50&&rep<100){$(this).find('.title').text('Helper')}
if(rep>=100&&rep<200){$(this).find('.title').text('Excellent')}
if(rep>=200){$(this).find('.title').text('IM Famous')}})});

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

5
Offline

  Zildjian

avatar
Punbb Junior
Punbb Junior
100% working.. you are good. thanks Very Happy

Powered by PunBB
Currently 0 users have thanked Zildjian for this post:

6
Offline

  Shadow

avatar
Administrator
Administrator
Solved => Locked

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

7
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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