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)

#1

novacane.

novacane.
 
Advance Member

Posted 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?





#2

Mark

Mark
 
Administrator
Administrator

Posted August 3rd 2013, 6:12 pm

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



https://coding-spot.darkbb.com


#3

novacane.

novacane.
 
Advance Member

Posted 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?





#4

Mark

Mark
 
Administrator
Administrator

Posted 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 ::': ' ',
    });
});



https://coding-spot.darkbb.com


#5

novacane.

novacane.
 
Advance Member

Posted August 3rd 2013, 6:28 pm

 
it's still the same





#6

Mark

Mark
 
Administrator
Administrator

Posted August 3rd 2013, 6:28 pm

 
Oh phpbb2, forum url? Happy 



https://coding-spot.darkbb.com


#7

novacane.

novacane.
 
Advance Member

Posted August 3rd 2013, 6:29 pm

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





#8

Mark

Mark
 
Administrator
Administrator

Posted 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



https://coding-spot.darkbb.com


#9

novacane.

novacane.
 
Advance Member

Posted August 3rd 2013, 6:33 pm

 
still the same :/





#10

Mark

Mark
 
Administrator
Administrator

Posted August 3rd 2013, 6:34 pm

 
Try to copy the code again, i edit it.



https://coding-spot.darkbb.com


#11

novacane.

novacane.
 
Advance Member

Posted August 3rd 2013, 6:35 pm

 
does nothing different





#12

Mark

Mark
 
Administrator
Administrator

Posted August 3rd 2013, 6:36 pm

 
Edit it again, try to copy it again.



https://coding-spot.darkbb.com


#13

novacane.

novacane.
 
Advance Member

Posted August 3rd 2013, 6:39 pm

 
still doesn't work o.O





#14

Mark

Mark
 
Administrator
Administrator

Posted August 3rd 2013, 6:49 pm

 
1 more, copy again. Laugh 



https://coding-spot.darkbb.com


#15

novacane.

novacane.
 
Advance Member

Posted 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?





#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