The vB Geek

Go Back   The vB Geek > vB Geek Products > Geek Article and Review System

Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews.

Advertisement
  Learn how to remove ads

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2006, 02:26 PM
kafi kafi is offline
Member
 
Join Date: Oct 2005
Posts: 89
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default Warning message VbGeek or vB?

I am getting this in one article thread:

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 136

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 146

and some users claims to see also:
Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 136


do you think it is GARS related or vBulletin related issue?

Thread is about 60 comments long.
Thank you
----------------------
note I am about to upadate so it might be previous bug?
Reply With Quote
  #2  
Old 05-29-2006, 09:25 AM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Tough to say. Easiest way to check is to diable GARS and see if the problem persists. My guess is that its another hack or a conflict?
Reply With Quote
  #3  
Old 05-30-2006, 04:20 PM
kafi kafi is offline
Member
 
Join Date: Oct 2005
Posts: 89
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

Tested, disabled, error gone.

It probably means that problem is GARS related.

This problem is occuring on every page except of 1st page.
I have quite few articles but only this one is problematic.


Geek any suggestion?
Should I upgrade first berfore troubleshooting form your site?

Thank you!
Reply With Quote
  #4  
Old 05-30-2006, 05:53 PM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Im not too sure. I still suspect its another hack or a conflict. No gars plugin code is 136 or 146 lines long. Do you have any other plugins that use the postbit_display_start hook that are that long?
Reply With Quote
  #5  
Old 06-06-2006, 07:59 AM
kafi kafi is offline
Member
 
Join Date: Oct 2005
Posts: 89
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

yes I found in plugin manager under postbit_display_start another hook:
Post Thank You hack

Here is the code:
PHP Code:
if ($_REQUEST['do'] == 'findthanks')
{

$bbuserinfo $vbulletin->userinfo;
$vboptions $vbulletin->options;

    
$vbulletin->input->clean_array_gpc('r', array(
        
'userid'    => TYPE_UINT,
    ));

    
// valid user id?
    
if (!$vbulletin->GPC['userid'])
    {
        eval(
standard_error(fetch_error('invalidid'$vbphrase['user'], $vbulletin->options['contactuslink'])));
    }

    
// get user info
    
if ($user $db->query_first("SELECT userid, username, posts FROM " TABLE_PREFIX "user WHERE userid = " $vbulletin->GPC['userid']))
    {
        
$searchuser =& $user['username'];
    }
    
// could not find specified user
    
else
    {
        eval(
standard_error(fetch_error('invalidid'$vbphrase['user'], $vbulletin->options['contactuslink'])));
    }

    
// #############################################################################
    // build search hash
    
$query '';
    
$searchuser $user['username'];
    
$exactname 1;
    
$starteronly 0;
    
$forumchoice $foruminfo['forumid'];
    
$childforums 1;
    
$titleonly 0;
    
$showposts 1;
    
$searchdate 0;
    
$beforeafter 'after';
    
$replyless 0;
    
$replylimit 0;
    
$searchthreadid 0;

    (
$hook vBulletinHook::fetch_hook('search_finduser_start')) ? eval($hook) : false;

    
$searchhash md5(TIMENOW "||" $vbulletin->userinfo['userid'] . "||" strtolower($searchuser) . "||$exactname||$starteronly||$forumchoice||$childforums||$titleonly||$showposts||$searchdate||$beforeafter||$replyless||$replylimit||$searchthreadid");

    
// check if search already done
    //if ($search = $db->query_first("SELECT searchid FROM " . TABLE_PREFIX . "search AS search WHERE searchhash = '" . $db->escape_string($searchhash) . "'"))
    //{
    //    $vbulletin->url = "search.php?" . $vbulletin->session->vars['sessionurl'] . "searchid=$search[searchid]";
    //    eval(print_standard_redirect('search'));
    //}

    // start search timer
    
$searchtime microtime();

    
// #############################################################################
    // check to see if we should be searching in a particular forum or forums
    
if ($forumids fetch_search_forumids($forumchoice$childforums))
    {
        
$forumids 'thread.forumid IN(' implode(','$forumids) . ')';
        
$showforums true;
    }
    else
    {
        
$forumids '0';
        foreach (
$vbulletin->forumcache AS $forumid => $forum)
        {
            
$fperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
            if ((
$fperms $vbulletin->bf_ugp_forumpermissions['canview']) AND ($fperms $vbulletin->bf_ugp_forumpermissions['canviewothers']))
            {
                
$forumids .= ",$forumid";
            }
        }
        
$forumids "thread.forumid IN($forumids)";
        
$showforums false;
    }

    
// query post ids in dateline DESC order...
    
$orderedids = array();
    
$posts $db->query_read("
        SELECT postid
        FROM " 
TABLE_PREFIX "post AS post " iif($forumids"
        INNER JOIN " 
TABLE_PREFIX "thread AS thread ON(thread.threadid = post.threadid)
        WHERE post.userid = $user[userid]
        AND post.post_thanks_amount != 0
        AND $forumids"
) . "
        ORDER BY post.dateline DESC
        LIMIT " 
. ($vbulletin->options['maxresults'] * 2) . "
    "
);
    while (
$post $db->fetch_array($posts))
    {
        
$orderedids[] = $post['postid'];
    }
    unset(
$post);
    
$db->free_result($posts);

    
// did we get some results?
    
if (empty($orderedids))
    {
        eval(
standard_error(fetch_error('searchnoresults'$displayCommon), ''false));
    }

    
// set display terms
    
$display = array(
        
'words' => array(),
        
'highlight' => array(),
        
'common' => array(),
        
'users' => array($user['userid'] => $user['username']),
        
'forums' => iif($showforums$display['forums'], 0),
        
'options' => array(
            
'starteronly' => 0,
            
'childforums' => 1,
            
'action' => 'process'
        
)
    );

    
// end search timer
    
$searchtime fetch_microtime_difference($searchtime);

    (
$hook vBulletinHook::fetch_hook('search_finduser_complete')) ? eval($hook) : false;

    
/*insert query*/
    
$db->query_write("
        REPLACE INTO " 
TABLE_PREFIX "search (userid, ipaddress, personal, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, displayterms, searchhash)
        VALUES (" 
$vbulletin->userinfo['userid'] . ", '" $db->escape_string(IPADDRESS) . "', 1, '" $db->escape_string($user['username']) . "', '" $db->escape_string($forumchoice) . "', 'post.dateline', 'DESC', $searchtime, 1, '" $db->escape_string(implode(','$orderedids)) . "', " TIMENOW ", '" $db->escape_string(serialize($display)) . "', '" $db->escape_string($searchhash) . "')
    "
);
    
$searchid $db->insert_id();

    
$vbulletin->url "search.php?" $vbulletin->session->vars['sessionurl'] . "searchid=$searchid";
    eval(
print_standard_redirect('search'));

}



// #############################################################################
if ($_REQUEST['do'] == 'findallthanks')
{

$bbuserinfo $vbulletin->userinfo;
$vboptions $vbulletin->options;

    
// #############################################################################
    // build search hash
    
$query '';
    
$searchuser $user['username'];
    
$exactname 1;
    
$starteronly 0;
    
$forumchoice $foruminfo['forumid'];
    
$childforums 1;
    
$titleonly 0;
    
$showposts 1;
    
$searchdate 0;
    
$beforeafter 'after';
    
$replyless 0;
    
$replylimit 0;
    
$searchthreadid 0;

    (
$hook vBulletinHook::fetch_hook('search_finduser_start')) ? eval($hook) : false;

    
$searchhash md5(TIMENOW "||" $vbulletin->userinfo['userid'] . "||" strtolower($searchuser) . "||$exactname||$starteronly||$forumchoice||$childforums||$titleonly||$showposts||$searchdate||$beforeafter||$replyless||$replylimit||$searchthreadid");

    
// check if search already done
    //if ($search = $db->query_first("SELECT searchid FROM " . TABLE_PREFIX . "search AS search WHERE searchhash = '" . $db->escape_string($searchhash) . "'"))
    //{
    //    $vbulletin->url = "search.php?" . $vbulletin->session->vars['sessionurl'] . "searchid=$search[searchid]";
    //    eval(print_standard_redirect('search'));
    //}

    // start search timer
    
$searchtime microtime();

    
// #############################################################################
    // check to see if we should be searching in a particular forum or forums
    
if ($forumids fetch_search_forumids($forumchoice$childforums))
    {
        
$forumids 'thread.forumid IN(' implode(','$forumids) . ')';
        
$showforums true;
    }
    else
    {
        
$forumids '0';
        foreach (
$vbulletin->forumcache AS $forumid => $forum)
        {
            
$fperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
            if ((
$fperms $vbulletin->bf_ugp_forumpermissions['canview']) AND ($fperms $vbulletin->bf_ugp_forumpermissions['canviewothers']))
            {
                
$forumids .= ",$forumid";
            }
        }
        
$forumids "thread.forumid IN($forumids)";
        
$showforums false;
    }

    
// query post ids in dateline DESC order...
    
$orderedids = array();
    
$posts $db->query_read("
        SELECT postid
        FROM " 
TABLE_PREFIX "post AS post " iif($forumids"
        INNER JOIN " 
TABLE_PREFIX "thread AS thread ON(thread.threadid = post.threadid)
        WHERE post.post_thanks_amount != 0
        AND $forumids"
) . "
        ORDER BY post.dateline DESC
        LIMIT " 
. ($vbulletin->options['maxresults'] * 2) . "
    "
);
    while (
$post $db->fetch_array($posts))
    {
        
$orderedids[] = $post['postid'];
    }
    unset(
$post);
    
$db->free_result($posts);

    
// did we get some results?
    
if (empty($orderedids))
    {
        eval(
standard_error(fetch_error('searchnoresults'$displayCommon), ''false));
    }

    
// set display terms
    
$display = array(
        
'words' => array(),
        
'highlight' => array(),
        
'common' => array(),
        
'forums' => iif($showforums$display['forums'], 0),
        
'options' => array(
            
'starteronly' => 0,
            
'childforums' => 1,
            
'action' => 'process'
        
)
    );

    
// end search timer
    
$searchtime fetch_microtime_difference($searchtime);

    (
$hook vBulletinHook::fetch_hook('search_finduser_complete')) ? eval($hook) : false;

    
/*insert query*/
    
$db->query_write("
        REPLACE INTO " 
TABLE_PREFIX "search (userid, ipaddress, personal, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, displayterms, searchhash)
        VALUES (" 
$vbulletin->userinfo['userid'] . ", '" $db->escape_string(IPADDRESS) . "', 1, '" $db->escape_string($user['username']) . "', '" $db->escape_string($forumchoice) . "', 'post.dateline', 'DESC', $searchtime, 1, '" $db->escape_string(implode(','$orderedids)) . "', " TIMENOW ", '" $db->escape_string(serialize($display)) . "', '" $db->escape_string($searchhash) . "')
    "
);
    
$searchid $db->insert_id();

    
$vbulletin->url "search.php?" $vbulletin->session->vars['sessionurl'] . "searchid=$searchid";
    eval(
print_standard_redirect('search'));



Does anythink ring a bell? I have no clue....
Thank you Geek
Reply With Quote
  #6  
Old 06-06-2006, 08:14 AM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Whos hack is it?
Reply With Quote
  #7  
Old 06-06-2006, 02:02 PM
kafi kafi is offline
Member
 
Join Date: Oct 2005
Posts: 89
Geek Article and Review System License Holder Geek Auto-Linker Pro License Holder 
Default

Abe1
http://www.vbulletin.org/forum/showthread.php?t=92410
Reply With Quote
  #8  
Old 06-06-2006, 06:22 PM
The Geek's Avatar
The Geek The Geek is offline
Senior Member
 
Join Date: Aug 2005
Posts: 6,717
Geek Article and Review System License Holder GeekMart License Holder Geek Auto-Linker Pro License Holder Geek Advertising Banner License Holder Geek Gazette License Holder 
Default

Have you tried asking him about it? Its a difficult call to comb through his code to see what the problem could be. Do you have his latest version?
Reply With Quote
Reply

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
vBGeek on vBull 4 YaGi Lizard Lounge 5 10-18-2009 07:00 AM
Help in understanding vBgeek hookway Geek Article and Review System 3 02-23-2009 08:17 PM
Creating a Warning Message Neal Geek Advertising Banner System 1 07-21-2008 04:28 PM
GAL 6.0 warning Johnny Utah Geek Auto-Linker 7 01-24-2008 10:08 PM
vbgeek kafi GARS Link Directory 0 10-02-2006 08:42 PM


All times are GMT. The time now is 03:28 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.