Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[vbhacker] Mozilla Text Area Fix Details »»
[vbhacker] Mozilla Text Area Fix
Version: 1.00, by sidhighwind sidhighwind is offline
Developer Last Online: Feb 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-03-2002 Last Update: Never Installs: 28
 
No support by the author.

This hack fixes the problem with Mozilla and the text area on the forum. Mozilla reads the width attribute different than netscape and causes the text area's to be narrow and very fustrating to use when you are typing in a lot of code or just a long message.

Description of what was changed:

I changed the function gettextareawidth to have mozilla use the width specified for IE instead of the width specified for Netscape.

I hope you all like my first hack.

SiD

Show Your Support

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

Comments
  #32  
Old 01-07-2003, 01:08 AM
Sketch Sketch is offline
 
Join Date: Apr 2002
Location: Baltimore, Maryland
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ergh....can someone please paste the instructions here. I don't know what's wrong with my PC, but I think I'm getting random screwy characters in downloaded text files. I keep getting T-String errors....

Aaron
Reply With Quote
  #33  
Old 01-07-2003, 01:59 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yea, login to your admin cp, styles, modify, click [fonts/colors/etc], scroll down to the bottom. Textarea Widths, change Netscape Navigator 6.0 to 70, click save changes. Works for me.
Reply With Quote
  #34  
Old 02-10-2003, 09:55 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Smoothie
yea, login to your admin cp, styles, modify, click [fonts/colors/etc], scroll down to the bottom. Textarea Widths, change Netscape Navigator 6.0 to 70, click save changes. Works for me.
Yes, but the textarea in Netscape 6.0 may then be too big.

Without this hack, by default, vB 2.2.9 Mozilla uses Netscape 6.0 width, which is by default 40.

With this hack, vB 2.2.9 Mozilla uses the IE textarea width instead which is set at 70.

That's the difference.
Reply With Quote
  #35  
Old 02-10-2003, 04:13 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They both (Mozilla, Netscape) appear the same (text area) to me, without this hack
Reply With Quote
  #36  
Old 04-05-2003, 05:47 AM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there ever going to be .txt instructions posted or what? I could use this hack for some of my Moz users. The textarea in IE6 is fine, but in Moz its simply too small, and changing the values in the styles section does nothing.
Reply With Quote
  #37  
Old 04-05-2003, 09:32 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EDIT: Updated the instructions to make it clearer...

In functions.php, replace this section:

PHP Code:
// ###################### Start gettextareawidth #######################
function gettextareawidth() {
    
// attempts to fix idiotic Nutscrape textarea width problems
    
global $HTTP_USER_AGENT;

    if (
eregi("MSIE",$HTTP_USER_AGENT)) { // browser is IE
        
return "{textareacols_IE}";

    } elseif (
eregi("Mozilla/5.0",$HTTP_USER_AGENT)) { // browser is NS 6
        
return "{textareacols_NS6}";

    } elseif (
eregi("Mozilla/4.",$HTTP_USER_AGENT)) { // browser is NS4
        
return "{textareacols_NS4}";

    } else { 
// unknown browser - stick in a sensible value
        
return 60;

    }


with this:

PHP Code:
// ###################### Start gettextareawidth #######################
function gettextareawidth() {
    
// attempts to fix idiotic Nutscrape textarea width problems
    
global $HTTP_USER_AGENT;

    if (
eregi("MSIE",$HTTP_USER_AGENT) || (eregi("Mozilla/5",$HTTP_USER_AGENT) && !eregi("Netscape6/",$HTTP_USER_AGENT))) { // browser is IE
        
return "{textareacols_IE}";
        
    } elseif (
eregi("Netscape6/",$HTTP_USER_AGENT)) { // browser is NS 6
        
return "{textareacols_NS6}";
        
    } elseif (
eregi("Mozilla/4.",$HTTP_USER_AGENT)) { // browser is NS4
        
return "{textareacols_NS4}";


    } else { 
// unknown browser - stick in a sensible value
        
return 60;

    }


Reply With Quote
  #38  
Old 04-05-2003, 02:42 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin

I did what you said above and I get the foolowing error:

Parse error: parse error, unexpected ',' in /home/attroll/public_html/forum/admin/functions.php on line 334

Fatal error: Call to undefined function: getuserinfo() in /home/attroll/public_html/forum/admin/sessions.php on line 366
Reply With Quote
  #39  
Old 04-05-2003, 07:49 PM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, Im getting the same thing.
Reply With Quote
  #40  
Old 04-05-2003, 11:24 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I cut and paste, I only left one / instead of the normal // for commenting out text. Sorry - try it again now. Btw, this is probably different to the code being used by the thread starter - this is code from vB.com developers (from memory).
Reply With Quote
  #41  
Old 04-05-2003, 11:40 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope I get this error now which is pretty much the same one I got before.

Parse error: parse error, unexpected ',' in /home/attroll/public_html/forum/admin/functions.php on line 335

Fatal error: Call to undefined function: getuserinfo() in /home/attroll/public_html/forum/admin/sessions.php on line 366
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 01:23 AM.


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.05803 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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