vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   MultiQuote (https://vborg.vbsupport.ru/showthread.php?t=59702)

mtellin 01-06-2004 01:54 AM

I got a parse error when I tried that one, no matter what type of reply I tried

Chroder 01-06-2004 02:03 AM

You sure you pasted it correctly? I've got the exact code and nothing is comeing up for me. Whats the error your getting?

BillaBongUSA 01-06-2004 02:12 AM

That new code seems to work okay for me.

mtellin 01-06-2004 02:20 AM

Quote:

Originally Posted by Chroder
You sure you pasted it correctly? I've got the exact code and nothing is comeing up for me. Whats the error your getting?

Yup it was something completly unrelated that I messed up, wasnt your code and its working now

However for me if I click more than one to quote, and then click post reply, it only has one quoted (but I didnt get any errors when clicking one to quote then clicking go advanced)

BillaBongUSA 01-06-2004 02:42 AM

Yeah, same here, but I think that that only happens when you try to quote the last reply in the thread. Any other reply that I try to quote works, but when I try to quote the last reply, it doesn't show up.

[Edit: I don't know if that was very clear... To clarify, if I select three posts to quote, they will all show up. But if one of those is the last post in the thread, only two will show up, and the last post in the thread is omitted.]

Zelda-King 01-06-2004 03:52 PM

Yeah, I get a database error when using Quick Reply (which is important to fix as most people use Quick Reply). Same one as posted already;

Database error in vBulletin 3.0.0 Release Candidate 2:

Invalid SQL: SELECT postid, username, pagetext FROM post WHERE postid IN(19134) AND postid <> ORDER BY postid ASC LIMIT 20
mysql error: You have an error in your SQL syntax near 'ORDER BY postid ASC LIMIT 20' at line 1

mysql error number: 1064

Also, considering this works across threads and such, shouldn't the button for selected posts stay on? If you go back to a post on another page that you selected, the button turns off though the quote still works.

Chroder 01-06-2004 06:57 PM

PHP Code:

//############################################################################
//# START MULTI QUOTE                                                        #
//############################################################################
if(isset($_COOKIE[COOKIE_PREFIX 'mq']))
{
    
$pids $_COOKIE[COOKIE_PREFIX 'mq'];
    
$pids urldecode($pids);

    if(!empty(
$pids) && preg_match("/^[0-9,]+$/"$pids))
    {
        if(
$_REQUEST['noquote'])
            
$mq_postid '';
        elseif(!empty(
$postinfo['postid']))
            
$mq_postid "AND postid <> {$postinfo['postid']}";
        else
            
$mq_postid '';

        
$q $DB_site->query("SELECT username, pagetext FROM ".TABLE_PREFIX."post WHERE postid IN($pids$mq_postid ORDER BY postid ASC LIMIT 20");
        while(
$row $DB_site->fetch_array($q))
        {
            
$originalposter fetch_quote_username($row['username']);
            
$pagetext htmlspecialchars_uni($row['pagetext']);
            
$pagetext trim(strip_quotes($pagetext));
            eval(
'$newpost[\'message\'] .= "' fetch_template('newpost_quote'10) . '\n";');
        }
    }

    
setcookie(COOKIE_PREFIX 'mq'''time() - 3600$vboptions['cookiepath'], $vboptions['cookiedomain']);
}
//############################################################################
//# END MULTI QUOTE                                                          #
//############################################################################ 

That should fix the last post not being included. I got screwed up because in RC2 (mabe RC1?) the template changed and the reply button actually replies to the _last_ post as to the first post. So I was having trouble reproducing the bug ;)

I'll update the main file with this code. The "go advanced" in the quick reply still doesn't show the quotes, though I'm working on it :)

Chroder 01-06-2004 07:06 PM

Zelda-King -- I assume you were using the code from the file? I posted a fix to that above, but the main file is now updated.

Quote:

Originally Posted by Zelda-King
Also, considering this works across threads and such, shouldn't the button for selected posts stay on? If you go back to a post on another page that you selected, the button turns off though the quote still works.

It should be doing this already, that is the reason for the mq_init() function. Is anyone else not getting this functionality? Remember that the New Reply page, when loaded, will clear the cookie that has saved the posts you've selected. This is the intended action, because after they've been added to the message box they're not needed. Though the problem comes with the "go advanced" button in the QR that will not display the quotes but will still clear them.

BillaBongUSA 01-06-2004 09:01 PM

Yeah, the button doesn't stay on for me cross-thread either.

Chroder 01-06-2004 10:36 PM

Doh. Seems to only work in Moz. I'll look into that too.


All times are GMT. The time now is 07:18 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.01879 seconds
  • Memory Usage 1,756KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete