944,110 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2977
  • PHP RSS
Oct 4th, 2005
0

Help with Screen Resulution>?!?

Expand Post »
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
Attached Files
File Type: php headerfile.php (27.8 KB, 26 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jeepj27 is offline Offline
20 posts
since May 2005
Oct 5th, 2005
0

Re: Help with Screen Resulution>?!?

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.
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005
Oct 5th, 2005
0

Re: Help with Screen Resulution>?!?

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
Reputation Points: 10
Solved Threads: 1
Junior Poster
sarahk is offline Offline
138 posts
since Apr 2005
Oct 5th, 2005
0

Re: Help with Screen Resulution>?!?

Sarah - What should the width actually say?

I believe mine does say 100% like that? Should I reduce it?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jeepj27 is offline Offline
20 posts
since May 2005
Oct 5th, 2005
0

Re: Help with Screen Resulution>?!?

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
Reputation Points: 10
Solved Threads: 1
Junior Poster
sarahk is offline Offline
138 posts
since Apr 2005
Oct 19th, 2005
0

Re: Help with Screen Resulution>?!?

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):

PHP Syntax (Toggle Plain Text)
  1. <?
  2. $url = $_SERVER['PHP_SELF'];
  3. if(isset($HTTP_COOKIE_VARS["res"]))
  4. $res = $HTTP_COOKIE_VARS["res"];
  5. else{
  6. ?>
  7. <script language="javascript">
  8. <!--
  9. go();
  10. function go()
  11. {
  12. var today = new Date();
  13. var the_date = new Date("August 31, 2020");
  14. var the_cookie_date = the_date.toGMTString();
  15. var the_cookie = "res="+ screen.width +"x"+ screen.height;
  16. var the_cookie = the_cookie + ";expires=" + the_cookie_date;
  17. document.cookie=the_cookie
  18.  
  19. location = '<?echo "$url";?>';
  20. }
  21. //-->
  22. </script>
  23. <?
  24. }
  25. ?>
  26. <?
  27. list($width, $height) = split('[x]', $res);
  28. $tb_width = $width-300;
  29. $tb_height = $height-300;
  30. print("<table align=center border=1 width=" .$tb_width . " height=" . $tb_height . " >
  31. <tr><td align=center>Your screen resolution is " . $width . " by " . $height . ".<br>
  32. The width/height of this table is " . $tb_width . " by " . $tb_height . ".</td></tr>
  33. </table>");
  34. ?>

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.
Reputation Points: 41
Solved Threads: 2
Junior Poster in Training
fsn812 is offline Offline
93 posts
since Jan 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: INSTALL PHP on XP HOME-edition with APACHE
Next Thread in PHP Forum Timeline: what is appropriate for a PHP programmer to charge?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC