Removing "Members Connected During Last x Hours"
4 posters
Page 1 of 1
Removing "Members Connected During Last x Hours"
Hello, I'm using ModernBB in my forum.
As you all know there is this information on the bottom of the forum that lists all the members connected during last x hours.
I'd really like to remove the phrase "Members Connected During Last x Hours" from there but keep the member list anyway, so that I can write a customised title in there instead.
Same goes with the "registered online users" info. I'm really not sure if it's possible but I wanted to check with here anyway, maybe someone found a work around or something.
Thanks in advance.
As you all know there is this information on the bottom of the forum that lists all the members connected during last x hours.
I'd really like to remove the phrase "Members Connected During Last x Hours" from there but keep the member list anyway, so that I can write a customised title in there instead.
Same goes with the "registered online users" info. I'm really not sure if it's possible but I wanted to check with here anyway, maybe someone found a work around or something.
Thanks in advance.
Last edited by zachwinch on October 13th 2022, 5:16 pm; edited 1 time in total
Re: Removing "Members Connected During Last x Hours"
I believe you can edit the text in the templates.
If I remember correctly, it should be in the one for the homepage/index in general.
If I remember correctly, it should be in the one for the homepage/index in general.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Removing "Members Connected During Last x Hours"
Good afternoon!
AP - Display - Templates - General - index_body
Find (this is field "Registered Users"):
Replace by this:
New text of value users - is the new text that will be displayed.
Find (this is field "Members connected during last 24 hours"):
Replace by this:
Save - Publish
Then AP - Modules - HTML & JAVASCRIPT - Javascript codes management - Create a new Javascript
Title: Anyone
Placement: In the home page
Javascript Code:
12345678910 - is the new text that will be displayed.
Submit
Result:
P.S. In writing this answer, I used materials of administrator Celina
AP - Display - Templates - General - index_body
Find (this is field "Registered Users"):
- Code:
{LOGGED_IN_USER_LIST}
Replace by this:
- Code:
<span id="liul">{LOGGED_IN_USER_LIST}</span>
<script type="text/javascript">document.getElementById('liul').innerHTML=document.getElementById('liul').innerHTML.replace(/Registered Users:/,"New text of value users");</script>
New text of value users - is the new text that will be displayed.
Find (this is field "Members connected during last 24 hours"):
- Code:
{L_CONNECTED_MEMBERS}
Replace by this:
- Code:
<span id="lcm">{L_CONNECTED_MEMBERS}</span>
Save - Publish
Then AP - Modules - HTML & JAVASCRIPT - Javascript codes management - Create a new Javascript
Title: Anyone
Placement: In the home page
Javascript Code:
- Code:
jQuery(document).ready(function(){
var el1 = $('#lcm');
el1.html(el1.html().replace('Members connected during last 24 hours :', '12345678910'));
});
12345678910 - is the new text that will be displayed.
Submit
Result:
P.S. In writing this answer, I used materials of administrator Celina
Razor12345- Support Moderator
- Posts : 1603
Reputation : 271
Language : Ukr, Rus, Eng
Location : Ukraine
Ape, sivastar, TonnyKamper, SirLaplace and كونان2000 like this post
Re: Removing "Members Connected During Last x Hours"
SLGray wrote:I believe you can edit the text in the templates.
If I remember correctly, it should be in the one for the homepage/index in general.
As the area only gave {LOGGED_IN_USER_LIST} and {L_CONNECTED_MEMBERS} but not a text indicator written before, I wasn't able to simply delete the text part and define my own without javascript.
Razor12345 wrote:Good afternoon!
AP - Display - Templates - General - index_body
Find (this is field "Registered Users"):
- Code:
{LOGGED_IN_USER_LIST}
Replace by this:
- Code:
<span id="liul">{LOGGED_IN_USER_LIST}</span>
<script type="text/javascript">document.getElementById('liul').innerHTML=document.getElementById('liul').innerHTML.replace(/Registered Users:/,"New text of value users");</script>
New text of value users - is the new text that will be displayed.
Find (this is field "Members connected during last 24 hours"):
- Code:
{L_CONNECTED_MEMBERS}
Replace by this:
- Code:
<span id="lcm">{L_CONNECTED_MEMBERS}</span>
Save - Publish
Then AP - Modules - HTML & JAVASCRIPT - Javascript codes management - Create a new Javascript
Title: Anyone
Placement: In the home page
Javascript Code:
- Code:
jQuery(document).ready(function(){
var el1 = $('#lcm');
el1.html(el1.html().replace('Members connected during last 24 hours :', '12345678910'));
});
12345678910 - is the new text that will be displayed.
Submit
Result:
P.S. In writing this answer, I used materials of administrator Celina
But this one worked like a charm! Just the way I wanted. Thanks everyone, including Celina.
This problem is officially solved.
Note: (For those who might be looking this code in the future) Since my forum was not in English language, I had to rephrase the areas like "Members connected during last 24 hours :" in the forum language, as written exactly in the forum. If the code can't select the words, it's not able to replace.
Thanks again, everyone.
Re: Removing "Members Connected During Last x Hours"
Problem solved & topic archived.
|
Similar topics
» Members connected in last 24 hours
» Members connected during last 12 hours
» How to add members connected last - hours?
» Members connected during last 24 hours
» How can I have the members connected in chatbox while they are connected in forum?
» Members connected during last 12 hours
» How to add members connected last - hours?
» Members connected during last 24 hours
» How can I have the members connected in chatbox while they are connected in forum?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum