Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Upgrade from 2.3.0 to 2.3.2 VIA code changes Details »»
Upgrade from 2.3.0 to 2.3.2 VIA code changes
Version: 1.00, by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 09-18-2003 Last Update: Never Installs: 5
 
No support by the author.

This hack will allow you to upgrade your board from 2.3.0 to 2.3.2 by using code changes instead of over writing the files.


I will try and help support this hack, if you run into any problems come here and ask for help.


Notice: You still need to run upgrade.php!!

Be Sure to backup your files and database before applying the changes!

I take no responsobility for any damages!

This hack is ONLY for vBulletin 2.3.0!

There may be some mistakes in the file edits if you find any let me know ASAP so I can update the hack.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 09-25-2003, 08:53 PM
Hostc
Guest
 
Posts: n/a
Default

Give me a bit, will update it.
Reply With Quote
  #33  
Old 09-25-2003, 09:23 PM
iggy123's Avatar
iggy123 iggy123 is offline
 
Join Date: Jan 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hostc
Give me a bit, will update it.

Ok thnx
Reply With Quote
  #34  
Old 09-25-2003, 09:36 PM
cirisme cirisme is offline
 
Join Date: Jan 2003
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hostc
I will be doing one for that version too soon enough.
Really?

[high]* cirisme can't wait...[/high]
Reply With Quote
  #35  
Old 09-25-2003, 09:55 PM
Hostc
Guest
 
Posts: n/a
Default

Jiggy,


To fix your poll problem.

in POLL.PHP

Find:

Code:
 // don't do this any more - see http://www.vbulletin.com/forum/showthread.php?t=77713
	  //$foruminfo=getforuminfo($threadinfo['forumid']);
	  //$DB_site->query("UPDATE forum SET lastpost=$ourtimenow WHERE forumid IN ($foruminfo[parentlist])");
And Remove that. Thats fixed.


NOW For the rest of the updates:

OPEN ROOT\MEMBER2.PHP
FIND:

PHP Code:
 makeforumjump(); 
REPLACE THE CODE BELOW IT WITH:


PHP Code:
 // set default value for $daysprune
    
if (empty($daysprune) OR $daysprune 1) {
     
$daysprune 30;
  } 

(Updated coding in showthread.php)

FIND AND REMOVE:
PHP Code:
$perpage intval($perpage); 
FIND AND REMOVE: (First instance)
PHP Code:
if ($getpagenum[posts]%$perpage==0) {
      
$pagenumber=$getpagenum[posts]/$perpage;
    } else {
      
$pagenumber=intval($getpagenum[posts]/$perpage)+1;
    } 
FIND:
PHP Code:
 if ($getpagenum[posts]%$perpage==0) {
      
$pagenumber=$getpagenum[posts]/$perpage;
    } else {
      
$pagenumber=intval($getpagenum[posts]/$perpage)+1;
    } 
REPLACE WITH:
PHP Code:
 }
  if (
$bbuserinfo['maxposts']!=-and $bbuserinfo['maxposts']!=and $bbuserinfo['maxposts'] <= $newmaxposts) {
   
sanitize_pageresults($getpagenum[posts], $pagenumber$perpage$newmaxposts$bbuserinfo['maxposts']);
  } else {
    
sanitize_pageresults($getpagenum[posts], $pagenumber$perpage$newmaxposts$maxposts);
  }
  
$pagenumber ceil($getpagenum['posts']/$perpage); 
Reply With Quote
  #36  
Old 09-25-2003, 10:58 PM
iggy123's Avatar
iggy123 iggy123 is offline
 
Join Date: Jan 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]="&nbsp;";
      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?
Reply With Quote
  #37  
Old 09-25-2003, 11:53 PM
Hostc
Guest
 
Posts: n/a
Default

You need to check the vBwar hack and find the file edit that contains edits for functions.php and see what has changed.


in poll.php

Find:
PHP Code:
       $DB_site->query("UPDATE thread SET lastpost=$ourtimenow WHERE threadid=$threadinfo[threadid]"); 
Below that add

PHP Code:
  $DB_site->query("UPDATE forum SET lastpost=$ourtimenow WHERE forumid IN ($foruminfo[parentlist])"); 

Ok, for MEMBER2.php


Find:

PHP Code:
  makeforumjump();
  
// set defaults
  
$perpage intval($perpage);
  if (
$perpage==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;
  if (!isset(
$daysprune) or $daysprune==or $daysprune==-1) {
    
$daysprune=30;
  } 
Replace with:

PHP Code:
     makeforumjump(); 
    
// set default value for $daysprune
    
if (empty($daysprune) OR $daysprune 1) {
     
$daysprune 30;
  } 
Reply With Quote
  #38  
Old 09-26-2003, 08:03 AM
iggy123's Avatar
iggy123 iggy123 is offline
 
Join Date: Jan 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope that didn't work. Sorry but i have had to revert back to my old forums - I am sure that this hack works, everything else apart from the poll and the wars did so I assume that it was due to the vbwars hack that it failed.
I will ask in that thread if there is any solution and then i will redo your hack.
Thanks for your help in trying to fix it though.
Reply With Quote
  #39  
Old 09-26-2003, 06:22 PM
Hostc
Guest
 
Posts: n/a
Default

Hmm, did you try uninstalling vbwar on 2.3.0 then try reupgrading? Then reinstall vbwar?
Reply With Quote
  #40  
Old 09-27-2003, 04:35 AM
Airs's Avatar
Airs Airs is offline
 
Join Date: Oct 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you get by upgrading to 2.3.2 this way? if anyone can say ><
Reply With Quote
  #41  
Old 09-27-2003, 06:20 AM
Airs's Avatar
Airs Airs is offline
 
Join Date: Oct 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed and get these errors
Invalid SQL: SELECT *
FROM user,userfield
WHERE 1=1 AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
ORDER BY username ASC
LIMIT 0,
mysql error: You have an error in your SQL syntax near '' at line 7

mysql error number: 1064


And


Invalid SQL:
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,style.title AS styletitle,user.*,userfield.*,icon.title as icontitle,icon.iconpath,
attachment.attachmentid,attachment.filename,attach ment.visible AS attachmentvisible,attachment.counter,LENGTH(attach ment.filedata)/1024 AS attachsize
,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline
FROM post
LEFT JOIN icon ON icon.iconid=post.iconid
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
LEFT JOIN style ON style.styleid = user.styleid
WHERE post.threadid='1342'
ORDER BY dateline LIMIT 0,

mysql error: You have an error in your SQL syntax near '' at line 16

mysql error number: 1064
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 04:57 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08984 seconds
  • Memory Usage 2,348KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (10)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete