oh ok sorry
2 2005-02-12 00:07
Re: Top Bar (9 replies, posted in PunBB 1.2 troubleshooting)
Hi Connor
If you get a chance to take a look at www.vroz.net could you tell me if the way we hacked the header.php file and added the style/include files looks ok ? What I like about it is that it still validates as XHTML strict and the logo repeating helps in all size screen resolutions. It might help someone else trying to make a quick change to personalise punBB for a site look and feel without affecting the accessibility ?
STEP 1 - LOGO / HEADER
First we created a logo 756 pixels wide to reflect the look we were after, and uploaded into the img directory.
STEO 2 MODIFY HEADER.php
Then we added code in header.php in the site root between the
<title><?php echo $page_title ?></title> and <link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" /> :
ie :
<title><?php echo $page_title ?></title>
<script type="text/javascript">
<!--
//ADDED: Feb. 10, 2005
//Small if statement to determine if banner background repeats (on displays 1024x768 or larger)
var X = parseInt(screen.availWidth);
if (X < 1024)
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"style/imports/header_small.css\" />\n");
else
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"style/imports/header_large.css\" />\n");
//-->
</script>
<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
STEP 3 - create MULTI-RESOLUTION .CSS
Then we created two files and uploaded to the /style/imports/ directory
header_small.css contains :
/** class that displays repeating banner in header.php- added: Feb. 10, 2005 **/
#hdr_new
{
width: 100%;
height: 137px;
background-image: url(../../img/logo.jpg);
background-repeat: no-repeat;
}
and header_large.css contains :
/** class that displays repeating banner in header.php- added: Feb. 10, 2005 **/
#hdr_new
{
width: 100%;
height: 137px;
background-image: url(../../img/logo.jpg);
background-repeat: repeat-x;
}
Hope that looks ok to you (ie. that its a valid way of achieving what we were after) and that it may be some help to someone trying to personalise PunBB for their site.
Many thanks for a great bulletin board !
Cheers
Carl
3 2005-02-11 23:52
Re: PunBB is too simple (21 replies, posted in General discussion)
PunBB rocks ! LengFeng is a WhoFlungDung.