Hi All -


I am using PhpBB for my medical community and have a question about screen resolutions-

Is there any way to make my forum more screen resolution friendly?

My forum seems to show best with 1024x768, but how can I make it best for people with only 800x600??

So they do not have to SCROLL on the bottom??

Any way to auto adjust??

i have attached a relevant file... I am extremely new to PHP so hoped I could get some help! :) Thanks SO MUCH!!!

Also my web address is: www.eyeontechs.com

I'm not very good in phpBB but I can comment some based on your html layout:

1. The screen will not go below ~960px as you have a banner which is 945px in width. If you have smaller logo, the overall page may resize to, say 800px in width, as you set the table width at 100%.
2. You can use javascrip to detect the user screen resolution and set the window size to fit it. Try google "javascript screen resolution" and you will find tons of fre script around.

A client has since scrapped his phpBB forum for vBulletin but we found it was an issue with one of the tables having a <td width='100%'> that caused the problem. Now, you'll find this all over the place so it's a matter of working through the scripts to find the right one.

Depending on your skills and confidence it won't take long, it's just mucky.

good luck.

Sarah

Sarah - What should the width actually say?

I believe mine does say 100% like that? Should I reduce it?

The trick is finding the right one

you are looking for TD - and not TABLE tags

I usually make the width='100%' into xwidth='100%'
that way I can search to find it later if I change my mind

xwidth does nothing, it's not a valid element for the TD tag.

Sarah

The following code might help for what you are looking for. I took the width and height in the table from the screen resolution (taken from the cookie and split) and reduced them by 300 (so that it would fit inside a browser without scrolling - set this to whatever you feel comfortable with):

<?
$url = $_SERVER['PHP_SELF'];
if(isset($HTTP_COOKIE_VARS["res"]))
$res = $HTTP_COOKIE_VARS["res"];
else{
?>
<script language="javascript">
<!--
go();
function go() 
{
var today = new Date();
var the_date = new Date("August 31, 2020");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "res="+ screen.width +"x"+ screen.height;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
 
location = '<?echo "$url";?>';
}
//-->
</script>
<?
}
?>
<?
list($width, $height) = split('[x]', $res);
$tb_width = $width-300;
$tb_height = $height-300;
print("<table align=center border=1 width=" .$tb_width . " height=" . $tb_height . " >
<tr><td align=center>Your screen resolution is " . $width . " by " . $height . ".<br>
The width/height of this table is " . $tb_width . " by " . $tb_height . ".</td></tr>
</table>");
?>

This might not be exactly what you are looking for, but at least it has some automation so I hope it's a good start for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.