Nope - the poll.php is still not working.... I get the error message
Code:
Database error in vBulletin 2.3.2:
Invalid SQL: UPDATE forum SET lastpost=1064534122 WHERE forumid IN ()
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 ')' at line 1
also you are still not very clear about what should be replaced in the member2.php...
you say
Quote:
find makeforumjump(); and REPLACE THE CODE BELOW IT WITH:
|
well below it i have...
Code:
// set defaults
$perpage = intval($perpage);
if ($perpage==0 or $perpage>200) { //max of 200, per several users requests
$perpage=$maxthreads;
}
$pagenumber = intval($pagenumber);
if (!isset($pagenumber) or $pagenumber==0) {
$pagenumber=1;
}
// display threads
$limitlower=($pagenumber-1)*$perpage+1;
$limitupper=($pagenumber)*$perpage;
// set default value for $daysprune
if (empty($daysprune) OR $daysprune < 1) {
$daysprune = 30;
}
// look at thread limiting options
$datecut='';
unset ($daysprunesel);
if ($daysprune!=1000) {
$datecut="AND lastpost >= ".(time() - ($daysprune*86400));
}
$daysprunesel[$daysprune]="selected";
if (trim($bbuserinfo[ignorelist])!="") {
$ignoreusers="AND thread.postuserid<>".implode(" AND thread.postuserid<>",explode(" ",trim($bbuserinfo[ignorelist])));
} else {
$ignoreusers="";
}
$threadscount=$DB_site->query_first("SELECT COUNT(*) AS threads
FROM thread,subscribethread
WHERE subscribethread.threadid=thread.threadid
AND subscribethread.userid='$bbuserinfo[userid]'
AND thread.visible=1 $datecut $ignoreusers");
$totalallthreads=$threadscount[threads];
sanitize_pageresults($totalallthreads, $pagenumber, $perpage, 200, $maxthreads);
// display threads
$limitlower=($pagenumber-1)*$perpage+1;
$limitupper=($pagenumber)*$perpage;
if ($limitupper>$totalallthreads) {
$limitupper=$totalallthreads;
if ($limitlower>$totalallthreads) {
$limitlower=$totalallthreads-$perpage;
}
}
if ($limitlower<=0) {
$limitlower=1;
}
if ($showdots and $bbuserinfo[userid] >= 1) {
$dotuserid = "DISTINCT post.userid,";
$dotjoin = "LEFT JOIN post ON (thread.threadid = post.threadid AND post.userid = '$bbuserinfo[userid]' AND post.visible = 1)";
} else {
$dotuserid = "";
$dojoin = "";
}
$getthreadids=$DB_site->query("SELECT thread.threadid
FROM thread,subscribethread
WHERE subscribethread.threadid=thread.threadid
AND subscribethread.userid='$bbuserinfo[userid]'
AND thread.visible=1 $datecut $ignoreusers
ORDER BY lastpost DESC
LIMIT ".($limitlower-1).",$perpage
");
$totalthreads=$DB_site->num_rows($getthreadids);
if ($totalthreads>0) {
// check to see if there are any threads to display. If there are, do so, otherwise, show message
$threadids="thread.threadid IN (0";
while ($thread=$DB_site->fetch_array($getthreadids)) {
$threadids.=",".$thread[threadid];
}
$threadids.=")";
$threads=$DB_site->query("SELECT $dotuserid icon.title as icontitle,icon.iconpath,thread.threadid,thread.title,
lastpost,forumid,pollid,open,replycount,postusername,postuserid,lastposter,thread.dateline,views,
thread.iconid,notes,thread.visible
FROM thread
LEFT JOIN icon ON (icon.iconid = thread.iconid)
$dotjoin
WHERE $threadids
ORDER BY lastpost DESC");
$pagenumbers = '';
$threadbits = '';
while ($thread=$DB_site->fetch_array($threads)) {
if (($bbuserinfo[maxposts] != -1) and ($bbuserinfo[maxposts] != 0))
{ $maxposts = $bbuserinfo[maxposts]; }
if (($thread[replycount]+1)>$maxposts and $linktopages) {
$totalpages=($thread[replycount]+1)/$maxposts;
if ($totalpages!=intval($totalpages)) {
$totalpages=intval($totalpages)+1;
}
$acurpage=0;
$pagenumbers="";
while ($acurpage++<$totalpages) {
if ($acurpage==$maxmultipage) {
eval("\$pagenumbers .= \"".gettemplate("forumdisplay_multipagenav_more")."\";");
break;
} else {
eval("\$pagenumbers .= \"".gettemplate("forumdisplay_multipagenav_pagenumber")."\";");
}
}
eval("\$thread[pagenav] = \"".gettemplate("forumdisplay_multipagenav")."\";");
} else {
$thread[pagenav]="";
}
$thread[icon]=" ";
if ($thread[iconid]!=0)
{
$thread[icon]="<img src=\"$thread[iconpath]\" alt=\"$thread[icontitle]\" width=\"15\" height=\"15\" border=\"0\">";
}
if ($thread[pollid]!=0) {
$thread[icon]="<img src=\"{imagesfolder}/poll.gif\" alt=\"Poll\" width=\"15\" height=\"15\" border=\"0\">";
}
if ($wordwrap!=0) {
$thread[title]=dowordwrap($thread[title]);
}
$replies=$thread[replycount];
$views=$thread[views];
$thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]);
$thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]);
$thread[gotonew]="";
$thread[newoldhot]="folder";
if (!$thread[open]) {
$thread[newoldhot]="lock".$thread[newoldhot];
}
if ($thread[replycount]>=$hotnumberposts or $thread[views]>=$hotnumberviews and $usehotthreads) {
$thread[newoldhot]="hot".$thread[newoldhot];
}
if ($bbuserinfo[lastvisitdate]=="Never") {
$thread[newoldhot]="new".$thread[newoldhot];
} elseif ($thread[lastpost]>$bbuserinfo[lastvisit]) {
if (get_bbarraycookie('threadview', $thread['threadid']) < $thread['lastpost']) {
$thread[newoldhot]="new".$thread[newoldhot];
}
eval("\$thread[gotonew] = \"".gettemplate("forumdisplay_gotonew")."\";");
}
if ($showdots and $bbuserinfo[userid] >= 1 and $bbuserinfo[userid] == $thread[userid]) {
$thread[newoldhot] = "dot_" . $thread[newoldhot];
}
eval("\$threadbits .= \"".gettemplate("subscribe_threadbit")."\";");
}
$DB_site->free_result($threads);
$pagenav = getpagenav($totalallthreads,"member2.php?s=$session[sessionhash]&action=viewsubscription&daysprune=$daysprune&perpage=$perpage");
eval("\$threadslist = \"".gettemplate("subscribe_threads")."\";");
} else {
eval("\$threadslist = \"".gettemplate("subscribe_nothreads")."\";");
}
// draw cp nav bar
$cpnav[1]="{secondaltcolor}";
$cpnav[2]="{secondaltcolor}";
$cpnav[3]="{secondaltcolor}";
$cpnav[4]="{secondaltcolor}";
$cpnav[5]="{secondaltcolor}";
$cpnav[6]="{secondaltcolor}";
$cpnav[7]="{secondaltcolor}";
$cpmenu[8]="class=\"fjsel\" selected";
eval("\$cpnav = \"".gettemplate("usercpnav")."\";");
eval("dooutput(\"".gettemplate("subscribe")."\");");
}
?>
which is a hell of a lot of code to work...
another issue i have - and its making me more and more tempted to remove this and restore my forums to the way they were before - is that when i try to lauch the hack vbwar i get an error in the functions.php
Code:
Warning: Division by zero in /home/unklem/public_html/forums/admin/functions.php on line 794
which is part of logicans hack - but when i uninstall that hack the page is just blank... any ideas before i resort back to my old site?