Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-08-2006, 10:42 PM
KevNJ KevNJ is offline
 
Join Date: Jan 2005
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default someone able to help ?

tried to edit my forumhome_welcomepanel and unsuccessfully as you can tell since im asking for help.

can someone post an unedit version of what is supposed to be included in "stock vbulletin" format.

heres the error im getting


PHP Code:
PHP Code:
Database error in vBulletin 3.5.1:
Invalid SQL:
select count(*) as newposts from jelsoft_post where dateline >= 05:47 PM, 08-08-2006 and visible = 1;
MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':47 PM, 08-08-2006 and visible = 1' at line 1
Error Number : 1064
Date         : Tuesday, August 8th 2006 @ 04:42:32 PM
Script       : http://www.jerseyparties.com/forums/index.php?
Referrer     : 
IP Address   : XXXXXXXXX
Username     : Kevin
Classname    : vb_database 

I upgraded from 3.5.1. to version 3.6.0 in hopes that would solve the problem... nope.. never upgraded before so maybe this could be another problem?


i posted this on vbulletin.com but its been over an hour and no one has even viewed it and im getting emails from members asking why the site is down, so i figured i would post it here to get a quicker response
Reply With Quote
  #2  
Old 08-08-2006, 11:18 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

'forumhome_welcomepanel' is not a standard vbulletin template, it must belong to some modification you have installed.
Reply With Quote
  #3  
Old 08-08-2006, 11:22 PM
KevNJ KevNJ is offline
 
Join Date: Jan 2005
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Correct.
I tried installing the Welcome Panel Rewrite mods.
https://vborg.vbsupport.ru/showthread.php?t=83124
and then this mod
https://vborg.vbsupport.ru/showthread.php?t=100672

Since then I cant access the forums index page. I keep getting that error listed above.
Reply With Quote
  #4  
Old 08-08-2006, 11:26 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The I suggest you either disable them, or uninstall them (via the Product Manager).
Reply With Quote
  #5  
Old 08-08-2006, 11:32 PM
KevNJ KevNJ is offline
 
Join Date: Jan 2005
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried that. Still not working. thats why I came here. Sorry guess I should have mentioned htat in my first post.
Reply With Quote
  #6  
Old 08-08-2006, 11:37 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why dont you try reverting that template...thus deleting it
Reply With Quote
  #7  
Old 08-08-2006, 11:43 PM
KevNJ KevNJ is offline
 
Join Date: Jan 2005
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just tried that too and it doesnt delete.

all the info thats in it.. stays..a nd if i delete and save.. i still get the error.
Reply With Quote
  #8  
Old 08-08-2006, 11:47 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DELETE FROM `template` WHERE title = 'forumhome_welcomepanel'

you also outta delete this hook

forumhome_complete

which houses all this info which is your problem probably:

PHP Code:
  <hookname>forumhome_complete</hookname> 
- <phpcode>
- <![CDATA[ 
if ($vbulletin->userinfo['userid'] > 0 && $vbulletin->userinfo['userid'] != '' || !$vbulletin->userinfo['userid'])
{
    require_once(DIR . '/includes/functions_user.php');
    $vbulletin->userinfo['avatar_build'] = fetch_avatar_url($vbulletin->userinfo['userid']);

    if (empty($vbulletin->userinfo['avatar_build']) || !is_array($vbulletin->userinfo['avatar_build']))
    {
        $vbulletin->userinfo['avatar_build'] = array('noavatar.gif');
    }

    $vbulletin->userinfo['avatar_build'] = '<img src="' . $vbulletin->userinfo['avatar_build'][0] . '"'.iif($vbulletin->userinfo['avatar_build'][1],$vbulletin->userinfo['avatar_build'][1],'').'border="0" alt="Edit Your Avatar" />';

    $postsin = array();
    $gp      = $db->query_read("select p.threadid, t.forumid from ".TABLE_PREFIX."post p left join ".TABLE_PREFIX."thread t on(t.threadid = p.threadid) where p.userid = {$vbulletin->userinfo['userid']}");
    while ($gpb = $db->fetch_array($gp))
    {
        if (!$postsin[$gpb[forumid]])
        {
            $postsin[$gpb[forumid]] = 1;
        }
        else
        {
            $postsin[$gpb[forumid]]++;
        }
    }

    $active = array(0);

    if (is_array($postsin) && is_array($vbulletin->forumcache))
    {
        foreach ($postsin as $forumid => $pi)
        {
            if ($pi > $active[0])
            {
                $active = array($pi, $forumid);
            }
        }
    }

    if (!empty($active[1]))
    {
        $vbulletin->userinfo['active'] = array($vbulletin->forumcache[$active[1]], $active[0]);
    }
    else
    {
        $vbulletin->userinfo['active'] = false;
    }

    $exec_totalposts = str_replace(',', '', $totalposts);

    if ($exec_totalposts < 1)
    {
        $exec_totalposts = 1;
    }

    $vbulletin->userinfo['posts'] = vb_number_format($vbulletin->userinfo['posts']);
    $jointime = (TIMENOW - $vbulletin->userinfo['joindate']) / 86400;

    if ($jointime < 1)
    {
        $vbulletin->userinfo['postsperday'] = $vbulletin->userinfo['posts'];
    }
    else
    {
        $vbulletin->userinfo['postsperday'] = vb_number_format(str_replace(',', '', $vbulletin->userinfo['posts']) / $jointime, 2);
    }

    $vbulletin->userinfo['postpercent'] = vb_number_format(((str_replace(',', '', $vbulletin->userinfo['posts']) / $exec_totalposts ) * 100),2);

    $vbulletin->userinfo['newposts'] = $db->query_first("select count(*) as newposts from ".TABLE_PREFIX."post where dateline >= {$vbulletin->userinfo['lastvisit']} and visible = 1");
    $vbulletin->userinfo['newposts'] = vb_number_format($vbulletin->userinfo['newposts']['newposts']);

    $vbulletin->userinfo['newthreads'] = $db->query_first("select count(*) as newthreads from ".TABLE_PREFIX."thread where dateline >= {$vbulletin->userinfo['lastvisit']} and visible = 1 and sticky in(0,1)");
    $vbulletin->userinfo['newthreads'] = vb_number_format($vbulletin->userinfo['newthreads']['newthreads']);

    $vbulletin->userinfo['lastvisit'] = vbdate($vbulletin->options['timeformat'], $vbulletin->userinfo['lastvisit']) . ', ' . vbdate($vbulletin->options['dateformat'], $vbulletin->userinfo['lastvisit']);

    $exec_lastposts = $db->query_first("select count(*) as lastposts from ".TABLE_PREFIX."post where visible = 1 and dateline >= ".(TIMENOW - 86400));
    $exec_lastposts = vb_number_format($exec_lastposts['lastposts']);

    $vbulletin->templatecache['FORUMHOME'] = str_replace('$navbar','$navbar ' . $vbulletin->templatecache[forumhome_welcomepanel],$vbulletin->templatecache['FORUMHOME']);
}

  ]]> 
  </phpcode>
  </plugin> 
Reply With Quote
  #9  
Old 08-08-2006, 11:53 PM
KevNJ KevNJ is offline
 
Join Date: Jan 2005
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

K did that still have the error.. guess its not that. The listed above error says

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':47 PM, 08-08-2006 and visible = 1' at line 1

Which line 1 of what file though?
Reply With Quote
  #10  
Old 08-08-2006, 11:56 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm telling you, the problem is in that hook I posted above. Try disabling it. This is the line that is no good on your forums

PHP Code:
$vbulletin->userinfo['newposts'] = $db->query_first("select count(*) as newposts from ".TABLE_PREFIX."post where dateline >= {$vbulletin->userinfo['lastvisit']} and visible = 1"); 
Reply With Quote
Reply


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


All times are GMT. The time now is 12:36 AM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.