vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Multiquote (https://vborg.vbsupport.ru/showthread.php?t=91185)

Andreas 07-07-2005 05:18 PM

Erm ... it does show older Quotes first?

Biker_GA 07-07-2005 05:22 PM

No.. If I run down the thread, selecting the oldest quotes first, it displays in reverse order when I click the "quote" button on the last quoted thread.

Andreas 07-07-2005 05:27 PM

Hmm, for me it does.
But it could be that different mySQL-Versions behave differently.

In Hook newreply_forum_start change
PHP Code:

ORDER BY post.postid 

to

PHP Code:

ORDER BY post.dateline ASC 

Does this work?
I think the best idea would be to make this dependand on the Users setting (Oldest First or Newset First).

Biker_GA 07-07-2005 05:32 PM

I'll give it a shot. The majority of our users are using linear mode, oldest first. There's only a couple that use Hybrid or Threaded.

Biker_GA 07-07-2005 05:37 PM

Quote:

Originally Posted by KirbyDE
Does this work?
I think the best idea would be to make this dependand on the Users setting (Oldest First or Newset First).

No workie. :( Still showing in reverse order.

I take that back.. It sort of works.

The very first quote is from the last post where I clicked "Quote". The rest ARE in order, oldest to newest first.

Andreas 07-07-2005 05:41 PM

That is ... impossible.
ORDER BY post.dateline ASC selects older posts first.

But you might try ORDER BY post.dateline DESC (this gives newest Posts first, at least theoretically and on my system)

Andreas 07-07-2005 05:44 PM

Well, the first Quote will always be the one where you clicked Quote.

Getting this at the right place time-wise would require some more changes.

Biker_GA 07-07-2005 05:45 PM

OK.. I'll just change my instructions to the users to click the multiquote icons and then the Post Reply icon.


Edit -- Just tested and that procedure works just fine. :)

amykhar 07-07-2005 06:00 PM

Quote:

Originally Posted by KirbyDE
Hmm, how do wou want it to integrate?
Of cour I could make it so QR takes all the Quotes selected for MQ, but does that make sense?

I think it makes sense that if you click a post and then select the quote checkbox, that it pick up all the quotes selected by MQ.

Andreas 07-07-2005 06:05 PM

But you can't reply to them then as your text would appear below all the Quotes?

Biker_GA 07-07-2005 06:09 PM

OK... Found another "issue". If you select the multiquote on the last post in a thread, it isn't included.

Andreas 07-07-2005 06:10 PM

I guess you clicked the big Reply-Button which sets noquote for the last Post?

amykhar 07-07-2005 06:14 PM

Quote:

Originally Posted by KirbyDE
But you can't reply to them then as your text would appear below all the Quotes?

That's ok. A lot of people do that anyway. Ideally, it would show in the QR box for edit before the post is submitted, but if that's not doable, the other option would work.

Biker_GA 07-07-2005 06:23 PM

Quote:

Originally Posted by KirbyDE
I guess you clicked the big Reply-Button which sets noquote for the last Post?

Yeah... So what to do? If I use "quote" on the last post, it puts it in front of all the older quotes. :(

Andreas 07-07-2005 06:58 PM

Quote:

Originally Posted by amykhar
That's ok. A lot of people do that anyway. Ideally, it would show in the QR box for edit before the post is submitted, but if that's not doable, the other option would work.

Should be doable with AJAX, but I am not yet familiar with this so it might take some time.

For the moment I changed it so that the Postorder will always be correct and that the Big Reply Button also quotes the last Post if it was selected for MQ. I think this might make more sense.
An update will be released soon.

Andreas 07-07-2005 08:19 PM

OK, I currently got Support for QR this way:
If Posts are selected for MQ and "Quote Message in Reply" is checked the Quotes will be on Top of the Post (Order depends on User Setting Oldest or Newest First), the Reply is below them.
If "Quote message in reply" is not checked they will not appear in the Post, but they will still be selected for MQ.
Furthermore, the MQ Icon for the quoted Posts does not change after an AJAX Post, only if you reload the Page - i'll try to get them reset too.

Does this behaviour make sense?

Biker_GA 07-07-2005 08:23 PM

Ummmmmmmmm. No? LOL "Quote message in reply".. As in the check on QR?

Andreas 07-07-2005 08:25 PM

No, I am talking about the Checkbox below the QR Editor.
Which global setting do you mean?

Biker_GA 07-07-2005 08:26 PM

I changed it. LMAO

I think I see how it works... Oh hell. Make the changes. I'll delete, reload and test. Why not? I've busted just about everything else on my site today.

amykhar 07-08-2005 12:50 AM

Quote:

Originally Posted by KirbyDE
OK, I currently got Support for QR this way:
If Posts are selected for MQ and "Quote Message in Reply" is checked the Quotes will be on Top of the Post (Order depends on User Setting Oldest or Newest First), the Reply is below them.
If "Quote message in reply" is not checked they will not appear in the Post, but they will still be selected for MQ.
Furthermore, the MQ Icon for the quoted Posts does not change after an AJAX Post, only if you reload the Page - i'll try to get them reset too.

Does this behaviour make sense?

Yes. Makes sense to me. We can always tweak it as necessary.

Biker_GA 07-11-2005 11:05 PM

Kirby? Any joy with the changes?

theArchitect 07-15-2005 07:12 AM

One of my members is a coder and has a JavaScript consol open along with FireFox for some work he is doing.

He also has the forum open in another tab and he has a constant error warning of: "Error: initMultiQuote is not defined".

It has not affected me as I don't have this type of error reporting on, but thought you might like to know. Also I wouldn't mind hearing about a fix as this must be annoying for him and as he is an Admin...

Andreas 07-15-2005 11:21 PM

@theArchitect
initMultiQuote() is defined in multiquote.js, so make sure this File is located in clientscript and is being loaded bei showthread.php

theArchitect 07-15-2005 11:37 PM

Quote:

Originally Posted by KirbyDE
@theArchitect
initMultiQuote() is defined in multiquote.js, so make sure this File is located in clientscript and is being loaded bei showthread.php

Thanks, I will look into that. Though I have had to turn it off on my live board as I have just installed a spell check system and it seems to have cancelled this hack out.

I don't think it should, but until I get to the bottom of the problem I have removed the multiquote button as clicking it now does nothing.

Boofo 07-25-2005 03:45 AM

Quote:

Originally Posted by KirbyDE
Well, if you put only this line then the </if> is missing ...

HTML Code:

<if condition="$post['replylink'] AND $show['multiquote']">
        <img src="$stylevar[imgdir_misc]/mq_img_off.gif" alt="$vbphrase[multiquote]" border="0" width="21" height="15" name="multiquote_$post[postid]" id="multiquote_$post[postid]" onclick="toggleMultiQuote($post[postid], this)" style="cursor:pointer" />
</if>

This is the whole code and does compile just fine for me?

I'm getting this error now when I try to add that code to the template:

Quote:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /xxxx/xxxx/xxxxxx_xxxx/boards/includes/adminfunctions_template.php(3504) : eval()'d code on line 191

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

amykhar 07-25-2005 10:46 AM

Bob, that error is common for many of us when there are apostrophes within the brackets in the template. Kill the surrounding apostrophes wherever they occur and you should be good to go.

Boofo 07-25-2005 11:56 AM

Thank you, Amy. ;)

I did that right after I posted the message above and it worked fine after that.

BamaStangGuy 08-03-2005 03:45 PM

Installed on RC1 and working good

Biker_GA 08-03-2005 06:40 PM

Quote:

Originally Posted by Biker_GA
Kirby? Any joy with the changes?

Bumpity bump.. ???

BamaStangGuy 08-11-2005 05:23 PM

I think I found a problem when using this:

http://www.vbulletin.com/forum/showthread.php?t=146909

I get this:

PHP Code:

Parse errorparse errorunexpected T_STRINGexpecting ')' in /home/httpd/vhosts/mustangevolution.com/httpdocs/forum/includes/datastore_cache.php on line 4065 

and this is line 4065

PHP Code:

            eval(\'$newpost[\\'message\\'] .= "\n\' . fetch_template(\'newpost_quote\', 1, 0) . \'";\'); 

and this is the whole code section:

PHP Code:

// #############################################################################
// # START MULTI QUOTE                                                         #
// #############################################################################
if (!$newpost[\'preview\'] AND $postids = $vbulletin->input->clean_gpc(\'c\', COOKIE_PREFIX . \'multiquote\', TYPE_STR))
{
    $postids = explode(\',\', $postids);
    $tmp = array();

    //------------------------------
    // Make sure we don\'t double 
    // posts if user selected and 
    // pressed the "reply" button
    //------------------------------
    if ($postinfo[\'postid\'] AND !$vbulleitn->GPC[\'noquote\'])
        $remove_postid = $postinfo[\'postid\'];
    else
        $remove_postid = false;


    //------------------------------
    // Fetch valid PIDs
    //------------------------------
    foreach ($postids AS $pid)
    {
        if (is_numeric($pid) AND $pid != $remove_postid)
            $tmp[] = $pid;
    }
    
    $postids = $tmp;
    $postids = implode(\',\', $postids);

    if ($postids)
    {
        //------------------------------
        // Fetch the posts and
        // get ready to assign them to
        // the message area.
        //------------------------------
        $q = $db->query_read("SELECT
                                  post.username,
                                  post.pagetext,
                                  thread.postuserid,
                                  forum.forumid
                              FROM
                                  " . TABLE_PREFIX . "post AS post,
                                  " . TABLE_PREFIX . "thread AS thread,
                                  " . TABLE_PREFIX . "forum AS forum
                              WHERE
                                  post.postid IN($postids)
                                  AND thread.threadid = post.threadid
                                  AND forum.forumid = thread.forumid
                              ORDER BY post.postid");
        
        while ($data = $db->fetch_array($q))
        {
            //------------------------------
            // Make sure user has perms to
            // read the post they are
            // quoting
            //------------------------------
            $forumperms = fetch_permissions($data[\'forumid\']);

            if (!($forumperms & $vbulletin->bf_ugp_forumpermissions[\'canview\']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions[\'canviewthreads\']))
            {
                continue;
            }
            if (!($forumperms & $vbulletin->bf_ugp_forumpermissions[\'canviewothers\']) AND ($data[\'postuserid\'] != $bbuserinfo[\'userid\'] OR $bbuserinfo[\'userid\'] == 0))
            {
                continue;
            }
            
            //------------------------------
            // Now set up the textarea with
            // the quotes
            //------------------------------
            $originalposter = fetch_quote_username($data[\'username\']);
            $pagetext       = htmlspecialchars_uni($data[\'pagetext\']);
            $pagetext       = trim(strip_quotes($pagetext));
            eval(\'$newpost[\\'
message\\'] .= "\n\' . fetch_template(\'newpost_quote\', 1, 0) . \'";\');
        }

        //------------------------------
        // Clean up a bit and delete
        // cookie
        //------------------------------
        unset($postids, $tmp, $remove_postid, $q, $data, $forumperms, $originalposter, $pagetext);
        vbsetcookie(\'multiquote\', \'\', false);
    }
}
// #############################################################################
// # END MULTI QUOTE                                                           #
// ############################################################################# 


BamaStangGuy 08-11-2005 05:26 PM

Actually I can confirm this code is causing it:

I disabled only the newreply_form_start hook and it works now which had this code:

PHP Code:

// #############################################################################
// # START MULTI QUOTE                                                         #
// #############################################################################
if (!$newpost['preview'] AND $postids $vbulletin->input->clean_gpc('c'COOKIE_PREFIX 'multiquote'TYPE_STR))
{
    
$postids explode(','$postids);
    
$tmp = array();

    
//------------------------------
    // Make sure we don't double 
    // posts if user selected and 
    // pressed the "reply" button
    //------------------------------
    
if ($postinfo['postid'] AND !$vbulleitn->GPC['noquote'])
        
$remove_postid $postinfo['postid'];
    else
        
$remove_postid false;


    
//------------------------------
    // Fetch valid PIDs
    //------------------------------
    
foreach ($postids AS $pid)
    {
        if (
is_numeric($pid) AND $pid != $remove_postid)
            
$tmp[] = $pid;
    }
    
    
$postids $tmp;
    
$postids implode(','$postids);

    if (
$postids)
    {
        
//------------------------------
        // Fetch the posts and
        // get ready to assign them to
        // the message area.
        //------------------------------
        
$q $db->query_read("SELECT
                                  post.username,
                                  post.pagetext,
                                  thread.postuserid,
                                  forum.forumid
                              FROM
                                  " 
TABLE_PREFIX "post AS post,
                                  " 
TABLE_PREFIX "thread AS thread,
                                  " 
TABLE_PREFIX "forum AS forum
                              WHERE
                                  post.postid IN(
$postids)
                                  AND thread.threadid = post.threadid
                                  AND forum.forumid = thread.forumid
                              ORDER BY post.postid"
);
        
        while (
$data $db->fetch_array($q))
        {
            
//------------------------------
            // Make sure user has perms to
            // read the post they are
            // quoting
            //------------------------------
            
$forumperms fetch_permissions($data['forumid']);

            if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
            {
                continue;
            }
            if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($data['postuserid'] != $bbuserinfo['userid'] OR $bbuserinfo['userid'] == 0))
            {
                continue;
            }
            
            
//------------------------------
            // Now set up the textarea with
            // the quotes
            //------------------------------
            
$originalposter fetch_quote_username($data['username']);
            
$pagetext       htmlspecialchars_uni($data['pagetext']);
            
$pagetext       trim(strip_quotes($pagetext));
            eval(
'$newpost[\'message\'] .= "\n' fetch_template('newpost_quote'10) . '";');
        }

        
//------------------------------
        // Clean up a bit and delete
        // cookie
        //------------------------------
        
unset($postids$tmp$remove_postid$q$data$forumperms$originalposter$pagetext);
        
vbsetcookie('multiquote'''false);
    }
}
// #############################################################################
// # END MULTI QUOTE                                                           #
// ############################################################################# 


Andreas 08-11-2005 05:54 PM

Confirmed. Seems to be a vBulletin Bug to me.
http://www.vbulletin.com/forum/bugs3...view&bugid=976

Boofo 08-11-2005 07:40 PM

So as long as we don't set it up to use filecahe datastore, this won't show up?

Andreas 08-11-2005 07:45 PM

Yes. And it actually was a vBulletin Bug :)

Boofo 08-11-2005 07:49 PM

Quote:

Originally Posted by KirbyDE
Yes. And it actually was a vBulletin Bug :)

I saw that. ;)

What does the filecache datastore code he posted on the com supposed to do, anyway? ;)

SkyShadow 08-13-2005 09:53 AM

Does this plugin work for vB 3.5?
Anyone tested yet?

Boofo 08-13-2005 09:54 AM

Quote:

Originally Posted by SkyShadow
Does this plugin work for vB 3.5?
Anyone tested yet?

Works fine. ;)

FASherman 08-29-2005 03:11 PM

Template edit gives the following error:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/httpd/vhosts/news-talk.org/httpdocs/forums/includes/adminfunctions_template.php(3510) : eval()'d code on line 187

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Biker_GA 08-29-2005 03:13 PM

Yeah, for some reason, the original copy and past from the file doesn't work right. Try this:

HTML Code:

<if condition="$post['replylink'] AND $show['multiquote']">
<img src="$stylevar[imgdir_misc]/mq_img_off.gif" alt="$vbphrase[multiquote]" border="0" width="21" height="15" name="multiquote_$post[postid]" id="multiquote_$post[postid]" onclick="toggleMultiQuote($post[postid], this)" style="cursor:pointer" />
</if>

Should work just fine.

FASherman 08-29-2005 03:16 PM

Even in cyberspace, I can always count on a fellow Texan. Thanks neighbor.


All times are GMT. The time now is 01:04 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.01847 seconds
  • Memory Usage 1,905KB
  • 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
  • (2)bbcode_html_printable
  • (6)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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