Author Topic: Change "NUMBER comment" Text  (Read 1352 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: 31
    Badges: (View All)
    Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Linux User
Change "NUMBER comment" Text
« on: June 19, 2009, 09: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, 05: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
7213 Views
Last post February 02, 2010, 08:22:56 am
by Agent Moose
6 Replies
2076 Views
Last post January 26, 2009, 03:25:41 pm
by Agent Moose
3 Replies
1513 Views
Last post July 27, 2007, 04:10:31 pm
by doggiedoo86
2 Replies
1482 Views
Last post June 21, 2009, 07:58:11 pm
by Andrew
3 Replies
1357 Views
Last post August 31, 2009, 11:32:55 pm
by Jish