Thread: New Posting Features - Quick Editor Improver - Support Attachment
View Single Post
  #268  
Old 02-12-2010, 09:18 AM
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Location: MSK-RU
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a BUG in this product.
  1. User in his options sets : Message Editor Interface -> Basic Editor - A simple text box
  2. After that the user tries to make a Quick Edit of any of his posts.
  3. He will fail to do that.
  4. He presses "Save" button in Ajax Quick Edit form
  5. Forum will try to save the post
  6. But it will fail to do so with JavaScript error

    Code:
    Line:1
    Symbol:5436
    Code:0
    Error:Object needed
    URL:https://vborg.vbsupport.ru/misc.php?do=qei_quickedit&v=384
  7. And progress image is been shown.
  8. This will continue until user will reload the page or will hit "Cancel" button.
  9. The post will not be saved.

To go around this one we have to use:
PHP Code:
$vbulletin->userinfo['showvbcode'
In other words, for example find this one:
PHP Code:
if ($vbulletin->options['qeimp_enabled']) 
and replace with this one:
PHP Code:
if ($vbulletin->options['qeimp_enabled'] AND $vbulletin->userinfo['showvbcode']) 

I have made such changes around the product.

Here they are:
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Cache Templates</title>
            <
hookname>cache_templates</hookname>
            <
phpcode><![CDATA[            
            if (
$vbulletin->options['qeimp_enabled'] AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Button Visibility Bitfields</title>
            <
hookname>global_start</hookname>
            <
phpcode><![CDATA[
                    if (
$vbulletin->options['qeimp_enabled'] AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>vBulletin Blog Comments Set Form Width</title>
            <
hookname>global_setup_complete</hookname>
            <
phpcode><![CDATA[
            if ((
$vbulletin->options['qeimp_enabled'] AND $vbulletin->options['qei_qr_formwidth']) AND intval($vbulletin->options['qei_visiblebuttons']) > AND $qei_apply AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Improve Editor</title>
            <
hookname>editor_toolbar_start</hookname>
            <
phpcode><![CDATA[
            global 
$qei_apply;
            if (
$qei_apply $vbulletin->options['qei_show_postingrules_in_box'] AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Improve Editor</title>
            <
hookname>editor_toolbar_end</hookname>
            <
phpcode><![CDATA[    
            if (
$vbulletin->options['qeimp_enabled'] AND $qei_apply AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>SHOWTHREAD Quick Attachment</title>
            <
hookname>showthread_post_start</hookname>
            <
phpcode><![CDATA[
            if (
$vbulletin->options['qeimp_enabled'] AND $qei_apply AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>AJAX Postbit QuickEdit with Attachments</title>
            <
hookname>ajax_start</hookname>
            <
phpcode><![CDATA[
if (
$_POST['do'] == 'quickedit' AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Prepare for Postbit QuickEdit Attachments</title>
            <
hookname>newattachment_complete</hookname>
            <
phpcode><![CDATA[
            if (
$_REQUEST['qeiajax'] AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Check Postbit Attachment Require - AJAX Mode</title>
            <
hookname>editpost_update_start</hookname>
            <
phpcode><![CDATA[
            if ((
$vbulletin->GPC['ajax']) AND $qei_apply AND ($vbulletin->options['qei_qr_show_attachment']) AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Display Postbit AJAX Mode</title>
            <
hookname>editpost_edit_ajax</hookname>
            <
phpcode><![CDATA[
            if (
$qei_apply AND ($vbulletin->options['qei_qr_show_attachment']) AND $vbulletin->userinfo['showvbcode']) 
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>SHOWTHREAD Quick Reply</title>
            <
hookname>showthread_complete</hookname>
            <
phpcode><![CDATA[
            if (
$vbulletin->options['qeimp_enabled'] AND $qei_apply AND $vbulletin->userinfo['showvbcode']) 
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01468 seconds
  • Memory Usage 1,877KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (14)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete