FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 10 users online :: 0 Registered, 0 Hidden and 10 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

[SOLVED] Warning bars don't show no more

View previous topic View next topic Go down

Anonymous
Guest
Guest

PostGuest Tue 14 Jun 2016, 10:10

I noticed on my site the warning bars (rep) don't show no more. It just shows 'rep : 5' for instance now in the profiles instead of the pictures. I'm using pictures like this one https://2img.net/h/i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-100.png , freely available from the Forumotion GFX library.

I also noticed the last few days/weeks Photobucket was down for site maintenance, perhaps that's why the links to the pics changed to for instance https://s380.photobucket.com/user/LH-Justin/media/TranslucentWarningBars-100.png , at least that's what I thought so that's why I waited a little while, but even when those links are entered into the JS it won't show me the pics in the profiles.

I've got absolutely no clue at all why it's not showing me the pictures as a member all of the sudden.

The script:
Code:
$(document).ready(function() {
    
      var version = 'phpbb3';
    
      var settings = {
          repName : 'Rep',
          repImage1 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-100.png',
          repImage2 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-80.png',
          repImage3 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-60.png',
          repImage4 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-40.png',
          repImage5 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-20.png',
          repImage6 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-0.png'
        };
    
      var repLv = {
          lv1 : 5,
          lv2 : 4,
          lv3 : 3,
          lv4 : 2,
          lv5 : 1,
          lv6 : 0,
        };
    
        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+).*'), regex = new RegExp('<span class="label"><span style="color:#.*?;">'+settings.repName+'</span>: </span> \\d+<br>');
    
      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').html('<img src="'+settings.repImage1+'"/>') }
              if (rep == repLv.lv2) { $(this).find('#repu').html('<img src="'+settings.repImage2+'"/>') }
              if (rep == repLv.lv3) { $(this).find('#repu').html('<img src="'+settings.repImage3+'"/>') }
              if (rep == repLv.lv4) { $(this).find('#repu').html('<img src="'+settings.repImage4+'"/>') }
              if (rep == repLv.lv5) { $(this).find('#repu').html('<img src="'+settings.repImage5+'"/>') }
              if (rep == repLv.lv6) { $(this).find('#repu').html('<img src="'+settings.repImage6+'"/>') }
              $(this).html($(this).html().replace(regex,''));
          });
        }
    });


Last edited by Samantha on Tue 14 Jun 2016, 11:28; edited 1 time in total
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 14 Jun 2016, 10:41

Yep, the images are showing, going by this :
[SOLVED] Warning bars don't show no more TranslucentWarningBars-100

So I guess it's something JavaScript related. Are you getting any errors where the script is suppose to run ? Press F12 > Go to console, and then reload the page. If there's any error it'll pop up there.
Anonymous
Guest
Guest

PostGuest Tue 14 Jun 2016, 10:46

Yeah, this is what is says (pls, notice the 'Rep : 5'):

[SOLVED] Warning bars don't show no more 20576141d7de4e56a76e7b315b13cc99

Well, that's in the profile. I've got this one for you in the 'Music Topic':

[SOLVED] Warning bars don't show no more E3f39d0891494b2d916483fb0984f44d
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 14 Jun 2016, 10:57

Oh is that the profile page ? From what I can tell, the script you posted only executes on the post profile while viewing a topic. Think
Anonymous
Guest
Guest

PostGuest Tue 14 Jun 2016, 11:04

Ange Tuteur wrote:Oh is that the profile page ? From what I can tell, the script you posted only executes on the post profile while viewing a topic. Think

It does. It's in the topics only, but in the topics it doesn't show up either:

[SOLVED] Warning bars don't show no more 89e31c2f052c4835be37af831a921f43

PS: I've sent you a PM on my site
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12044
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 14 Jun 2016, 11:22

I think I found the problem. For god knows what reason, Forumotion changed all the profile fields recently by adding a space directly before the colons in the profile fields. That spacing is a French punctuation thing though, so I guess it was driving them nuts that there wasn't a space there ? Fucks nearly every script up that modified profile fields in the process. lol!

Try replacing your script with the one below, and lemme know if that works for you. Salute
Code:
$(document).ready(function() {
   
      var version = 'phpbb3';
   
      var settings = {
          repName : 'Rep',
          repImage1 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-100.png',
          repImage2 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-80.png',
          repImage3 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-60.png',
          repImage4 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-40.png',
          repImage5 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-20.png',
          repImage6 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-0.png'
        };
   
      var repLv = {
          lv1 : 5,
          lv2 : 4,
          lv3 : 3,
          lv4 : 2,
          lv5 : 1,
          lv6 : 0,
        };
   
        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+:\\s+(\\d+).*'), regex = new RegExp('<span class="label"><span style="color:#.*?;">'+settings.repName+'</span> : </span> \\d+<br>');
   
      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').html('<img src="'+settings.repImage1+'"/>') }
              if (rep == repLv.lv2) { $(this).find('#repu').html('<img src="'+settings.repImage2+'"/>') }
              if (rep == repLv.lv3) { $(this).find('#repu').html('<img src="'+settings.repImage3+'"/>') }
              if (rep == repLv.lv4) { $(this).find('#repu').html('<img src="'+settings.repImage4+'"/>') }
              if (rep == repLv.lv5) { $(this).find('#repu').html('<img src="'+settings.repImage5+'"/>') }
              if (rep == repLv.lv6) { $(this).find('#repu').html('<img src="'+settings.repImage6+'"/>') }
              $(this).html($(this).html().replace(regex,''));
          });
        }
    });
Anonymous
Guest
Guest

PostGuest Tue 14 Jun 2016, 11:25

YAY! Works! You (and LGforum) are the greatest! AWESOME! Good

You see, I figured it'd be something like that. HAHA! lel. It just knew it couldn't be me! Razz

So that means a lot of people who use the script would fail to execute it properly, right? Bug found! Pls, tell FM about it, would ya? And someone pls update that tuto now ... Wink
BlackScorpion
BlackScorpion
Valued Member
Gender : Male
Posts : 1165
Points : 4991
Reputation : 96
Location : USA
Language : english
Browser : Browser : Google Chrome Forum Version : Forum Version : Other
http://themechanger.forumotion.com https://pinterest.com/blkscorpion2

PostBlackScorpion Tue 14 Jun 2016, 21:31

Nice work Ange, if it was up to me that bug would still be there, until someone figured it out, like you did. Razz
jessy
jessy

Gender : Female
Posts : 102
Points : 3141
Reputation : 14
Language : italy
Browser : Browser : Google Chrome Forum Version : Forum Version : Invision
http://ilgiornaledibordo.forumattivo.com/

Postjessy Wed 15 Jun 2016, 12:51

I modified the version with invision..It does not work where am I wrong? thank you

Code:
$(document).ready(function() {
 
      var version = 'invision';
 
      var settings = {
          repName : 'Rep',
          repImage1 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-100.png',
          repImage2 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-80.png',
          repImage3 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-60.png',
          repImage4 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-40.png',
          repImage5 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-20.png',
          repImage6 : 'http://i380.photobucket.com/albums/oo242/LH-Justin/TranslucentWarningBars-0.png'
        };
 
      var repLv = {
          lv1 : 5,
          lv2 : 4,
          lv3 : 3,
          lv4 : 2,
          lv5 : 1,
          lv6 : 0,
        };
 
        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+:\\s+(\\d+).*'), regex = new RegExp('<span class="label"><span style="color:#.*?;">'+settings.repName+'</span> : </span> \\d+<br>');
 
      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').html('<img src="'+settings.repImage1+'"/>') }
              if (rep == repLv.lv2) { $(this).find('#repu').html('<img src="'+settings.repImage2+'"/>') }
              if (rep == repLv.lv3) { $(this).find('#repu').html('<img src="'+settings.repImage3+'"/>') }
              if (rep == repLv.lv4) { $(this).find('#repu').html('<img src="'+settings.repImage4+'"/>') }
              if (rep == repLv.lv5) { $(this).find('#repu').html('<img src="'+settings.repImage5+'"/>') }
              if (rep == repLv.lv6) { $(this).find('#repu').html('<img src="'+settings.repImage6+'"/>') }
              $(this).html($(this).html().replace(regex,''));
          });
        }
    });
Anonymous
Guest
Guest

PostGuest Wed 15 Jun 2016, 13:07

@jessy

You'll need to have the advanced profiles activated and add an extra profile field with these settings (sorry it's in Dutch, it's the main language on my site):

[SOLVED] Warning bars don't show no more 6a7d389870eb473d8c9c78808422fb35

The standard value of 5 will be a 100% warning bar. When you go into someone's profile, you'll see a field called 'Rep : ' and the value for that user will be 5, until you change it to 4 (80%), 3 (60%), etc. If you want moderators to be able to control the field, make sure to hit the Moderators check-box next to Who can modify the field value.

It's all in this handy tuto: http://help.forumotion.com/t132299-add-a-bar-for-reputation
jessy
jessy

Gender : Female
Posts : 102
Points : 3141
Reputation : 14
Language : italy
Browser : Browser : Google Chrome Forum Version : Forum Version : Invision
http://ilgiornaledibordo.forumattivo.com/

Postjessy Thu 16 Jun 2016, 13:06

thank you so much you are very kind loove
Anonymous
Guest
Guest

PostGuest Thu 16 Jun 2016, 13:12

@jessy . np at all. Glad 2 b of help Smile
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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