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-07-2007, 08:05 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Textarea columns

I am adding a textarea on a custom page and I tried using the fetch_text_area_width() function in the functions_editor.php file like so but it never is correct under any browser Im testing with.

Code:
// php file...
require_once(DIR . '/includes/functions_editor.php');

// ...

$textareacols = fetch_textarea_width();
Code:
// template
<textarea class="bginput" rows="4" cols="$textareacols" name="description" /></textarea>
// ..

In IE 7 its not wide enough to match the posticons fieldset and in IE 6 its way too wide. Seems like the function is not working correctly at all.

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

Well I guess for something "simplier" I will switch to the built in editor but would only want the quick reply editor and remove some buttons.


Code:
// in my php fle...
  // set up the description textarea using the quick reply editor style
  $show['wysiwyg'] = ($setting['allow_bbcode'] ? is_wysiwyg_compatible('', 'qr') : 0);
  $istyles_js = construct_editor_styles_js();
  $show['qr_require_click'] = 0;
  $editorid = construct_edit_toolbar('', 0, 7, 1, 1, '', 'qr');
  $messagearea = "
  <script type=\"text/javascript\">
  <!--
      var require_click = false;
      var threaded_mode = 1;
      var is_last_page = false;
  // -->
  </script>
  $messagearea
  ";

// ...
Code:
// template
// ... 
$messagearea

// ...
This works correctly for the width but now I have the editor buttons to edit and they also dont work at all. They show the tooltips correctly but no action or mouseover style changes either. Font, size and color dropdowns wont drop for ex.

Oh and I get a js error "vb_Text_Editor" is undefined. I dont have it anywhere in my code but perhaps it somewhere in one of the function includes or js calls in them.
Attached Images
File Type: jpg vB Editor1.jpg (21.3 KB, 0 views)
Reply With Quote
  #3  
Old 10-07-2007, 11:06 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I finally got it working as I needed a plugin to hook the editor_toolbar_start.

Any way to remove or disable only certain buttons? I initially need just the ones outlined in red removed or disabled.
Hey I have my very own thread :lol:

Thanks
Attached Images
File Type: jpg vB Editor2a.jpg (27.5 KB, 0 views)
Reply With Quote
  #4  
Old 10-07-2007, 11:57 PM
RobDog888's Avatar
RobDog888 RobDog888 is offline
 
Join Date: Apr 2007
Location: Degabah Swamp
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured out removing the buttons by adding to the plugin code for each buttons show property. Any way to remove a button separator?

Now all thats left is the wysiwyg editor switch button. Its compatible to be shown but the switch button still will not appear in the top right corner of the editor.

Almost there
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 09:50 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.09595 seconds
  • Memory Usage 2,208KB
  • Queries Executed 12 (?)
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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (2)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete