The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Change Who Is Online "text" CSS or JavaScript code.

View previous topic View next topic Go down

Solved Change Who Is Online "text" CSS or JavaScript code.

Post by inallsorts on November 3rd 2013, 10:41 am

Greetings everyone,

Okay, so I've had multiple Issues with the Who Is Online text, of which I thought all was solved however It's not the case. I thank all that have helped with this Issue thus far.

Getting to the point, Is there a CSS or JavaScript code that will change the "Who Is Online" 'text' to something of my preference. Removing It has not been successful thus far, hence I would like to change the text. I know this Is possible for phpBB2. I'm running phpBB3.

Thanking you In advance.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by Ikerepc on November 3rd 2013, 11:29 am

Are you remove it? If yes can you give me code, for change text it is same code like for removing, with some changes.

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by inallsorts on November 3rd 2013, 11:39 am

Zyon wrote:Are you remove it? If yes can you give me code, for change text it is same code like for removing, with some changes.
Okay, this Is the JavaScript code that removed all thedetails (users online etc), and left only the Who Is Online text.

Code:


$(document).ready(function(){
$('img#i_whosonline').next('p').addClass('p_who_is_on');
$('div.h3:contains("WHO IS ONLINE?")').addClass('a_who_is_on');
$('div.h3:contains("Statistics")').addClass('a_statistiq');
$('.a_statisticq').next('.page-bottom').addClass('p_statisticue');
$('.a_statistq').next('.page-bottom').next('.page-bottom').addClass('p_statistq');
$('v').next('.page-bottom').next('.page-bottom').next('.page-bottom').addClass('p_statistici');
$('.p_statistq:eq(0)').addClass('p-bottom');
$('.p_statistq:eq(1)').addClass('p-bottom');
$('.p_statistq:eq(2)').addClass('p-bottom');
$('.p-bottom').wrapAll('<div class="p_statistici_toate">');
});

And this Is the CSS code that failed to remove It.

Code:


a[href="/viewonline"]{
display:none !important;
}

If any of the above codes (or any other code), can be altered to edit the Who Is Online text, that'll be great.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by Ikerepc on November 3rd 2013, 11:43 am

So try this code:

Code:
a[href="/viewonline"] {
  content: 'NAME HERE' !important;
}

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by inallsorts on November 3rd 2013, 12:08 pm

Zyon wrote:So try this code:

Code:
a[href="/viewonline"] {
 content: 'NAME HERE' !important;
}
Tried It, and nothing changed. Thanks for your help though.

There must be a code that'll change It. Obviously It exists (Who Is Online), so obviously It can be changed.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by Ikerepc on November 3rd 2013, 2:24 pm

I'm not shure, but try this one:

Code:
a[href="/viewonline"] {
  display: none !important;
}
a[href="/viewonline"]:after {
  content: 'TEXT HERE';
}

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by Ange Tuteur on November 3rd 2013, 2:53 pm

Hello inallsorts,

You can try this CSS to hide the old text and write new texts.
Code:
div.h3 > a[href="/viewonline"]{
letter-spacing:-6px;
color:transparent;
}
div.h3 > a[href="/viewonline"]:after{
content:"Hello world!";
letter-spacing:0px;
float:left;
color:#09c;
}
If it works, the effect should be similar to this:


EDIT:
I forgot to note that this will only display proper globally if this option is set:

Administration Panel > Users & Groups > Special Rights

User Status Display : Guests <= Is a must so view online displays as a link for All users.

Otherwise this selection is rendered useless => a[href="/viewonline"]


Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by Guest on November 3rd 2013, 5:37 pm

Code:
$(function() {
var x = $('div.h3:has("a[href="/viewonline"]")')[0];
x.innerHTML = '<a href="/viewonline>New Text Who is On</a>';
});

Guest
Guest


Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by inallsorts on November 4th 2013, 2:05 am

SethC1995 wrote:Hello inallsorts,

You can try this CSS to hide the old text and write new texts.
Code:
div.h3 > a[href="/viewonline"]{
letter-spacing:-6px;
color:transparent;
}
div.h3 > a[href="/viewonline"]:after{
content:"Hello world!";
letter-spacing:0px;
float:left;
color:#09c;
}
If it works, the effect should be similar to this:


EDIT:
I forgot to note that this will only display proper globally if this option is set:

Administration Panel > Users & Groups > Special Rights

User Status Display : Guests <= Is a must so view online displays as a link for All users.

Otherwise this selection is rendered useless => a[href="/viewonline"]

Thank you so much Seth, particularly for pointing out the "Users status display" via the ACP.

The code works perfectly Smile
A big thanks to Zyon too for all your assistance. Good work guys.

Topic solved.
/Topic.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change Who Is Online "text" CSS or JavaScript code.

Post by Sanket on November 4th 2013, 4:37 am

Topic Solved & Archived.

Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


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