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.

Script Needed For Removing Statistics

3 posters

Go down

Script Needed For Removing Statistics  Empty Script Needed For Removing Statistics

Post by Lee Tamotsu Mon 29 Aug 2011 - 23:00

Hi I was wondering if there was a CSS script to remove both

Most users ever online was __ on _____

And

Our users have posted a total of ___ messages
We have __ registered users
The newest registered user is _____7

Also if there is a way to remove the statistics link from the bottom of the forum, that would be great to. As we only have it set for Admins to view, but members can still see and click on the link. Of course they can't enter it, but I'd rather have options not available to them, not shown.

Thanks!
avatar
Lee Tamotsu
Forumember

Male Posts : 222
Reputation : 1
Language : English

http://avatarrp.aforumfree.com/index.htm

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by iJerick Mon 29 Aug 2011 - 23:27

Since you are using phpBB2 you can easily remove this by template.

This one can't be remove by CSS, it should be done on template or by javascript.
Most users ever online was __ on _____

and here is the CSS for
Our users have posted a total of ___ messages
We have __ registered users
The newest registered user is _____7

Code:

.page-bottom{
display:none;
}
or better remove this by templates!
iJerick
iJerick
Forumember

Male Posts : 98
Reputation : 1
Language : HTML, JAVASCRIPT, CSS and ENGLISH
Location : Philippines

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Lee Tamotsu Mon 29 Aug 2011 - 23:36

Nice, the code you provided worked. Thank you!

By the way I'm on phpbb3. So if I was to do it in Javascript, what would it be called. Like the bottom statistics information is called .page-bottom.

Thanks for the great help so far!
avatar
Lee Tamotsu
Forumember

Male Posts : 222
Reputation : 1
Language : English

http://avatarrp.aforumfree.com/index.htm

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Jophy Tue 30 Aug 2011 - 5:49

Is this solved?
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Lee Tamotsu Tue 30 Aug 2011 - 12:31

No, not yet. Partially solved, but I was still wondering how I can go about removing this part.

Most users ever online was _ on ___

And or the Statistics link, which is at the bottom of the forum. iJerick, said that I needed to probably use Javascript to remove it. Is there a link with Javascript commands? I know there is a tutorial for different phpbb3 CSS commands.
avatar
Lee Tamotsu
Forumember

Male Posts : 222
Reputation : 1
Language : English

http://avatarrp.aforumfree.com/index.htm

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Guest Tue 30 Aug 2011 - 19:30

You can remove that particular line in phpBB3 by placing the following script in your Homepage Message:

Code:
<script type="text/javascript">
jQuery(function(){
    var x=document.getElementById('i_whosonline').nextSibling;
    x.removeChild(x.childNodes[6]);
    x.removeChild(x.childNodes[5]);
    x.removeChild(x.childNodes[4]);
    x.removeChild(x.childNodes[3]);
});
</script>


Last edited by dion on Wed 31 Aug 2011 - 1:04; edited 1 time in total
avatar
Guest
Guest


Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Lee Tamotsu Tue 30 Aug 2011 - 20:39

I tried that, but it didn't do anything.
avatar
Lee Tamotsu
Forumember

Male Posts : 222
Reputation : 1
Language : English

http://avatarrp.aforumfree.com/index.htm

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Guest Wed 31 Aug 2011 - 1:05

For some reason the script was missing a character. I edited my post to revise the script.

Try it again, it should work now...
avatar
Guest
Guest


Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Lee Tamotsu Wed 31 Aug 2011 - 1:10

Awesome, it worked! Thanks a ton.

Is it possible to also remove the Statistics link at the bottom using the homepage announcement and coding?
avatar
Lee Tamotsu
Forumember

Male Posts : 222
Reputation : 1
Language : English

http://avatarrp.aforumfree.com/index.htm

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Guest Wed 31 Aug 2011 - 1:17

Add this line after the last "removeChild" line in the above script:

Code:
jQuery(jQuery(p.page-bottom)[0].previousSibling).remove();
avatar
Guest
Guest


Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Lee Tamotsu Wed 31 Aug 2011 - 22:37

Is there anything that I should add or remove to that coding? I tried it a few different ways (in the way that you told me), but it didn't work.
avatar
Lee Tamotsu
Forumember

Male Posts : 222
Reputation : 1
Language : English

http://avatarrp.aforumfree.com/index.htm

Back to top Go down

Script Needed For Removing Statistics  Empty Re: Script Needed For Removing Statistics

Post by Guest Wed 31 Aug 2011 - 23:44

You should add the single-quote characters that were stripped from the line above. You know, I'm really getting tired of all the bugs with single and double-quote characters here (backslashes too, but that's for another topic). Anyway...I hardcoded the single-quotes using HTML character codes, so they will now show up regardless of what wrong things the eToxic techs decide to do next with single and double-quotes. Add this line as I described above:

Code:
jQuery(jQuery('p.page-bottom')[0].previousSibling).remove();
avatar
Guest
Guest


Back to top Go down

Back to top

- Similar topics

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