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.

Script Needed For Removing Statistics

View previous topic View next topic Go down

Script Needed For Removing Statistics

Post by Lee Tamotsu on August 29th 2011, 11:00 pm

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!

Lee Tamotsu
Forumember

Male Posts : 219
Reputation : 1
Language : English

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by iJerick on August 29th 2011, 11:27 pm

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
Forumember

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Lee Tamotsu on August 29th 2011, 11:36 pm

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!

Lee Tamotsu
Forumember

Male Posts : 219
Reputation : 1
Language : English

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Jophy on August 30th 2011, 5:49 am

Is this solved?

Jophy
ForumGuru

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Lee Tamotsu on August 30th 2011, 12:31 pm

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.

Lee Tamotsu
Forumember

Male Posts : 219
Reputation : 1
Language : English

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Guest on August 30th 2011, 7:30 pm

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 August 31st 2011, 1:04 am; edited 1 time in total

Guest
Guest


Back to top Go down

Re: Script Needed For Removing Statistics

Post by Lee Tamotsu on August 30th 2011, 8:39 pm

I tried that, but it didn't do anything.

Lee Tamotsu
Forumember

Male Posts : 219
Reputation : 1
Language : English

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Guest on August 31st 2011, 1:05 am

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

Try it again, it should work now...

Guest
Guest


Back to top Go down

Re: Script Needed For Removing Statistics

Post by Lee Tamotsu on August 31st 2011, 1:10 am

Awesome, it worked! Thanks a ton.

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

Lee Tamotsu
Forumember

Male Posts : 219
Reputation : 1
Language : English

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Guest on August 31st 2011, 1:17 am

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

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

Guest
Guest


Back to top Go down

Re: Script Needed For Removing Statistics

Post by Lee Tamotsu on August 31st 2011, 10:37 pm

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.

Lee Tamotsu
Forumember

Male Posts : 219
Reputation : 1
Language : English

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

Back to top Go down

Re: Script Needed For Removing Statistics

Post by Guest on August 31st 2011, 11:44 pm

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();

Guest
Guest


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