Coding-Spot

You are not connected. Please login or register

Go to page : 1, 2  Next

 
 
 

changing the text in who's online

Message (Page 1 of 2)

avatar
 
Advance Member

Posted on August 3rd 2013, 5:03 am

 
hi mark! glad you're back and since nobody is answering on fm;

is there any way to change the text in the who's online?
well if i explain it a bit more, i'm just trying to modify the users online. and in the templates there's only a 'premade' code for the text. and i'm wondering if there's a way to add my own text instead of the Registered Users: and then modify the links myself?



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:12 pm

 
You want to change the 'Registered Users' text on the statistics? Am i right? Happy



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:16 pm

 
yeah, i want it to be let's say
X members, X hidden, X guests

and down here userlinks of the members that are online that i would edit to match the skin
instead of how it is now Happy 
is that possible?



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:23 pm

 
Add this to your Javascript Management (all page):
Code:
function changeText(word, replacement) {
    for (var name in word) {
        document.getElementById('onlinelist').innerHTML = document.getElementById('onlinelist').innerHTML.replace(RegExp(name, 'g'), word[name]);
    }
}

$(window).load(function () {
    changeText({
        'In total there is ': ' ',
        'Registered Users:': ' ',
        'user online ::': ' ',
    });
});



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:28 pm

 
it's still the same



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:28 pm

 
Oh phpbb2, forum url? Happy 



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:29 pm

 



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:32 pm

 
Use this one instead:
Code:
function changeText(word, replacement) {
    for (var name in word) {
        document.getElementById('page-body').innerHTML = document.getElementById('page-body').innerHTML.replace(RegExp(name, 'g'), word[name]);
    }
}

$(window).load(function () {
    changeText({
        'In total there is ': ' ',
        'In total there are ': ' ',
        'Registered Users:': ' ',
        'user online ::': 'people are online (in the past 15 minutes):',
        'users online ::': 'people are online (in the past 15 minutes):',
    });
});



Last edited by Mark on August 3rd 2013, 6:48 pm; edited 2 times in total



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:33 pm

 
still the same :/



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:34 pm

 
Try to copy the code again, i edit it.



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:35 pm

 
does nothing different



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:36 pm

 
Edit it again, try to copy it again.



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:39 pm

 
still doesn't work o.O



View user profile


avatar
 
Administrator
Administrator

Posted on August 3rd 2013, 6:49 pm

 
1 more, copy again. Laugh 



View user profile http://coding-spot.darkbb.com


avatar
 
Advance Member

Posted on August 3rd 2013, 6:51 pm

 
okay now it's like here :D
i'll edit it if i'll want something removed or added
but now i still want the list of the members edited. like the font family and stuff Laugh is there a way to do that?



View user profile


#16

Sponsored content


 

Posted

 





Message (Page 1 of 2)

Permissions in this forum:
You cannot reply to topics in this forum

In total there is 0 user online :: 0 Registered, 0 Hidden and 0 Guests

Users browsing this forum: None