Advertise Here

Author Topic: Change "NUMBER comment" Text  (Read 1856 times)

0 Members and 1 Guest are viewing this topic.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Change "NUMBER comment" Text
« on: June 19, 2009, 10:47:45 am »
Footers:
Code: [Select]
<script type="text/javascript">
function EZchange(Topic,Comm){
var a = document.links;
//Created by Agent Moose (revolutionx.smfforfree3.com)
for(x=0;x<a.length;x++){
if(a[x].href.match("topic," + Topic + ".0") && a[x].innerHTML.match(/([\d,]+) comment/i)){
var Cmnts = Math.floor(parseInt(RegExp.$1) + parseInt(Comm));
a[x].innerHTML = Cmnts + " comments";
};};};
EZchange("TOPIC NUMBER","COMMENTS");
</script>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,736.0.html

This code changes how much comments it says a topic has if it is on the ezportal.

TOPIC NUMBER = The ID/Number of the topic:
Quote
http://XXXXXXX.smfforfreeX.com/index.php/topic,736.0.html
COMMENTS = The number the comments will change to.  If you have one comment, and you change it to say 20, the number will be 21 :)

To change more comment numbers, add more of these lines:
Code: [Select]
EZchange("TOPIC NUMBER","COMMENTS");
Enjoy :)
Check out Revolution X's Brand new Code Index!

Offline мσנσвσנσ82

  • SMF For Free Sr. Member
  • *
  • Posts: 310
    • View Profile
    • Darkilscape

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Change "NUMBER comment" Text
« Reply #1 on: June 19, 2009, 06:45:17 pm »
Thanks.
Read my request and got it done straight away.
Good work Moose! :thumb:



 

Related Topics

  Subject / Started by Replies Last post
35 Replies
9555 Views
Last post February 02, 2010, 08:22:56 am
by Agent Moose
6 Replies
2759 Views
Last post January 26, 2009, 03:25:41 pm
by Agent Moose
3 Replies
3231 Views
Last post July 27, 2007, 05:10:31 pm
by doggiedoo86
2 Replies
2126 Views
Last post June 21, 2009, 08:58:11 pm
by Andrew
3 Replies
2216 Views
Last post September 01, 2009, 12:32:55 am
by Jish