phpBBHacks.com - phpBB 2.0.15 to 2.0.16 Code Changes
Find affordable web hosting packages at iFroggy Hosting
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Fixes and Code Changes
 See a User Guidelines violation? Please contact us.
Author Message

Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA

PostPosted: June 28th 2005, 5:51 pm    Post subject: phpBB 2.0.15 to 2.0.16 Code Changes Reply with quote

TXT Version.
HTML Version.

These are the code changes introduced between phpBB 2.0.15 and phpBB 2.0.16. If you have installed many hacks on a forum, but wish to update it, these may help you. It is often easier to apply code changes such as these instead of replacing and rehacking your current files.

These code changes use the following instruction labels:
filename - The name of a file to be edited. Equivalent to an OPEN action in a hack or modification.
FIND - This indicates lines of code you should locate. Changes will be made in reference to this code.
REPLACE WITH - This code should completely replace the code in the preceding FIND instruction.
AFTER, ADD - The code in this instruction should be added on a new line after the last line of code in the preceding FIND instruction.

Once you have completed the code changes, create an install/ directory in your forum's root directory and upload the update_to_latest.php file that comes in any phpBB 2.0.16 download to the install/ directory. Run update_to_latest.php by opening it via your web browser, just as you would a normal forum page. Afterward, delete the file and the install/ directory so that your forum is accessible again.

Now, onward to the file changes!
Back to top
View user's profile Send private message Visit poster's website

Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA

PostPosted: June 28th 2005, 6:01 pm    Post subject: Reply with quote

admin/admin_ug_auth.php
FIND
Code:
   @reset($auth_user);

REPLACE WITH
Code:
//   @reset($auth_user);



admin/pagestart.php

Some users may have already made these changes, or possibly removed the affected lines from your files, due to problems in accessing the admin panel.

FIND
Code:
   redirect(append_sid("login.$phpEx?redirect=admin/", true));

REPLACE WITH
Code:
   redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx", true));

FIND
Code:
   redirect(append_sid("login.$phpEx?redirect=admin/&admin=1", true));

REPLACE WITH
Code:
   redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1", true));



includes/bbcode.php
FIND
Code:
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i";


REPLACE WITH
Code:
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";



includes/usercp_avatar.php
FIND
Code:
   if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )

REPLACE WITH
Code:
   if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )



includes/usercp_register.php
FIND
Code:
      $avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
   }

   if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] )

REPLACE WITH
Code:
      $avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
   }
   else
   if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] )



modcp.php
FIND
Code:
         $new_forum_id = intval($HTTP_POST_VARS['new_forum']);
         $old_forum_id = $forum_id;

AFTER, ADD
Code:
         $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
            WHERE forum_id = ' . $new_forum_id;
         if ( !($result = $db->sql_query($sql)) )
         {
            message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
         }
         
         if (!$db->sql_fetchrow($result))
         {
            message_die(GENERAL_MESSAGE, 'New forum does not exist');
         }

         $db->sql_freeresult($result);

FIND
Code:
            $new_forum_id = intval($HTTP_POST_VARS['new_forum_id']);
            $topic_time = time();

AFTER, ADD
Code:
            $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
               WHERE forum_id = ' . $new_forum_id;
            if ( !($result = $db->sql_query($sql)) )
            {
               message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
            }
         
            if (!$db->sql_fetchrow($result))
            {
               message_die(GENERAL_MESSAGE, 'New forum does not exist');
            }

            $db->sql_freeresult($result);



viewtopic.php
FIND
Code:
      $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));

REPLACE WITH
Code:
      $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));

_________________
Fringes of Algo - Phantasy Star Community
TV Blitz Forums - Television Discussion Community
phpBB Smith: Modifications

70+ Listings @ phpBBHacks.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Fixes and Code Changes All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.