Post by CrAzY_J on Jan 27, 2006 6:42:22 GMT -8
Code instructions:
In the code edit the colored words.
boardid = the board id which you want to display at specific times.
day = the day you want it to be displayed on.
time1 - time2 = the time you want it to be displayed on.
The times works from 0 - 23 and there is no colon between the hours and minutes.
Example of how to edit:
['general','monday','1400','1515']
So that would display the general board on monday from 2PM till 3:15PM.
If you want to display more boards at specific times you just keep adding this line:
['boardid','day','time1','time2']
All the lines which you have to edit have to have a comma at the end, except the last line
Code description: You can set the time/day on which a board will be displayed on, normally it will be hidden.
Code creator: CrAzY_J
Code placement: Main Footers
Display Boards at specific times:
<script type='text/javascript'>
/* Display Boards at Specific times
created by CrAzY_J
do not redistribute this code without the creator's permission*/
var BoardDisplay = [
['boardid','day','time1','time2'],
['boardid','day','time1','time2'],
['boardid','day','time1','time2'],
['boardid','day','time1','time2']
];
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/))
{
var weekdays = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'];
var Tr = document.body.getElementsByTagName('tr');
var D = new Date();
var d = D.getDay();
var h = D.getHours();
var m = D.getMinutes();
for( var r = 0 ; r < Tr.length ; r ++ )
{
for( var b = 0 ; b < BoardDisplay.length ; b ++ )
{
if( Tr[r].cells[1] && Tr[r].cells[1].width == '66%' && Tr[r].cells[1].className == 'windowbg2' && Tr[r].cells[1].firstChild.getElementsByTagName('a')[0].href.match( new RegExp('board='+ BoardDisplay[0] +'$','i') ) )
{
Tr[r].style.display = 'none';
for( var z = 0 ; z < weekdays.length ; z ++ )
{
if( weekdays[z] == BoardDisplay[1].toLowerCase() )
{
if( z == d )
{
var Time = h.toString() + m.toString();
if( BoardDisplay[2] < parseInt(Time) && parseInt(Time) < BoardDisplay[3] )
{
Tr[r].style.display = '';
}
}
}
}
}
}
}
}
</script>
In the code edit the colored words.
boardid = the board id which you want to display at specific times.
day = the day you want it to be displayed on.
time1 - time2 = the time you want it to be displayed on.
The times works from 0 - 23 and there is no colon between the hours and minutes.
Example of how to edit:
['general','monday','1400','1515']
So that would display the general board on monday from 2PM till 3:15PM.
If you want to display more boards at specific times you just keep adding this line:
['boardid','day','time1','time2']
All the lines which you have to edit have to have a comma at the end, except the last line
Code description: You can set the time/day on which a board will be displayed on, normally it will be hidden.
Code creator: CrAzY_J
Code placement: Main Footers
Display Boards at specific times:
<script type='text/javascript'>
/* Display Boards at Specific times
created by CrAzY_J
do not redistribute this code without the creator's permission*/
var BoardDisplay = [
['boardid','day','time1','time2'],
['boardid','day','time1','time2'],
['boardid','day','time1','time2'],
['boardid','day','time1','time2']
];
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/))
{
var weekdays = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'];
var Tr = document.body.getElementsByTagName('tr');
var D = new Date();
var d = D.getDay();
var h = D.getHours();
var m = D.getMinutes();
for( var r = 0 ; r < Tr.length ; r ++ )
{
for( var b = 0 ; b < BoardDisplay.length ; b ++ )
{
if( Tr[r].cells[1] && Tr[r].cells[1].width == '66%' && Tr[r].cells[1].className == 'windowbg2' && Tr[r].cells[1].firstChild.getElementsByTagName('a')[0].href.match( new RegExp('board='+ BoardDisplay[0] +'$','i') ) )
{
Tr[r].style.display = 'none';
for( var z = 0 ; z < weekdays.length ; z ++ )
{
if( weekdays[z] == BoardDisplay[1].toLowerCase() )
{
if( z == d )
{
var Time = h.toString() + m.toString();
if( BoardDisplay[2] < parseInt(Time) && parseInt(Time) < BoardDisplay[3] )
{
Tr[r].style.display = '';
}
}
}
}
}
}
}
}
</script>