|
Reid
|
Jan 25 2010, 10:59 AM
Post #1
|
È una trappola!
- Posts:
- 6,767
- Group:
- Developer
- Member
- #223,645
- Joined:
- October 30, 2006
- I'm Browsing With
- Firefox
|
This topic has been moved from our official support board.
Originally posted by: Stefan - [CODE
-
Move 'User(s) browsing this...' to top] - Quote:
-
<script type='text/javascript'> <!-- // move 'User(s) browsing this ...' to top // code by ticlo/Stefan
// following line determines whether the active users must move to the top in a topic view // set it to // moveAtTopicView = true // to move it // moveAtTopicView = false // to keep it where it is moveAtTopicView = true
// following line determines whether the active users must move to the top in a forum view // set it to // moveAtForumView = true // to move it // moveAtForumView = false // to keep it where it is moveAtForumView = true
if ((moveAtForumView && document.location.href.match(/showforum\=/)) || (moveAtTopicView && document.location.href.match(/showtopic\=/))) { var us = null var ms = null e = document.getElementsByTagName('DIV') for (n = 0; n < e.length; n++) { if (e[n].className == 'tableborder') { e2 = e[n].getElementsByTagName('DIV') for (i = 0; i < e2.length; i++) { if ((e2.className == 'activeuserstrip' && e2.innerHTML.match(/User\(s\) are reading this topic/)) || (e2.className == 'darkrow2' && e2.innerHTML.match(/User\(s\) are browsing this forum/))) { if (!us) { us = e2.cloneNode(true) e2.style.display = 'none' }} else if (e2.className == 'row2' && e2.innerHTML.match(/Members:/)) { if (!ms) { ms = e2.cloneNode(true) e2.style.display = 'none' }}} if (us || ms) { tbs = e[n].getElementsByTagName('TABLE') if (us) tbs[0].parentNode.insertBefore(us, tbs[0]) if (ms) tbs[0].parentNode.insertBefore(ms, tbs[0]) us = null ms = null }}}}
// --> </script>
This code moves the bars with User(s) browsing this topic/forum to the top. Put it in Admin CP->Board Wrappers->Header & Body, after <% BOARD %>
The green line determines whether the active users must move to the top in a topic view. Set it to
- Code:
-
moveAtTopicView = true
to move it to the top, or to
- Code:
-
moveAtTopicView = false
to keep it where it is
The red line determines whether the active users must move to the top in a forum view. Set it to
- Code:
-
moveAtForumView = true
to move it to the top, or to
- Code:
-
moveAtForumView = false
to keep it where it is
|