[Tool] phpBB 2.0.11 to phpBB 2.0.12 Code Changes

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
77
71%
Very Good
13
12%
Good
7
6%
Fair
4
4%
Poor
8
7%
 
Total votes: 109

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Thu Mar 10, 2005 11:49 pm

minstrel wrote: ... I can tell you that I am using IE6 and I'm not having problems downloading any files...

Then I wonder why I keep getting these errors? :?
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Re: using update_to_latest.php

Post by BlueRook » Fri Mar 11, 2005 1:34 am

Hamradioactive wrote: Blue Rook

I got it working but it stated that I needed to update in the Admin aera. Is that where I use the phpbb_2.0.11_to_2.0.13.txt and can I use EZMod to do this?
Thanks


I don't know much about EZ MOD but the changes to the admin area are pretty easy to do. Though if you ran the update through it already the I would imagine the admin updates were done arleady too -- unless you had further errors?

minstrel
Registered User
Posts: 93
Joined: Fri Mar 26, 2004 5:47 am
Location: Ottawa, Canada
Contact:

Post by minstrel » Fri Mar 11, 2005 3:39 am

The update MODS will work with the latest version of EZMOD. One advantage of doing it this way is it generates error messages if it encounters any and all changed files are automatically backed up.

Lcars85296
Registered User
Posts: 5
Joined: Fri Mar 11, 2005 7:48 am
Location: Arizona

Post by Lcars85296 » Fri Mar 11, 2005 8:01 am

I am currently running 2.0.11 and subtemplates mod. Can I skip the template.php update?

Update:

Code: Select all

#
#-----[ FIND ]---------------------------------------------
# Line 233
       		$filename = phpbb_realpath($this->root . '/' . $filename);

#
#-----[ REPLACE WITH ]---------------------------------------------
# 
       		$filename = ($rp_filename = phpbb_realpath($this->root . '/' . $filename)) ? $rp_filename : $filename;
Section of my template.php file that I am assuming is in the general area of the update. It was the only section that referred to -- phpbb_realpath($this->root --

Code: Select all

		// initiate the sub-template image pack that will be use
		$sub_template_key_image = POST_CAT_URL . '0';

		// Check if sub_templates are defined for this theme
		if ( $board_config['version'] > '.0.5' )
		{
			$sub_templates_cfg = @phpbb_realpath($this->root . '/sub_templates.cfg');
		}
		else
		{
			$sub_templates_cfg = $this->root . '/sub_templates.cfg';
		}
		@include($sub_templates_cfg);
		if ( isset($sub_templates) )
		{
			// search an id
Or do I need to modify somehow?

rick`
Registered User
Posts: 228
Joined: Wed Jun 02, 2004 5:09 am
Contact:

Post by rick` » Tue Mar 15, 2005 1:21 pm

problem w/ common.php

I was going through the update from 2.0.11 to 2.0.12 and it couldn't find the stuff which was mentioned in the 2.0.11 to 2.0.12. And I think I might not have upgraded to 2.0.11 but I swear I did, I honestly can't remember :(

Is that the most likely problem?

minstrel
Registered User
Posts: 93
Joined: Fri Mar 26, 2004 5:47 am
Location: Ottawa, Canada
Contact:

Post by minstrel » Tue Mar 15, 2005 2:44 pm

Download Version Checker here
MOD Name: [Tool] Version Checker
Author: battye
MOD Description: If unsure of the phpBB version you are running, you can easily check with this! Could be used in conjunction with the phpBB Code Changes.


MOD Version: 1.0.1
Installation Level: Easy
Installation Time: ~ 1 Minute

Download File: version_checker_1.0.1.zip
File Size: 1656 Bytes

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Wed Mar 16, 2005 2:07 am

That tool will only tell you if you forgot to run the update_to_latest.php or if you haven't done the upgrade at all.

If you went through the upgrade process and ran the update script then the only way to really check to see if you are really upgraded is to go through the changes (using the upgrade MOD) and making sure all the new lines are there and not the old ones.

Though I guess you could build a script to do that for you and return all the lines that it couldn't find.

minstrel
Registered User
Posts: 93
Joined: Fri Mar 26, 2004 5:47 am
Location: Ottawa, Canada
Contact:

Post by minstrel » Wed Mar 16, 2005 4:06 am

Bluerook, I think the OP (rick) was saying he couldn't do the update because he couldn't find the text to change -- hence he wonders what version he actually has installed.

My reply was to tell him how to determine what version he has currently so he can figure out why the update isn't working for him.

BlueRook
Registered User
Posts: 2892
Joined: Wed Mar 10, 2004 2:38 am

Post by BlueRook » Wed Mar 16, 2005 4:20 am

I understood. That's why the only real way to check is to see if most or all of the updates exist in the codebase the user has. Assuming that the update script wasn't ran most recently then yes, knowing the version would let you know if the changes had already been made.

kevinm94
Registered User
Posts: 11
Joined: Thu Sep 23, 2004 10:48 pm

Post by kevinm94 » Thu Mar 17, 2005 5:12 pm

I dont seem to have this first find code listed in my commom.php file.
#-----[ FIND ]---------------------------------------------
# Line 92
unset($input['input']);

while (list($var,) = @each($input))
{
unset($$var);
}

#
#-----[ REPLACE WITH ]---------------------------------------------
#
unset($input['input']);
unset($input['not_unset']);

while (list($var,) = @each($input))
{
if (!in_array($var, $not_unset))
{
unset($$var);
}
}



Here is what I have in common.php so far...
<?php
/***************************************************************************
* common.php
* -------------------
* begin : Saturday, Feb 23, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: common.php,v 1.74.2.13 2004/07/15 18:00:34 acydburn Exp $
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}

//
function unset_vars(&$var)
{
while (list($var_name, $null) = @each($var))
{
unset($GLOBALS[$var_name]);
}
return;
}

//
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

$ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var';

// Unset globally registered vars - PHP5 ... hhmmm
if (@$ini_val('register_globals') == '1' || strtolower(@$ini_val('register_globals')) == 'on')
{
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');

$var_prefix = 'HTTP';
$var_suffix = '_VARS';

$test = array('HTTP_GET_VARS' => NULL, 'HTTP_POST_VARS' => NULL, 'HTTP_COOKIE_VARS' => NULL, 'HTTP_SERVER_VARS' => NULL, 'HTTP_ENV_VARS' => NULL, 'HTTP_POST_FILES' => NULL, 'phpEx' => NULL, 'phpbb_root_path' => NULL);

foreach ($test as $var)
{
if (is_array(${$var_prefix . $var . $var_suffix}))
{
unset_vars(${$var_prefix . $var . $var_suffix});
@reset(${$var_prefix . $var . $var_suffix});
}

if (is_array(${$var}))
{
unset_vars(${$var});
@reset(${$var});
}
}

if (is_array(${'_FILES'}))
{
unset_vars(${'_FILES'});
@reset(${'_FILES'});
}

if (is_array(${'HTTP_POST_FILES'}))
{
unset_vars(${'HTTP_POST_FILES'});
@reset(${'HTTP_POST_FILES'});
}
}

// PHP5 with register_long_arrays off?
if (!isset($HTTP_POST_VARS) && isset($_POST))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
}

//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
if( is_array($HTTP_GET_VARS) )
{
while( list($k, $v) = each($HTTP_GET_VARS) )
{
if( is_array($HTTP_GET_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
{
$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_GET_VARS[$k]);
}
else
{
$HTTP_GET_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_GET_VARS);
}

if( is_array($HTTP_POST_VARS) )
{
while( list($k, $v) = each($HTTP_POST_VARS) )
{
if( is_array($HTTP_POST_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
{
$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_POST_VARS[$k]);
}
else
{
$HTTP_POST_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_POST_VARS);
}

if( is_array($HTTP_COOKIE_VARS) )
{
while( list($k, $v) = each($HTTP_COOKIE_VARS) )
{
if( is_array($HTTP_COOKIE_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
{
$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_COOKIE_VARS[$k]);
}
else
{
$HTTP_COOKIE_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_COOKIE_VARS);
}
}

//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$gen_simple_header = FALSE;

include($phpbb_root_path . 'config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
header("Location: install/install.$phpEx");
exit;
}

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);

//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$user_ip = encode_ip($client_ip);

//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}

if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}

//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

?>


any ideas??? Im going from 11 to 12 and have many mods installed...

HELP !!!

Thanks
KevinM

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Thu Mar 17, 2005 6:39 pm

It looks like the file has been heavily modded. I would recommend you do a search for the term "unset" and compare the [ FIND ] section to your code. If you find something similar, that's probably the right area. Then you just have to interpret the [ REPLACE WITH ] section to match the form of your currently modded file.

I've had to do a few like this. It's a right pain but, so far, I've managed to get everything to work.
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

kevinm94
Registered User
Posts: 11
Joined: Thu Sep 23, 2004 10:48 pm

Post by kevinm94 » Thu Mar 17, 2005 8:26 pm

Thanks, I'll give that a try...

GameQber
Registered User
Posts: 36
Joined: Mon Apr 26, 2004 12:17 am
Location: New England
Contact:

Post by GameQber » Fri Mar 18, 2005 5:34 pm

Every page of my phpBB board is blank, or sometimes it doesn't even load. It will just say "Opening page" in the status bar, but never loads anything, nor does it time out. I went and double-checked all of my edits, and everything looks right, but no luck with the boards. I'm in the process of changing the files back to ver. 2.0.11.

I'd appreciate any help. Thanks. :)


Also: I'm running on php version 4.3.10

GameQber
Registered User
Posts: 36
Joined: Mon Apr 26, 2004 12:17 am
Location: New England
Contact:

Post by GameQber » Fri Mar 18, 2005 6:07 pm

GameQber wrote: Every page of my phpBB board is blank, or sometimes it doesn't even load. It will just say "Opening page" in the status bar, but never loads anything, nor does it time out. I went and double-checked all of my edits, and everything looks right, but no luck with the boards. I'm in the process of changing the files back to ver. 2.0.11.

I'd appreciate any help. Thanks. :)


Also: I'm running on php version 4.3.10


OMG >.<

Nevermind, there was an extra line after the closing ?> at the end of lang_main.php that screwed up the whole forum. I hate how CPanel randomly puts an extra line there when you edit the files.
Thanks, anyway. :/

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Fri Mar 18, 2005 8:12 pm

I use MetaPad or NotePad to edit local copies and then upload the modified files ...
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

Post Reply

Return to “[2.0.x] MOD Database Releases”