vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   someone able to help ? (https://vborg.vbsupport.ru/showthread.php?t=123445)

KevNJ 08-08-2006 11:42 PM

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 PM08-08-2006 and visible 1;
MySQL Error  You have an error in your SQL syntaxcheck 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         
TuesdayAugust 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

Paul M 08-09-2006 12:18 AM

'forumhome_welcomepanel' is not a standard vbulletin template, it must belong to some modification you have installed.

KevNJ 08-09-2006 12:22 AM

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.

Paul M 08-09-2006 12:26 AM

The I suggest you either disable them, or uninstall them (via the Product Manager).

KevNJ 08-09-2006 12:32 AM

I tried that. Still not working. thats why I came here. Sorry guess I should have mentioned htat in my first post.

paul41598 08-09-2006 12:37 AM

Why dont you try reverting that template...thus deleting it

KevNJ 08-09-2006 12:43 AM

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.

paul41598 08-09-2006 12:47 AM

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'] > && $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']) / $jointime2);
    }

    
$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


KevNJ 08-09-2006 12:53 AM

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?

paul41598 08-09-2006 12:56 AM

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"); 



All times are GMT. The time now is 07: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.01774 seconds
  • Memory Usage 1,797KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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