The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Removing "Members Connected During Last x Hours"

4 posters

Go down

Solved Removing "Members Connected During Last x Hours"

Post by SirLaplace October 13th 2022, 7:27 am

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.


Last edited by zachwinch on October 13th 2022, 5:16 pm; edited 1 time in total
SirLaplace
SirLaplace
Forumember

Male Posts : 50
Reputation : 4
Language : Turkish, English

View user profile http://innoctem.forum.st/

Back to top Go down

Solved Re: Removing "Members Connected During Last x Hours"

Post by SLGray October 13th 2022, 7:55 am

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.


Removing "Members Connected During Last x Hours" Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 50783
Reputation : 3488
Language : English
Location : United States

View user profile https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Removing "Members Connected During Last x Hours"

Post by Razor12345 October 13th 2022, 9:38 am

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:

Removing "Members Connected During Last x Hours" Ouo35

P.S. In writing this answer, I used materials of administrator Celina
Razor12345
Razor12345
Forumember

Male Posts : 183
Reputation : 49
Language : Ukr, Rus, Eng
Location : Ukraine

View user profile https://terranova.forumotion.me

Ape, TonnyKamper, SirLaplace and كونان2000 like this post

Back to top Go down

Solved Re: Removing "Members Connected During Last x Hours"

Post by SirLaplace October 13th 2022, 5:15 pm

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:

Removing "Members Connected During Last x Hours" Ouo35

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.
SirLaplace
SirLaplace
Forumember

Male Posts : 50
Reputation : 4
Language : Turkish, English

View user profile http://innoctem.forum.st/

Back to top Go down

Solved Re: Removing "Members Connected During Last x Hours"

Post by skouliki October 13th 2022, 7:13 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 13401
Reputation : 1591
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

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