Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2007, 02:16 PM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Message Area Width

I'm having a few problems creating a customised "Message Area Width" for a page I'm creating.

I've tried the following method but the width of the form is restricted by the style i'm using, yet I don't want to change the style as this will mess up the rest of the site, I only want it on this particular form

PHP Code:
  // bring up empty VBform to insert text
  
$article["message"] = 'Enter your first step here';
  
$stylevar['messagewidth'] = 580;
  
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible() : 0);
  
$istyles_js construct_editor_styles_js();
  
$show['qr_require_click'] = 0;
  
$editorid construct_edit_toolbar($article["message"], 0'', ($setting['allow_smilies'] ? 0), 1false'fe');
  
$messagearea "
      <script type=\"text/javascript\">
      <!--
       var require_click = false;
       var threaded_mode = 1;
       var is_last_page = false;
      // -->
      </script>
      
$messagearea
  "

I'd like to have the form resize to the width of the table it's in, but no matter what I change $stylevar['messagewidth'] to, the style over-rides it. If I remove that line the style will set the width

so is it possible to use the code above to make the message area resize to the size of the table that I want to display it in?

Please help
Reply With Quote
  #2  
Old 10-15-2007, 05:55 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try...

Code:
$textareacols = fetch_textarea_width();
Reply With Quote
  #3  
Old 10-16-2007, 02:28 PM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not quite sure how that would apply when I'm using just $messageares within my template?

I've found your post on the subject regarding the Quick Reply editor which does go full width, but without all the editing options which I want to keep.
Do you know how to make this work on the full editor?

--------------- Added 16 Oct 2007 at 17:47 ---------------

discovered that I can alter the message width by using the following:

$stylevar['messagewidth'] = '750px';

which is fine if I want a fixed width, but have tried various methods with % but nothing seems to work...

$stylevar['messagewidth'] = '100%'; //doesn't do anything
$stylevar['messagewidth'] = 100%; //brings up error
$stylevar['messagewidth'] = 'auto'; //doesn't do anything
$stylevar['messagewidth'] = auto; //doesn't do anything

Surely there must be a way?
Reply With Quote
  #4  
Old 10-16-2007, 06:55 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font color="darkgreen">Changing the style var will change the messagearea width for all your areas with a messagearea on it. Yes, I have had issues with setting the width as I would get different widths in different browsers and such. I was albel to get it right without using the built in text editor but thats not what I wanted.

Did you make the plugin for it too to hook the hook?</font>
Reply With Quote
  #5  
Old 10-16-2007, 07:06 PM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RobDog888 View Post
Changing the style var will change the messagearea width for all your areas with a messagearea on it. Yes, I have had issues with setting the width as I would get different widths in different browsers and such. I was albel to get it right without using the built in text editor but thats not what I wanted.

Did you make the plugin for it too to hook the hook?
I'm not using a plugin for this at the moment, although I may change to that in the future (when i learn how) now that I've got it mostly working, I'm using a seperate php page that uses the vbulletin templates and database with the built in editor to edit each part.

It's mainly the width of the editor that is holding me back now, My style is not fixed width so I want the message area to reflect that....

I can change the "message width" style for each form that I wish to display, but can only make it a fixed width, not dynamic with percentages....and I don't want to edit the main template style as you mentioned, it will change all forms to change.

I can change it for each form to a fixed width using the code below.

PHP Code:
  $article["message"] = 'Enter your first step here';
  
$stylevar['messagewidth'] = '750px';
  
$show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible() : 0);
  
$istyles_js construct_editor_styles_js();
  
$show['qr_require_click'] = 0;
  
$editorid construct_edit_toolbar($article["message"], 0'', ($setting['allow_smilies'] ? 0), 1false'fe');
  
$messagearea "
      <script type=\"text/javascript\">
      <!--
       var require_click = false;
       var threaded_mode = 1;
       var is_last_page = false;
      // -->
      </script>
      
$messagearea
  "

Reply With Quote
  #6  
Old 10-16-2007, 08:09 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure if you have seen this?
https://vborg.vbsupport.ru/showthread.php?t=135708
Reply With Quote
  #7  
Old 10-17-2007, 01:34 PM
Kiint Kiint is offline
 
Join Date: Nov 2006
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RobDog888 View Post
Yep, this was where I originally got the message form from, She did a good job of explaining it all, and those downloadable files sure helped. Nothing on changing the width though sadly.

Thanks for your help, its' appreciated.
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 07:54 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.03865 seconds
  • Memory Usage 2,236KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete