View Full Version : someone able to help ?
KevNJ
08-08-2006, 11:42 PM
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:
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
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:
<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>
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
$vbulletin->userinfo['newposts'] = $db->query_first("select count(*) as newposts from ".TABLE_PREFIX."post where dateline >= {$vbulletin->userinfo['lastvisit']} and visible = 1");
KevNJ
08-09-2006, 12:58 AM
whoops didnt see your code at first... lemme try now..
forum_welcomepanel and forumhome_comeplete no longer exist.. still the problem..... how do i delete the hook?
paul41598
08-09-2006, 01:09 AM
AdminCP --> Plugin System --> Plugin Manager, look for forumhome_complete there, with the same title as your hack is called. Just disable it or delete it.
I gotta jet. Good luck, let me know
KevNJ
08-09-2006, 01:12 AM
That worked!! there was 4 of them. guess i didnt think the install worked and installed it over and over.. thanks man!
this place needs a "rep" system for people who help others.... just like the "installed" system
thanks again!
paul41598
08-09-2006, 09:22 AM
That worked!! there was 4 of them. guess i didnt think the install worked and installed it over and over.. thanks man!
this place needs a "rep" system for people who help others.... just like the "installed" system
thanks again!
Nice, glad it worked :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.