phpBB

Development Wiki

Difference between revisions of "PhpBB3.1"

From phpBB Development Wiki

(The Permissions Removed PR was never merged and needs to be reworked.)
(Update the list of deprecated/changed functions)
Line 55: Line 55:
 
* <code>phpBB/includes/functions_display.php</code>
 
* <code>phpBB/includes/functions_display.php</code>
 
** Function <code>topic_generate_pagination($replies, $url)</code> was removed. Use <code>phpbb_generate_template_pagination($template, $base_url, $block_var_name, $num_items, $per_page, $start_item = 1, $reverse_count = false, $ignore_on_page = false)</code> instead. See  [http://tracker.phpbb.com/browse/PHPBB3-10968 PHPBB3-10968].
 
** Function <code>topic_generate_pagination($replies, $url)</code> was removed. Use <code>phpbb_generate_template_pagination($template, $base_url, $block_var_name, $num_items, $per_page, $start_item = 1, $reverse_count = false, $ignore_on_page = false)</code> instead. See  [http://tracker.phpbb.com/browse/PHPBB3-10968 PHPBB3-10968].
 +
 +
* <code>phpBB/includes/functions_convert.php</code>
 +
** Function <code>gen_email_hash($email)</code> has been deprecated. Use <code>phpbb_email_hash($email)</code> instead.
 +
 +
* <code>phpBB/includes/functions_admin.php</code>
 +
** Function <code>cache_moderators()</code> has been deprecated. Use <code>phpbb_cache_moderators($db, $cache, $auth)</code> instead.
 +
 +
* <code>phpBB/includes/functions_admin.php</code>
 +
** Function <code>update_foes($group_id = false, $user_id = false)</code> has been deprecated. Use <code>phpbb_update_foes($db, $auth, $group_id, $user_id)</code> instead.
 +
 +
* <code>phpBB/includes/functions_compatability.php</code>
 +
** Function <code>get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)</code> has been deprecated. <code>Use phpbb_get_avatar($row, $alt, $ignore_config)</code> instead.
 +
 +
* <code>phpBB/includes/functions_compatability.php</code>
 +
** Function <code>phpbb_hash($password)</code> has been deprecated. Use <code>$passwords_manager->hash($password)</code> instead.
 +
 +
* <code>phpBB/includes/functions_compatability.php</code>
 +
** Function <code>phpbb_check_hash($password, $hash)</code> has been deprecated. Use <code>$passwords_manager->check($password, $hash)</code> instead.
 +
 +
* <code>phpBB/includes/functions_compatability.php</code>
 +
** Function <code>phpbb_clean_path($path)</code> has been deprecated. Use <code>$phpbb_path_helper->clean_path($path)</code> instead. See [http://tracker.phpbb.com/browse/PHPBB3-12250 PHPBB3-12250].
 +
 +
* <code>phpBB/includes/functions.php</code>
 +
** Function <code>set_config()</code> has been deprecated. Use <code>$config->set($key, $value, $cache = true)</code> instead. See [http://tracker.phpbb.com/browse/PHPBB3-9988 PHPBB3-9988].
 +
 +
* <code>phpBB/includes/functions.php</code>
 +
** Function <code>request_var()</code> has been deprecated. Use <code>$request->variable()</code> instead. See [http://tracker.phpbb.com/browse/PHPBB3-9716 PHPBB3-9716].
 +
 +
* <code>phpBB/includes/functions.php</code>
 +
** Function <code>set_config_count()</code> has been deprecated. Use <code>$config->increment()</code> instead.
 +
 +
* <code>phpBB/includes/functions.php</code>
 +
** Function <code>tz_select($default = '', $truncate = false)</code> has been deprecated. Use <code>phpbb_timezone_select($user, $default, $truncate)</code> instead.
 +
 +
* <code>phpBB/includes/functions.php</code>
 +
** Function <code>add_log()</code> has been deprecated. Use <code>$phpbb_log->add()</code> instead. See [http://tracker.phpbb.com/browse/PHPBB3-10714 PHPBB3-10714].

Revision as of 21:14, 15 March 2014

phpBB 3.1, codename Ascraeus, is the next major feature release in the phpBB 3.x line.

Requirements

Most of the system requirements are the same as 3.0.x. The most notable change is that PHP >= 5.3.3 is now required. Newer versions of PostgreSQL, SQLite, and MySQL are pending discussion[1].

Request for Comments

The set of features that were proposed for phpBB 3.1 can be found here: Request for Comments

Composer

In order to use phpBB 3.1 in development, you need to run Composer[2] from within the phpBB directory. This will install some external PHP library dependencies. See the README[3] "installing dependencies" section for more instructions.

Moving from 3.0 to 3.1

Styles and template engine changes 3.1

If you replace the files of your style with 3.1 compatible ones, before running the database update from 3.0 to 3.1, these styles will stay installed.

Template Engine Changes in 3.1

Working with the new config class

The new config class

Search Backends

Search backend classes must follow the new naming convention so a backend in includes/search/foobar.php has to contain a class called phpbb_search_foobar and must implement a get_name() method returning the name to be displayed in the ACP.

phpbb_ Class Prefix

Some classes have been renamed to avoid conflicts with other software. If you are referencing the name of any of these classes, you will have to change them:

  • session => phpbb_session
  • user => phpbb_user
  • auth => phpbb_auth

Dependency Injection Container

The service objects are now created and managed by the Dependency Injection Container.

JavaScript onload_functions changed

The onload_functions array allows calling certain JavaScript functions on page load. It used to take a string to be evaluated, now it takes the actual JavaScript function.

Before:

onload_functions.push('do_something()');

After:

onload_functions.push(do_something);

Changes to Functions

  • phpBB/includes/functions_install.php
    • The array returned by get_available_dbms() no longer contains COMMENTS keys. See PHPBB3-10969.
    • Function remove_remarks(&$sql) was removed. Use phpbb_remove_comments($input) instead. See PHPBB3-10969.
  • phpBB/includes/functions_admin.php
    • Function remove_comments(&$output) was removed. Use phpbb_remove_comments($input) from phpBB/includes/functions_install.php instead. See PHPBB3-10969.
  • phpBB/includes/functions.php
    • Function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = ) was removed. Use phpbb_generate_template_pagination($template, $base_url, $block_var_name, $num_items, $per_page, $start_item = 1, $reverse_count = false, $ignore_on_page = false) instead. See PHPBB3-10968.
    • Function on_page($num_items, $per_page, $start) was removed. Use phpbb_on_page($template, $user, $num_items, $per_page, $start) instead.
  • phpBB/includes/functions_display.php
    • Function topic_generate_pagination($replies, $url) was removed. Use phpbb_generate_template_pagination($template, $base_url, $block_var_name, $num_items, $per_page, $start_item = 1, $reverse_count = false, $ignore_on_page = false) instead. See PHPBB3-10968.
  • phpBB/includes/functions_convert.php
    • Function gen_email_hash($email) has been deprecated. Use phpbb_email_hash($email) instead.
  • phpBB/includes/functions_admin.php
    • Function cache_moderators() has been deprecated. Use phpbb_cache_moderators($db, $cache, $auth) instead.
  • phpBB/includes/functions_admin.php
    • Function update_foes($group_id = false, $user_id = false) has been deprecated. Use phpbb_update_foes($db, $auth, $group_id, $user_id) instead.
  • phpBB/includes/functions_compatability.php
    • Function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false) has been deprecated. Use phpbb_get_avatar($row, $alt, $ignore_config) instead.
  • phpBB/includes/functions_compatability.php
    • Function phpbb_hash($password) has been deprecated. Use $passwords_manager->hash($password) instead.
  • phpBB/includes/functions_compatability.php
    • Function phpbb_check_hash($password, $hash) has been deprecated. Use $passwords_manager->check($password, $hash) instead.
  • phpBB/includes/functions_compatability.php
    • Function phpbb_clean_path($path) has been deprecated. Use $phpbb_path_helper->clean_path($path) instead. See PHPBB3-12250.
  • phpBB/includes/functions.php
    • Function set_config() has been deprecated. Use $config->set($key, $value, $cache = true) instead. See PHPBB3-9988.
  • phpBB/includes/functions.php
    • Function request_var() has been deprecated. Use $request->variable() instead. See PHPBB3-9716.
  • phpBB/includes/functions.php
    • Function set_config_count() has been deprecated. Use $config->increment() instead.
  • phpBB/includes/functions.php
    • Function tz_select($default = , $truncate = false) has been deprecated. Use phpbb_timezone_select($user, $default, $truncate) instead.
  • phpBB/includes/functions.php
    • Function add_log() has been deprecated. Use $phpbb_log->add() instead. See PHPBB3-10714.