SMF For Free Support Forum
Signup For Free Forum
December 20, 2014, 11:52:21 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register Chat  

Pages: [1]
  Print  
Author Topic: Change "NUMBER comment" Text  (Read 1061 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 836


Do not PM me for Code Support or Request


View Profile
Total Badges: 25
Badges: (View All)
Poll Voter Level 5 Seventh year Anniversary Sixth year Anniversary Arcade Highscore
« on: June 19, 2009, 10:47:45 am »

Footers:
Code:
<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
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 Smiley

To change more comment numbers, add more of these lines:
Code:
EZchange("TOPIC NUMBER","COMMENTS");

Enjoy Smiley
Logged

Check out Revolution X's Brand new Code Index!
мσנσвσנσ82
SMF For Free Sr. Member
*
Offline Offline

Posts: 310



View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« Reply #1 on: June 19, 2009, 06:45:17 pm »

Thanks.
Read my request and got it done straight away.
Good work Moose! :thumb:
Logged





Pages: [1]
  Print  
 
Jump to:  



Powered by SMF 1.1.20 | SMF © 2013, Simple Machines