vForums Support > vForums :: Support :: > Post Variables

Post Variables - Posted By dog199200 (dog199200) on 22nd Feb 08 at 10:39pm
Um i hope here works, but umm what are the posting variables. I'm converting and fixing up my Rep Point code and because the forums don't have karma i'm going to run it off of the post count.

Re: Post Variables - Posted By Michael (wrighty) on 22nd Feb 08 at 11:29pm
What do you mean posting variables? {Unsure}

Re: Post Variables - Posted By dog199200 (dog199200) on 23rd Feb 08 at 1:21am
umm well like what this forum uses for registering the post count..sorry i'm not good with explaining. Here i'll post my code and then try to explain after that:

Code:
 
  1. <script type="text/javascript">
  2. <!--/*Rep Points System V 1.2
  3. Created by dog199200 at yahoo.com, A.K.A. Dwight
  4. Do not edit or redistribute without permission
  5. THIS HEADER MUST REMAIN INTACT!!!*/
  6.  
  7. /*Only Edit Bellow*/
  8.  
  9. var postName = "Rep Points:"; // Name of Rep Points
  10. var perPost = "3" // Amount Of Rep Points Per Post
  11.  
  12. /*Don't edit bellow*/
  13.  
  14. var td = document.getElementsByTagName('td');
  15. for ( e=0;e<td.length;e++ ) {
  16. if ( td[e].width == "20%" && td[e].innerHTML.match (/Posts/)){
  17. var postAmount = td[e].innerHTML.match(/Post: (-?[\d,]+)(<|$)/)? parseInt(RegExp.$1.replace(/,/, '')) : 0;
  18. var postMath = parseInt (postAmount) *+perPost
  19. td [e].innerHTML += "<br>"+postName+"</i></b> "+postMath;
  20. }
  21. }
  22. //-->
  23. </script>
 


ok how this code works is it runs off of Karma and multiplies that and makes it into a Rep Point system, but since this forum system doesn't have karma i want to set it up to run off of the post count. So what are the tags or commands or the variables to call the post count and posting protocol.

(Edit: I have tried to edit it by changing where it said karma and changed it to post but that don't work lol)


Edit 2: Ok also can you please tell me what i need to add so i can make it so they can add it to there mini profile template so they can put it where ever i look ok the staff has member rank code and seen what i think does it:

Code:
 
  1. <script type="text/javascript">
  2. assign_rep_point('{display_name}', '{posts}');
  3. </script>
 


and

Code:
 
  1. function assign_rep_point(display_name, posts) {
  2. if(!display_name.match(/group(0|$)/i)) {
  3. posts = parseInt(posts.replace(/,/g, ''));
  4. }
  5. document.write(post_count);
  6. }
  7. }
  8. //-->
  9. </script>
 


sorry i edited them...um this might just end up needing to be moved to code support or something, because i'm starting to move away from the topic at hand... well ways..please can i get the info i need so i can convert it over....

Re: Post Variables - Posted By Ross (admin) on 23rd Feb 08 at 10:15am
Could this not just be done using the built in "Additional Profile Options" feature?

Re: Post Variables - Posted By dog199200 (dog199200) on 23rd Feb 08 at 6:34pm
{Confused} I didn't think about that....but i was also thinking about adding a lot more to it thats why i was going to do it in a code,,,,


Edit: ok i got to thinking that running it off the posts wouldn';t work, i need to make like a karma setup. with the ability to exalt, or Deny the person Rep Points. Would it be possible to do this using the forum system, because i would be making a full on karma system.