Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Screen Resolution Script Details »»
Screen Resolution Script
Version: , by solboy solboy is offline
Developer Last Online: Nov 2012 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-11-2002 Last Update: Never Installs: 0
 
No support by the author.

Hi,

I am tring to get my forum to show-up perfectly in all browser sizes. Is there a script for this and where do I incert it?
I also have a banner at the top of my page that I want to fit perfectly in all browser sizes.
Is there a script for that also?

Thanks.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-14-2003, 05:59 PM
dano dano is offline
 
Join Date: May 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^
Reply With Quote
  #13  
Old 07-14-2003, 06:30 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<script language="JavaScript">
if (screen.width==640) {
  document.write('Resolution is 640x480.');
} else if (screen.width==800) {
  document.write('Resolution is 800x600.');
} else if (screen.width==1024) {
  document.write('Resolution is 1024x768.');
} else {
  document.write('Resolution is greater than 1024x768');
}
</script>
Just off the top of my head; I haven't seen any of those search results.
Reply With Quote
  #14  
Old 07-14-2003, 06:54 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or you could do this, for different banners:

PHP Code:
<SCRIPT LANGUAGE="JavaScript">

<!-- 
Begin
function redirectPage() {
var 
url640x480 "http://www.yoururl.com/urlwithbanner640_480.html";
var 
url800x600 "http://www.yoururl.com/urlwithbanner800_600.html";
var 
url1024x768 "http://www.yoururl.com/urlwithbanner1024_768.html";
var 
url1280x1024 "http://www.yoururl.com/urlwithbanner1280_1024.html";
if ((
screen.width == 640) && (screen.height == 480)) 
window.location.hrefurl640x480;
else if ((
screen.width == 800) && (screen.height == 600))
window.location.hrefurl800x600;
else if ((
screen.width == 1024) && (screen.height == 768))
window.location.hrefurl1024x768;
else if ((
screen.width == 1280) && (screen.height == 1024))
window.location.hrefurl1280x1024;
else 
window.location.hrefurl640x480;
}
// End -->
</script>
</
head>
<
body onload="redirectPage()"
Reply With Quote
  #15  
Old 07-14-2003, 06:56 PM
corsacrazy's Avatar
corsacrazy corsacrazy is offline
 
Join Date: May 2002
Location: london
Posts: 854
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this

code:
<script language="JavaScript">
if (screen.width) {
if (screen.width==640) {
document.write('Resolution is 640x480.');
} elseif (screen.width==800) {
document.write('Resolution is 800x600.');
} elseif (screen.width==1024) {
document.write('Resolution is 1024x768.');
} else {
document.write('Resolution is greater than 1024x768');
}
} else {
document.write('Not using Internet Explorer; can't detect resolution.');
}
</script>


didnt werk it sed Expected ;
Reply With Quote
  #16  
Old 07-15-2003, 12:04 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ehhh...try again... Should work now.

BTW, Lesane, I was just trying to show how to detect the screen resolution because there are hundreds of things he could want to do with this script...I wanted to provide something that was nice and customizable, and I feel like you just repeated what I already said (but worse). It's not nice. I wouldn't be bothered, but you've been an @$$4073 to me in the past, so I can't help but feel like you're just trying to get attention (a "thank you" even) at my expense.

Also, I've never heard of a screen resolution where height divided by width is not equal to 75%, so those parts in your conditionals are unnecessary.

Good day.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04587 seconds
  • Memory Usage 2,269KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete