| Center the board statistics |
| Posted: May 26 2004, 04:07 PM Forum Codes & Modifications
View full topic |
This code centers the contents of one or more elements of the board statistics section on the index page.
- Quote:
-
<script type='text/javascript'> <!-- // center board statistics // code by ticlo
statAlignCenter= new Array()
statAlignCenter['maintitle'] = 1 statAlignCenter['pformstrip'] = 1 statAlignCenter['row2'] = 1 statAlignCenter['row4'] = 1
e = document.getElementsByTagName('DIV') for (n = 0; n < e.length; n++) { if (e[n].className == 'maintitle' && e[n].innerHTML == 'Board Statistics') { if (statAlignCenter['maintitle']) e[n].style.textAlign='center' tbs = e[n].parentNode.getElementsByTagName('TABLE') if (tbs.length) { tbl = tbs[0] tds = tbl.getElementsByTagName('TD') for (i = 0; i < tds.length; i++) { if (statAlignCenter[tds.className]) tds.style.textAlign = 'center' }} break }} //--> </script>
Put this code after <% STATS %> in Admin CP->Board Wrappers->Header & Body
- Remove the orange line to keep the align setting defined in your CSS (at .maintitle{...} )for the 'Board Statistics' header. Leave it where it is to center the header
- Remove the blue line to keep the align setting defined in your CSS (at .pformstrip{...} ) for the statistics sub-section headers ('# user(s) active in the past # minutes', 'Today's Birthdays', etc). Leave it where it is to center the header.
- Remove the green line to keep the align setting defined in your CSS (at .row2{...} ) for the icons on the left hand side. Leave it where it is to center the icons.
I know that you can change the alignment by adding <center> & </center> tags in the image settings, but without this line, the code isn't complete.
- Remove the red line to keep the align setting defined in your CSS (at .row4{...} ) for the actual statistics -- the online user list , the birthdays, etc. Keep it where it is to center the stats
|
| Male or Female |
| Posted: May 20 2004, 04:23 PM Forum Community Chat
View full topic |
| Male here |
| Age of You |
| Posted: May 19 2004, 05:41 PM Forum Community Chat
View full topic |
| 24 next saturday |
| Hey, it's me! |
| Posted: May 18 2004, 07:32 PM Forum This is ...
View full topic |
Somewhere in my early IF days, I registered here.... And then forgot about it completely :S Now, exactly 6 months later, I tried to register again, but I couldn't, because my name was taken :o By me!!! :huh:
Well, whatever...
Anyways, I'm ticlo, you might know me from IF support. That code guy...
A big hello to you all! B) |