The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Alternative Reputation System, possible?

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

Solved Alternative Reputation System, possible?

Post by Themistokles on September 13th 2012, 12:34 pm

Hello.

I am trying to figure out if making an alternative reputation is possible and if yes how?
I believe that the current rep system is a little bit boring displaying only the number of the reputation points received, so what i would like is to display icons and when hovering over them a small description.
Here's what i mean:

For every 3 reputation points received, i want the users to receive a silver ring. Each ring equals 3 points, so someone with 15 points has 5 rings (that's the icon limit as well, no more than 5). Every 15 points the silver rings transform into a single gold ring. So somebody with 18 points has a gold ring and a silver, 21 points gold ring & 2 silver, etc etc... ,30 points 2 golden rings...
Each 150 gold rings, the symbols transform into a another symbol.
Visually:
3 points:

15points:

29 points:
60 points:

etc etc for the rest of the points...
Is something like this possible?

Themistokles
New Member

Posts : 12
Reputation : 1
Language : English

http://twhellas.forumotions.info/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by runawayhorses on September 13th 2012, 1:47 pm

Its certainly doable but I don't think there is a script for it at this time, at least I've never heard of it. Its a good idea and something I think a lot of people would be interested in.

Good luck with that I'll be watching this topic. Smile

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by cHaSwWind04 on September 13th 2012, 1:59 pm

I got a feeling you got this idea from hiveworkshop. Just a feeling...

Watching this topic since I love it.

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Themistokles on September 13th 2012, 2:24 pm

@runawayhorses wrote:Its certainly doable but I don't think there is a script for it at this time, at least I've never heard of it. Its a good idea and something I think a lot of people would be interested in.

Good luck with that I'll be watching this topic. Smile

Glad to know its doable! Thanks for watching!

cboy123 wrote:I got a feeling you got this idea from hiveworkshop. Just a feeling...

Watching this topic since I love it.

You're very close! Actually the idea is not mine, it is a system used in the twcenter forums. I am building a similar forum for the Greek community and i would love to feature something like their system.

You can read more about the system in more details here:http://www.twcenter.net/wiki/TWC:FAQ#Reputation

Moreover, i am not blessed with knowledge or the luck of knowing any scripters or programmers, so if anyone is interested in developing such a script, i would be most grateful!

Feel free to pm, or leave a message at this thread.
Cheers!

Themistokles
New Member

Posts : 12
Reputation : 1
Language : English

http://twhellas.forumotions.info/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by LGforum on September 13th 2012, 3:39 pm

This script will do just that for you. I might make a tutorial on this so it can be used for varying reputation types. Thanks for the idea.

Code:

function LGparsepoints(total) {
  var copyright = "Copyright (C) by LGforum of AvacWeb. All Rights Reserved. No Distribution without consent. No use without this entire copyright notice in the modified or original copy.";

  var gold = 'http://img819.imageshack.us/img819/3271/goldring.png'; //IMG URL FOR GOLD RINGS
  var silver = 'http://img33.imageshack.us/img33/4629/silverring.png'; //IMG URL FOR SOLVER RINGS

  total = parseInt(total);
  if(total > 75) total = 75;
  var grings = Math.floor(total / 15);
  var html = '<span class="LGrep">';
  for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
  var srings = total - (15 * grings);
  srings = Math.floor(srings / 3);
  for(i = 0; i<srings; i++) html += '<img src="'+silver+'">';

  return html + '</span>';
};

$(function() {
  var repname = 'Points'; //EXACT NAME OF REPUTATION FIELD
  var pp = $('.postprofile', document.getElementById('main-content'));
  for( var e, i = 0; (e = pp[ i++] ); ) {
    var dl = e.getElementsByTagName('dl')[0];
    var r = RegExp('>' + repname + ':\\D+(\\d+)(?=\\s*<)', 'i');
    dl.innerHTML = dl.innerHTML.replace(r, function(m, points) {
      return '>' + points + ' Points ' + LGparsepoints(points);
    });
  }
});
Please respect my copyrights. And please read the bits in capitals, they are needed for it to work.

Also, I chanhged the maximum to 75, 5 x 15 is 75, not 60, so I assumed that would be right?


Last edited by LGforum on September 13th 2012, 10:29 pm; edited 1 time in total

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by runawayhorses on September 13th 2012, 3:53 pm

Awesome LG, I had you in mind when I first read this topic and replied to it, I thought you might jump on this if you read it too, Smile

I'll wait awhile before I install it, it case you need to iron out some details for versions or something, or perhaps make a tut for it, which I hope you do. Awesome man.. Very Happy

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Themistokles on September 13th 2012, 4:19 pm

@LGforum wrote:This script will do just that for you. I might make a tutorial on this so it can be used for varying reputation types. Thanks for the idea.

Code:

function LGparsepoints(total) {
  var copyright = "Copyright (C) by LGforum of AvacWeb. All Rights Reserved. No Distribution without consent. No use without this entire copyright notice in the modified or original copy.";

  var gold = 'http://img819.imageshack.us/img819/3271/goldring.png'; //IMG URL FOR GOLD RINGS
  var silver = 'http://img33.imageshack.us/img33/4629/silverring.png'; //IMG URL FOR SOLVER RINGS

  total = parseInt(total);
  if(total > 75) total = 75;
  var grings = Math.floor(total / 15);
  var html = '<span class="LGrep">';
  for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
  var srings = total - (15 * grings);
  srings = srings / 3;
  for(i = 0; i<srings; i++) html += '<img src="'+silver+'">';

  return html + '</span>';
};

$(function() {
  var repname = 'Points'; //EXACT NAME OF REPUTATION FIELD
  var pp = $('.postprofile', document.getElementById('main-content'));
  for( var e, i = 0; (e = pp[ i++] ); ) {
    var dl = e.getElementsByTagName('dl')[0];
    var r = RegExp('>' + repname + ':\\D+(\\d+)(?=\\s*<)', 'i');
    dl.innerHTML = dl.innerHTML.replace(r, function(m, points) {
      return '>' + points + ' Points ' + LGparsepoints(points);
    });
  }
});
Please respect my copyrights. And please read the bits in capitals, they are needed for it to work.

Also, I chanhged the maximum to 75, 5 x 15 is 75, not 60, so I assumed that would be right?

No words can express how thankful i am, i have sent you a pm with something additional i forgot to mention here!
Many many thanks!

Themistokles
New Member

Posts : 12
Reputation : 1
Language : English

http://twhellas.forumotions.info/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by MarkoNinic1994 on September 13th 2012, 8:00 pm

Hmm i'm interested in this too lg you might something if i use it?

MarkoNinic1994
Forumember

Posts : 89
Reputation : 2
Language : English,Danish,Serbian,Romanian

http://fantasypub.serbianforum.info/forum

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by cHaSwWind04 on September 13th 2012, 9:39 pm

@LGforum wrote:This script will do just that for you. I might make a tutorial on this so it can be used for varying reputation types. Thanks for the idea.

Code:

function LGparsepoints(total) {
  var copyright = "Copyright (C) by LGforum of AvacWeb. All Rights Reserved. No Distribution without consent. No use without this entire copyright notice in the modified or original copy.";

  var gold = 'http://img819.imageshack.us/img819/3271/goldring.png'; //IMG URL FOR GOLD RINGS
  var silver = 'http://img33.imageshack.us/img33/4629/silverring.png'; //IMG URL FOR SOLVER RINGS

  total = parseInt(total);
  if(total > 75) total = 75;
  var grings = Math.floor(total / 15);
  var html = '<span class="LGrep">';
  for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
  var srings = total - (15 * grings);
  srings = srings / 3;
  for(i = 0; i<srings; i++) html += '<img src="'+silver+'">';

  return html + '</span>';
};

$(function() {
  var repname = 'Points'; //EXACT NAME OF REPUTATION FIELD
  var pp = $('.postprofile', document.getElementById('main-content'));
  for( var e, i = 0; (e = pp[ i++] ); ) {
    var dl = e.getElementsByTagName('dl')[0];
    var r = RegExp('>' + repname + ':\\D+(\\d+)(?=\\s*<)', 'i');
    dl.innerHTML = dl.innerHTML.replace(r, function(m, points) {
      return '>' + points + ' Points ' + LGparsepoints(points);
    });
  }
});
Please respect my copyrights. And please read the bits in capitals, they are needed for it to work.

Also, I chanhged the maximum to 75, 5 x 15 is 75, not 60, so I assumed that would be right?

I'm pretty sure that you need to install LG Like System, would be better if it is for all versions without the Like System since the Like System is bugged as some parts didn't have the Like Button since it was posted before the system was installed.

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by LGforum on September 13th 2012, 10:28 pm

Yes go ahead and use it, just be sure to read the comments in capitals in the script, they are important.

This script won't affect the like system.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by cHaSwWind04 on September 13th 2012, 10:55 pm

What is the line
if(total > 75) total = 75;
tells us?
It 75 is the maximum reputation that can have a photo like I want to have a pedobear icon for 500 reputation and it will remain even you got a thousand or a million reputation?

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by LGforum on September 13th 2012, 11:08 pm

That line basically limits the amount of images. FOr example, the OP asked for a gold ring for every 15 points, so if a user had 1500 points then thats would 100 gold rings. SO that line prevents showing 100 gold rings. It sets it as a max of 5 gold rings.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by MarkoNinic1994 on September 13th 2012, 11:20 pm

@LGforum wrote:That line basically limits the amount of images. FOr example, the OP asked for a gold ring for every 15 points, so if a user had 1500 points then thats would 100 gold rings. SO that line prevents showing 100 gold rings. It sets it as a max of 5 gold rings.


I admit you have done ver very very nice work my friend is there a problem if i pm you lg?

MarkoNinic1994
Forumember

Posts : 89
Reputation : 2
Language : English,Danish,Serbian,Romanian

http://fantasypub.serbianforum.info/forum

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by cHaSwWind04 on September 14th 2012, 9:57 am

Oh well, I better wait for the tutorial since I want to add 5 types of rings.

cHaSwWind04
Forumember

Male Posts : 192
Reputation : 1
Language : English
Location : In front of a monitor... Duh!

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 4th 2012, 2:11 pm

Hi! I am from the same forum where Themistokles belong... Unfortunately, for some reason, the system doesn't work. Do you have the same problem?

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 4th 2012, 7:30 pm

Rideem3 wrote:It could be another JavaScript interfering with this one. Did you add any new JavaScripts?

Yes.

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 4th 2012, 7:38 pm

Rideem3 wrote:Then they could be written with errors that would interfere with this one. Remove them and see if it will work.

I will try, but isn't there an other way to make it work?

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 4th 2012, 9:54 pm

Rideem3 wrote:No. The problem isn't this code, it's your others.

Oh! I will try to remove one and i will let you know...

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by LGforum on October 4th 2012, 10:06 pm

Themistokles has been talking to me via PM about fixing the problems.

I haven't been on this forum in over a week though so I haven't been able to reply for a while sorry.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 4th 2012, 10:22 pm

@LGforum wrote:Themistokles has been talking to me via PM about fixing the problems.

I haven't been on this forum in over a week though so I haven't been able to reply for a while sorry.

I'm trying to make it work removing the other scripts (i made a backup ofc)...

I will let you know if it will work or not, to intervene if needed.

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 4th 2012, 10:34 pm

Nothing. I removed all the other scripts and it still to be not working...

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by nextlevelgaming on October 5th 2012, 4:31 am

Did you modify the script at all? besides adding your image links? or maybe when inserting the image link you accidentally erased a
Code:
'
which would cause the whole code to not work. Repost the entire code from your end, or place the code into a validator online.

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 5th 2012, 7:09 am

@nextlevelgaming wrote:Did you modify the script at all? besides adding your image links? or maybe when inserting the image link you accidentally erased a
Code:
'
which would cause the whole code to not work. Repost the entire code from your end, or place the code into a validator online.

Here the reputation system that i have so far:

Code:
function LGparsepoints(total) {
      var copyright = "Copyright (C) by LGforum of AvacWeb. All Rights Reserved. No Distribution without consent. No use without this entire copyright notice in the modified or original copy.";

      var gold = 'http://img819.imageshack.us/img819/3271/goldring.png'; //IMG URL FOR GOLD RINGS
      var silver = 'http://img33.imageshack.us/img33/4629/silverring.png'; //IMG URL FOR SOLVER RINGS

      total = parseInt(total);
      if(total > 75) total = 75;
      var grings = Math.floor(total / 15);
      var html = '<span class="LGrep">';
      for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
      var srings = total - (15 * grings);
      srings = Math.floor(srings / 3);
      for(i = 0; i<srings; i++) html += '<img src="'+silver+'">';

      return html + '</span>';
    };

    $(function() {
      var repname = 'Points'; //EXACT NAME OF REPUTATION FIELD
      var pp = $('.postprofile', document.getElementById('main-content'));
      for( var e, i = 0; (e = pp[ i++] ); ) {
        var dl = e.getElementsByTagName('dl')[0];
        var r = RegExp('>' + repname + ':\\D+(\\d+)(?=\\s*<)', 'i');
        dl.innerHTML = dl.innerHTML.replace(r, function(m, points) {
          return '>' + points + ' Points ' + LGparsepoints(points);
        });
      }
    });

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by nextlevelgaming on October 5th 2012, 9:16 pm

if you go to jslint.com it throws multiple errors in the coding, which is not good, it will cause this and other js codes to not work if not written correctly. Besides that it looks like you did not change much at all

after
Code:
return html + '</span>';
the written tag should be
Code:
});
not
Code:
};

I believe, im not positive im only like 6 months into JS not a buff at it. But I use alot of validators so it passes W3C and does not effect badly written codes. If you have two codes that are written (that throw validation errors) in one page one or the other or both will not work properly.




VALIDATION ERROR PROPERS

Code:
Missing 'use strict' statement.      var copyright = "Copyright (C) by LGforum of AvacWeb. All Rights Reserved. No Distribution without consent. No use without this entire copyright notice in the modified or original copy.";
line 2 character 7
Expected 'var' at column 5, not column 7.      var copyright = "Copyright (C) by LGforum of AvacWeb. All Rights Reserved. No Distribution without consent. No use without this entire copyright notice in the modified or original copy.";
line 4 character 7
Expected 'var' at column 5, not column 7.      var gold = 'http://img819.imageshack.us/img819/3271/goldring.png'; //IMG URL FOR GOLD RINGS
line 4 character 11
Combine this with the previous 'var' statement.      var gold = 'http://img819.imageshack.us/img819/3271/goldring.png'; //IMG URL FOR GOLD RINGS
line 5 character 7
Expected 'var' at column 5, not column 7.      var silver = 'http://img33.imageshack.us/img33/4629/silverring.png'; //IMG URL FOR SOLVER RINGS
line 5 character 11
Combine this with the previous 'var' statement.      var silver = 'http://img33.imageshack.us/img33/4629/silverring.png'; //IMG URL FOR SOLVER RINGS
line 7 character 7
Expected 'total' at column 5, not column 7.      total = parseInt(total);
line 7 character 15
Missing radix parameter.      total = parseInt(total);
line 8 character 7
Expected 'if' at column 5, not column 7.      if(total > 75) total = 75;
line 8 character 9
Expected exactly one space between 'if' and '('.      if(total > 75) total = 75;
line 8 character 22
Expected '{' and instead saw 'total'.      if(total > 75) total = 75;
line 8 character 22
Expected 'total' at column 5, not column 22.      if(total > 75) total = 75;
line 9 character 7
Expected 'var' at column 5, not column 7.      var grings = Math.floor(total / 15);
line 9 character 11
Combine this with the previous 'var' statement.      var grings = Math.floor(total / 15);
line 10 character 7
Expected 'var' at column 5, not column 7.      var html = '<span class="LGrep">';
line 10 character 11
Combine this with the previous 'var' statement.      var html = '<span class="LGrep">';
line 11 character 7
Expected 'for' at column 5, not column 7.      for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
line 11 character 10
Missing space between 'for' and '('.      for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
line 11 character 11
Move 'var' declarations to the top of the function.      for(var i = 0; i<grings; i++) html += '<img src="'+gold+'">';
line 11 character 11
Stopping. (37% scanned).unusedcopyright
LGparsepoints 1
, gold
LGparsepoints 1
, silver
LGparsepoints 1
, grings
LGparsepoints 1
, html
LGparsepoints 1

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by LGforum on October 5th 2012, 10:36 pm

@nextlevelgaming wrote:
after
Code:
return html + '</span>';
the written tag should be
Code:
});
not
Code:
};
That's incorrect, that will only create an error. Its a standard function, and not wrapped in a closure of any sort. Notice there is no opening bracket? No closing one needed if their no opening one. Wink

The errors that your showing are for strict layout rules, mostly for readability purposes. None that would stop the code from working.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by nextlevelgaming on October 5th 2012, 11:19 pm

Ah I gotcha LG, looking at it now, I see what you mean no opening tag Wink

though shouldn't the errors be fixed with strict so that functionality be 100%? what would cause the code to be bad persay? like i said only been 6months in js so I use lints and keep er clean so I dont get mad that its not working properly lol.

I don't doubt your coding, I just checked his script he had incase something was making it not run properly. Which in turn gave me errors so I mentioned them.

What the fuck ?!? lol

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 5th 2012, 11:39 pm

LG, see my PM please.

@nextlevel, thank you very much for your help!

I tried to make it work removing all the other java codes, but nothing. Don't know why it doesn't work...

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by LGforum on October 6th 2012, 12:41 am

If you read what it saying, "Expected 'var' at column 5, not column 7." the columns is where the character is.
Aka:
Columns along the line, rows down the side.
012345
1
2
4

So when it says the error above, it saying it expected "var" at column 5 instead of column 7. So its just annoyed at my layout. Razz Nothing that would effect the code running at all.

This error: "Combine this with the previous 'var' statement. "
Is basically complaining that I defined two variables in seperate statements instead of as one statement. So as an example:
Code:
var x = 1; //statement 1
var y = 2; //statement 2
And it's saying I should have done this:
Code:
var x = 1, y = 2;
Again, preference really.

The next different error I see is: "Missing radix parameter. total = parseInt(total);"
The parseInt function expects a Radix as a second parameter. However, if it's left out, it assumes a Radix of 10 (a standard base 10, decimal number), which is what we want.

Hope that helps you understand those "errors".

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by Alkimachos on October 6th 2012, 12:41 am

Rideem3 wrote:I'm asking whether it ever worked. Like did it work before?

No, never as far as i know...

@LG, are you referring to me?

Alkimachos
Forumember

Posts : 35
Reputation : 1
Language : Greek

Back to top Go down

Solved Re: Alternative Reputation System, possible?

Post by nextlevelgaming on October 9th 2012, 2:00 am

Thanks LG, im learning man, self teaching myself everything, with help from you of course lol. So basically what I am getting from this is, not to trust the JSLint Razz just seems that the errors reported are all layout complaints. UGH I understand Wink thanks for the explanation

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top


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