Coding-Spot

You are not connected. Please login or register

 
 

changing the text in who's online

Message (Page 1 of 1)


 
Advance Member

Posted on Fri Aug 02, 2013 10:03 pm

 
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



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:12 am

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



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



 
Advance Member

Posted on Sat Aug 03, 2013 11:16 am

 
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



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:23 am

 
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



 
Advance Member

Posted on Sat Aug 03, 2013 11:28 am

 
it's still the same



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:28 am

 
Oh phpbb2, forum url? Happy 



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



 
Advance Member

Posted on Sat Aug 03, 2013 11:29 am

 
http://reckless3graphics.englishboards.com this one Happy 



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:32 am

 
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 Sat Aug 03, 2013 11:48 am; edited 2 times in total



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



 
Advance Member

Posted on Sat Aug 03, 2013 11:33 am

 
still the same :/



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:34 am

 
Try to copy the code again, i edit it.



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



 
Advance Member

Posted on Sat Aug 03, 2013 11:35 am

 
does nothing different



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:36 am

 
Edit it again, try to copy it again.



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



 
Advance Member

Posted on Sat Aug 03, 2013 11:39 am

 
still doesn't work o.O



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:49 am

 
1 more, copy again. Laugh 



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



 
Advance Member

Posted on Sat Aug 03, 2013 11:51 am

 
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



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 11:53 am

 
Can't, sorry. Sad 



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



 
Advance Member

Posted on Sat Aug 03, 2013 12:00 pm

 
damn.. but anyway, thanks for this! i'm really glad to have you back :D



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 12:03 pm

 
Welcome. So, is this solve now? Happy 



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



 
Advance Member

Posted on Sat Aug 03, 2013 1:46 pm

 
yeah it's solved, thanks Happy 



View user profile



 
Administrator
Administrator

Posted on Sat Aug 03, 2013 2:58 pm

 
~ Since the topic is now solve. Locked



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


#21

Sponsored content


 

Posted Today at 2:33 pm

 





Message (Page 1 of 1)

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