SMF For Free Support Forum

SMF For Free Support => SMF For Free Codes and Support => Topic started by: Halius on July 26, 2011, 12:50:48 am

Title: Remove post count from display on user posts
Post by: Halius on July 26, 2011, 12:50:48 am
Does anyone know where I can find a code to remove the post count from display on user posts? Thank you for any help. : )
Title: Re: Remove post count from display on user posts
Post by: Seldom Fail on July 27, 2011, 04:21:52 pm
There isn't a code to do that here yet.

Though I don't see why you would want to hide post count?
Title: Re: Remove post count from display on user posts
Post by: Halius on July 27, 2011, 11:05:17 pm
I have the money code set up, but I don't want to use the post count for money, I'd just like staff members to edit profiles to give people money, so, I have on the profile saying:

Post: 16

Points: 16

The posts part is inaccurate/redundant

I did find this: http://www.simplemachines.org/community/index.php?topic=265022.0 but I have nooo clue how to edit those kind of files, or even if we can on smf for free.
Title: Re: Remove post count from display on user posts
Post by: simply sibyl on July 28, 2011, 10:31:49 am
There is no way you can edit those files nor use that Mod
Title: Re: Remove post count from display on user posts
Post by: Halius on July 28, 2011, 03:23:50 pm
Is there a way to nix the money code and make the

Posts: #

say

Points: #

instead?
Title: Re: Remove post count from display on user posts
Post by: Agent Moose on July 28, 2011, 09:54:22 pm
Can you post the money code you are using?  That way I can just edit that code instead of making a whole new one.
Title: Re: Remove post count from display on user posts
Post by: Halius on July 29, 2011, 12:14:02 am
Code: [Select]
<script>
function smc_money_code(name,sign,amount){
//Created by Agent Moose at smcodes.smfforfree3.com
c = document.getElementsByTagName("div");
for(v=0;v<c.length;v++){
if(c[v].className=="smalltext" && c[v].innerHTML.match(/Posts: (\d+)/)){
var total = amount * RegExp.$1;
c[v].innerHTML+="<br />" + name+": " + sign + total;
};};}
smc_money_code("Points","","1")
</script>

Is there a way to edit this other code of yours and combine them to have a "reason for editing points" (or in this case, indirectly the points count)?

Code: [Select]
<script type="text/javascript">
var i = ""; var r = ""; var b = "";
//Created by Agent Moose (revolutionx.smfforfree3.com)
$("td[width='16%'] b a").each(function(){
if(this.href.match(/u=(.*)/i)){
i = RegExp.$1;
r = $(this).parent().next().find("a[href*='sa=applaud']").attr("href");
b = $(this).parent().next().find("a[href*='sa=smite']").attr("href");
$(this).parent().next().find("a[href*='sa=applaud']").each(function(){
this.href = "javascript:void(0);";
this.onclick = function(){ Red(); };
});
$(this).parent().next().find("a[href*='sa=smite']").each(function(){
this.href = "javascript:void(0);";
this.onclick = function(){ Blue(); };
});};});
function Red(){ var x = prompt("Reason:",""); if(x){ $.post(smf_scripturl + "?action=comment&sa=add2",{comment: "[b][color=green]Karma Added!  Reason:[/color][/b]\n" + x, userid: i}); alert("Reason Posted!"); window.location = r; }else if(!x){ alert("You must enter a reason!"); };};
function Blue(){ var v = prompt("Reason:",""); if(v){ $.post(smf_scripturl + "?action=comment&sa=add2",{comment: "[b][color=red]Karma Subtracted!  Reason:[/color][/b]\n" + v, userid: i}); alert("Reason Posted!"); window.location = b; }else if(!v){ alert("You must enter a reason!"); };};
</script>

Your codes are just amazing! And thank you for the help!