Overall_Headerda Rastgele Resim
Tarih: 08.05.2006, 23:03
[syntax="php"]##############################################################
## MOD Title: Random Picture in header
## MOD Author: Steven A <bno2000@hotmail.com >
## MOD Description: Add a random picture in the header
## MOD Version: 1.04
## Installation Level: Easy
## Installation Time: 2 minutes
## Files to Edit: templates/xxx/overall_header.tpl
## Included Files: n/a
########################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Author Notes:
## Add a random picture on every page. This mod was made in conjunction with subSilver.
##
## You must change the number in "imgCt = 1" if you have a different amount of images
##
## When this is done, create a folder in php-root/images and name it random.
## Then add the pictures in here, numbering them from 1.gif to whatever you like
##
## DEMO:http://members.lycos.co.uk/theshadowgelert/phpBB2/
## (random smilie)
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
templates/xxx/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<SCRIPT><!-- Hide script from older browsers
imgCt = 1
function choosePic() {
if (document.images) {
thisImg = Math.floor((Math.random() * imgCt)) + 1
document.randomImg.src = "images/random/" + thisImg + ".gif"
}
}
// stop hiding script -->
</SCRIPT>
#
#-----[ FIND ]------------------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />
#
#-----[ REPLACE WITH ]------------------------------------------
#
<body onLoad="choosePic()" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />
#
#-----[ FIND ]------------------------------------------
#
</table></td>
</tr>
</table>
<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
<span class="gensmall">Random smilie: <IMG SRC="images/random/1.gif" NAME="randomImg"></span>
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM
[/syntax]
## MOD Title: Random Picture in header
## MOD Author: Steven A <bno2000@hotmail.com >
## MOD Description: Add a random picture in the header
## MOD Version: 1.04
## Installation Level: Easy
## Installation Time: 2 minutes
## Files to Edit: templates/xxx/overall_header.tpl
## Included Files: n/a
########################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Author Notes:
## Add a random picture on every page. This mod was made in conjunction with subSilver.
##
## You must change the number in "imgCt = 1" if you have a different amount of images
##
## When this is done, create a folder in php-root/images and name it random.
## Then add the pictures in here, numbering them from 1.gif to whatever you like
##
## DEMO:http://members.lycos.co.uk/theshadowgelert/phpBB2/
## (random smilie)
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
templates/xxx/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<SCRIPT><!-- Hide script from older browsers
imgCt = 1
function choosePic() {
if (document.images) {
thisImg = Math.floor((Math.random() * imgCt)) + 1
document.randomImg.src = "images/random/" + thisImg + ".gif"
}
}
// stop hiding script -->
</SCRIPT>
#
#-----[ FIND ]------------------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />
#
#-----[ REPLACE WITH ]------------------------------------------
#
<body onLoad="choosePic()" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />
#
#-----[ FIND ]------------------------------------------
#
</table></td>
</tr>
</table>
<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
<span class="gensmall">Random smilie: <IMG SRC="images/random/1.gif" NAME="randomImg"></span>
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM
[/syntax]