Thread: Multiquote
View Single Post
  #71  
Old 08-11-2005, 05:23 PM
BamaStangGuy's Avatar
BamaStangGuy BamaStangGuy is offline
 
Join Date: Mar 2004
Location: Alabama
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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                                                           #
// ############################################################################# 
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01123 seconds
  • Memory Usage 1,824KB
  • 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
  • (3)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