phpBB3


Functions


Function Summary
void

_import_check(mixed config_var, mixed source, mixed use_target)

void

add_bots()

Add the search bots into the database This code should be used in execute_last if the source database did not have bots If you are converting bots this function should not be called

void

add_default_groups()

Add any of the pre-defined "special" groups which are missing from the database

void

add_user_group(mixed group_id, mixed user_id, bool group_leader)

Adds a user to the specified group and optionally makes them a group leader This function does not create the group if it does not exist and so should only be called after the groups have been created

void

adjust_language_keys_callback(mixed matches)

For replacing {L_*} strings with preg_replace_callback

void

attachment_forum_perms(mixed forum_id)

int

auto_id(int pad)

Generate a key value based on existing values

void

base64_unpack(mixed string)

void

can_load_dll(mixed dll)

Determine if we are able to load a specified PHP module and do so if possible

void

compare_table(mixed tables, mixed tablename, mixed prefixes)

void

connect_check_db(array dbms, mixed error_connect, mixed error, mixed dbms_details, mixed table_prefix, mixed dbhost, mixed dbuser, mixed dbpasswd, mixed dbname, mixed dbport, bool prefix_may_exist, bool load_dbal, bool unicode_check)

Used to test whether we are able to connect to the database the user has specified and identify any problems (eg there are already tables with the names we want to use

void

convert_bbcode(mixed message, bool convert_size, bool extended_bbcodes)

void

copy_dir(mixed src, mixed trg, bool copy_subdirs, bool overwrite, bool die_on_failure, bool source_relative_path)

static void

copy_file(mixed src, mixed trg, bool overwrite, bool die_on_failure, bool source_relative_path)

void

days_to_seconds(mixed days)

Convert a value from days to seconds

void

dbms_select(str default, bool only_20x_options)

Generate the drop down of available database options

void

decode_ban_ip(mixed int_ip)

Reverse the encoding of wild-carded bans

static void

decode_ip(mixed int_ip)

Convert an IP address from the hexadecimal notation to normal dotted-quad notation

void

extract_variables_from_file(mixed _filename)

Extract the variables defined in a configuration file

static void

fill_dateformat(mixed user_dateformat)

void

fix_empty_primary_groups()

Ensure that all users have a default group specified and update related information such as their colour

void

gen_email_hash(mixed email)

Generate the email hash stored in the users tableNote: Deprecated, calls should directly go to phpbb_email_hash()

void

get_available_dbms(bool dbms, bool return_unavailable, bool only_20x_options)

Returns an array of available DBMS with some data, if a DBMS is specified it will only return data for that DBMS and will load its extension if necessary.

void

get_avatar_dim(mixed src, mixed axis, bool func, bool arg1, bool arg2)

void

get_avatar_height(mixed src, bool func, bool arg1, bool arg2)

Obtain the height of the specified avatar

static void

get_avatar_width(mixed src, bool func, bool arg1, bool arg2)

Obtain the width of the specified avatar

void

get_bbcode_bitfield()

Return the bitfield calculated by the previous function

void

get_config()

Retrieves configuration information from the source forum and caches it as an array Both database and file driven configuration formats can be handled (the type used is specified in $config_schema, see convert_phpbb20.php for more details)

void

get_config_value(mixed config_name)

Get old config value

static void

get_gallery_avatar_dim(mixed source, mixed axis)

Obtain the size of the specified gallery avatar (using the cache if possible) and cache the value

void

get_group_id(mixed group_name)

Return the group_id for a given group name

void

get_image_dim(mixed source)

Calculate the size of the specified image Called from the following functions for calculating the size of specific image types

void

get_path(mixed src_path, mixed src_url, mixed test_file)

static void

get_remote_avatar_dim(mixed src, mixed axis)

Obtain the size of the specified remote avatar (using the cache if possible) and cache the value Whilst it's unlikely that remote avatars will be duplicated, it is possible so caching seems the best option This should only be called from a post processing step due to the possibility of network timeouts

void

get_smiley_dim(mixed source, mixed axis)

Obtain the size of the specified smilie (using the cache if possible) and cache the value

void

get_smiley_display()

void

get_smiley_height(mixed src)

Obtain the height of the specified smilie

void

get_smiley_width(mixed src)

Obtain the width of the specified smilie

void

get_tables(mixed db)

Get tables of a database

void

get_upload_avatar_dim(mixed source, mixed axis)

Obtain the size of the specified uploaded avatar (using the cache if possible) and cache the value

void

import_attachment(mixed source, bool use_target)

void

import_attachment_files(str category_name)

void

import_avatar(mixed source, bool use_target, bool user_id)

void

import_avatar_gallery(str gallery_name, bool subdirs_as_galleries)

void

import_rank(mixed source, bool use_target)

void

import_smiley(mixed source, bool use_target)

void

inc(mixed var)

Return the next value

void

is_empty(mixed mixed)

Function to mimic php's empty() function (it is the same)

void

is_item_locked(mixed bool)

Convert a boolean into the appropriate phpBB constant indicating whether the item is locked

void

is_positive(mixed n)

Return whether the value is positive

void

is_topic_locked(mixed bool)

Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked

void

is_user_anonymous(mixed user_id)

Determine whether a user is anonymous and return the appropriate new user_id

void

make_uid(mixed timestamp)

Generate a bbcode_uid value

void

make_unique_filename(mixed filename)

Index messages on the fly as we convert them

void

mass_auth(string ug_type, mixed forum_id, mixed ug_id, mixed acl_list, int setting)

Grant permissions to a specified user or group

void

mimetype(mixed filename)

Determine the MIME-type of a specified filename This does not actually inspect the file, but simply uses the file extension

void

minutes_to_hours(mixed minutes)

Convert a value from minutes to hours

void

not(mixed var)

Boolean inverse of the value

void

null_to_str(mixed value)

Convert nulls to empty strings for fields which allowed a NULL value in the source but not the destination

void

null_to_zero(mixed value)

Convert nulls to zeros for fields which allowed a NULL value in the source but not the destination

void

path(mixed path, bool path_relative)

void

phpbb_attachment_category(mixed cat_id)

Convert the attachment category constants This is only used if the Attachment MOD was installed

void

phpbb_attachment_forum_perms(mixed forum_permissions)

Obtain list of forums in which different attachment categories can be used

void

phpbb_avatar_type(mixed type)

Convert the avatar type constants

void

phpbb_check_username_collisions()

void

phpbb_convert_authentication(mixed mode)

Convert authentication user, group and forum table has to be filled in order to work

void

phpbb_convert_group_name(mixed group_name)

Convert the group name, making sure to avoid conflicts with 3.0 special groups

void

phpbb_convert_group_type(mixed group_type)

Convert the group type constants

void

phpbb_convert_topic_type(mixed topic_type)

Convert the topic type constants

void

phpbb_copy_thumbnails()

Copy thumbnails of uploaded images from the 2.0.x forum This is only used if the Attachment MOD was installed

void

phpbb_create_userconv_table()

Checks whether there are any usernames on the old board that would map to the same username_clean on phpBB3.

void

phpbb_disallowed_username(mixed username)

Adjust 2.0.x disallowed names to 3.0.x format

void

phpbb_forum_flags()

Set forum flags - only prune old polls by default

void

phpbb_get_avatar_height(mixed user_avatar)

Find out about the avatar's dimensions

void

phpbb_get_avatar_width(mixed user_avatar)

Find out about the avatar's dimensions

void

phpbb_get_birthday(str birthday)

Convert Birthday from Birthday MOD to phpBB Format

void

phpbb_get_files_dir()

Obtain the path to uploaded files on the 2.0.x forum This is only used if the Attachment MOD was installed

void

phpbb_get_savebox_id(mixed user_id)

Obtain the folder_id for the custom folder created to replace the savebox from 2.0.x (used to store saved private messages)

void

phpbb_import_attach_config()

Transfer attachment specific configuration options These were not stored in the main config table on 2.0.x This is only used if the Attachment MOD was installed

void

phpbb_import_avatar(mixed user_avatar)

Transfer avatars, copying the image if it was uploaded

void

phpbb_inactive_reason()

Calculate the reason a user became inactive We can't actually tell the difference between a manual deactivation and one for profile changes from the data available to assume the latter

void

phpbb_inactive_time()

Calculate the date a user became inactive

void

phpbb_insert_forums()

Insert/Convert forums

void

phpbb_new_pm(mixed pm_type)

Calculate whether a private message was new using the bitfield

void

phpbb_post_edit_user()

Determine the last user to edit a post In practice we only tracked edits by the original poster in 2.0.x so this will only be set if they had edited their own post

void

phpbb_prepare_message(mixed message)

Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield

void

phpbb_privmsgs_to_userid(mixed to_userid)

Calculate the correct to_address field for private messages

void

phpbb_replace_size(mixed matches)

void

phpbb_set_default_encoding(mixed text)

Same as phpbb_set_encoding, but forcing boards default language

void

phpbb_set_encoding(string text, bool grab_user_lang)

Function for recoding text with the default language

void

phpbb_set_primary_group(mixed user_level)

Set primary group.

void

phpbb_smilie_html_decode(mixed code)

Just undos the replacing of ''

void

phpbb_unread_pm(mixed pm_type)

Calculate whether a private message was unread using the bitfield

void

phpbb_user_id(mixed user_id)

Return correct user id value Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well

void

relative_base(mixed path, bool is_relative, bool line, bool file)

void

remote_avatar_dims()

Obtain the dimensions of all remotely hosted avatars This should only be called from execute_last There can be significant network overhead if there are a large number of remote avatars

void

remove_invalid_users()

Cleanly remove invalid user entries after converting the users table...

void

remove_remarks(mixed sql)

remove_remarks will strip the sql comment lines out of an uploaded sql file

static void

restore_config(mixed schema)

Transfers the relevant configuration information from the source forum The mapping of fields is specified in $config_schema, see convert_phpbb20.php for more details

static void

set_user_options()

void

set_user_type(mixed user_active)

Convert a boolean into the appropriate phpBB constant indicating whether the user is active

void

split_sql_file(mixed sql, mixed delimiter)

split_sql_file will split an uploaded sql file into single sql statements.

boolean

str_to_bool(string str)

Convert a textual value to it's equivalent boolean value

int

str_to_primary_group(string status)

Convert the name of a user's primary group to the appropriate equivalent phpBB group id

void

sync_post_count(mixed offset, mixed limit)

Sync post count.

void

update_dynamic_config()

Update any dynamic configuration variables after the conversion is finished

void

update_folder_pm_count()

Update the count of PM's in custom folders for all users

void

update_topics_posted()

Updates topics_posted entries

static void

update_unread_count()

Update the count of unread private messages for all users

void

user_group_auth(string group, string select_query, mixed use_src_db)

Add users to the pre-defined "special" groups

void

utf8_new_case_fold(mixed text, str option)

static void

utf8_new_case_fold_nfkc(mixed text, str option)

mixed

utf8_new_normalize_nfc(mixed strings)

A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings to be in NFC (Normalization Form Composition).

static void

validate_website(mixed url)

Validate a website address

void

words_unique(mixed words)

Function Detail

includes/functions_convert.php at line 545

_import_check

public void _import_check(mixed config_var, mixed source, mixed use_target)

includes/functions_convert.php at line 1778

add_bots

public void add_bots()

Add the search bots into the database This code should be used in execute_last if the source database did not have bots If you are converting bots this function should not be called

Todo:
We might want to look at sharing the bot list between the install code and this code for consistancy

includes/functions_convert.php at line 1703

add_default_groups

public void add_default_groups()

Add any of the pre-defined "special" groups which are missing from the database


includes/functions_convert.php at line 1117

add_user_group

public void add_user_group(mixed group_id, mixed user_id, bool group_leader)

Adds a user to the specified group and optionally makes them a group leader This function does not create the group if it does not exist and so should only be called after the groups have been created


includes/functions_install.php at line 546

adjust_language_keys_callback

public void adjust_language_keys_callback(mixed matches)

For replacing {L_*} strings with preg_replace_callback


includes/functions_convert.php at line 513

attachment_forum_perms

public void attachment_forum_perms(mixed forum_id)

includes/functions_convert.php at line 143

auto_id

public int auto_id(int pad)

Generate a key value based on existing values

Parameters:
pad - Amount to add to the maximum value
Returns:
Key value

includes/functions_convert.php at line 525

base64_unpack

public void base64_unpack(mixed string)

includes/functions_install.php at line 22

can_load_dll

public void can_load_dll(mixed dll)

Determine if we are able to load a specified PHP module and do so if possible


includes/functions_convert.php at line 1452

compare_table

public void compare_table(mixed tables, mixed tablename, mixed prefixes)

includes/functions_install.php at line 277

connect_check_db

public void connect_check_db(array dbms, mixed error_connect, mixed error, mixed dbms_details, mixed table_prefix, mixed dbhost, mixed dbuser, mixed dbpasswd, mixed dbname, mixed dbport, bool prefix_may_exist, bool load_dbal, bool unicode_check)

Used to test whether we are able to connect to the database the user has specified and identify any problems (eg there are already tables with the names we want to use

Parameters:
dbms - should be of the format of an element of the array returned by {@link get_available_dbms get_available_dbms()} necessary extensions should be loaded already

includes/functions_convert.php at line 2154

convert_bbcode

public void convert_bbcode(mixed message, bool convert_size, bool extended_bbcodes)

includes/functions_convert.php at line 2321

copy_dir

public void copy_dir(mixed src, mixed trg, bool copy_subdirs, bool overwrite, bool die_on_failure, bool source_relative_path)

includes/functions_convert.php at line 2267

copy_file

public static void copy_file(mixed src, mixed trg, bool overwrite, bool die_on_failure, bool source_relative_path)

includes/functions_convert.php at line 124

days_to_seconds

public void days_to_seconds(mixed days)

Convert a value from days to seconds


includes/functions_install.php at line 198

dbms_select

public void dbms_select(str default, bool only_20x_options)

Generate the drop down of available database options


includes/functions_convert.php at line 318

decode_ban_ip

public void decode_ban_ip(mixed int_ip)

Reverse the encoding of wild-carded bans


includes/functions_convert.php at line 297

decode_ip

public static void decode_ip(mixed int_ip)

Convert an IP address from the hexadecimal notation to normal dotted-quad notation


includes/functions_convert.php at line 1363

extract_variables_from_file

public void extract_variables_from_file(mixed _filename)

Extract the variables defined in a configuration file

Todo:
As noted by Xore we need to look at this from a security perspective

includes/functions_convert.php at line 2458

fill_dateformat

public static void fill_dateformat(mixed user_dateformat)

includes/functions_convert.php at line 2070

fix_empty_primary_groups

public void fix_empty_primary_groups()

Ensure that all users have a default group specified and update related information such as their colour


includes/functions_convert.php at line 211

gen_email_hash

public void gen_email_hash(mixed email)

Generate the email hash stored in the users table

Note: Deprecated, calls should directly go to phpbb_email_hash()


includes/functions_install.php at line 44

get_available_dbms

public void get_available_dbms(bool dbms, bool return_unavailable, bool only_20x_options)

Returns an array of available DBMS with some data, if a DBMS is specified it will only return data for that DBMS and will load its extension if necessary.


includes/functions_convert.php at line 789

get_avatar_dim

public void get_avatar_dim(mixed src, mixed axis, bool func, bool arg1, bool arg2)


includes/functions_convert.php at line 782

get_avatar_height

public void get_avatar_height(mixed src, bool func, bool arg1, bool arg2)

Obtain the height of the specified avatar


includes/functions_convert.php at line 774

get_avatar_width

public static void get_avatar_width(mixed src, bool func, bool arg1, bool arg2)

Obtain the width of the specified avatar


install/convertors/functions_phpbb20.php at line 1264

get_bbcode_bitfield

public void get_bbcode_bitfield()

Return the bitfield calculated by the previous function


includes/functions_convert.php at line 1184

get_config

public void get_config()

Retrieves configuration information from the source forum and caches it as an array Both database and file driven configuration formats can be handled (the type used is specified in $config_schema, see convert_phpbb20.php for more details)


includes/functions_convert.php at line 277

get_config_value

public void get_config_value(mixed config_name)

Get old config value


includes/functions_convert.php at line 889
public static void get_gallery_avatar_dim(mixed source, mixed axis)

Obtain the size of the specified gallery avatar (using the cache if possible) and cache the value


includes/functions_convert.php at line 174

get_group_id

public void get_group_id(mixed group_name)

Return the group_id for a given group name


includes/functions_convert.php at line 693

get_image_dim

public void get_image_dim(mixed source)

Calculate the size of the specified image Called from the following functions for calculating the size of specific image types


includes/functions_convert.php at line 1373

get_path

public void get_path(mixed src_path, mixed src_url, mixed test_file)

includes/functions_convert.php at line 935

get_remote_avatar_dim

public static void get_remote_avatar_dim(mixed src, mixed axis)

Obtain the size of the specified remote avatar (using the cache if possible) and cache the value Whilst it's unlikely that remote avatars will be duplicated, it is possible so caching seems the best option This should only be called from a post processing step due to the possibility of network timeouts


includes/functions_convert.php at line 732

get_smiley_dim

public void get_smiley_dim(mixed source, mixed axis)

Obtain the size of the specified smilie (using the cache if possible) and cache the value


includes/functions_convert.php at line 2450

get_smiley_display

public void get_smiley_display()

includes/functions_convert.php at line 724

get_smiley_height

public void get_smiley_height(mixed src)

Obtain the height of the specified smilie


includes/functions_convert.php at line 716

get_smiley_width

public void get_smiley_width(mixed src)

Obtain the width of the specified smilie


includes/functions_install.php at line 215

get_tables

public void get_tables(mixed db)

Get tables of a database


includes/functions_convert.php at line 839

get_upload_avatar_dim

public void get_upload_avatar_dim(mixed source, mixed axis)

Obtain the size of the specified uploaded avatar (using the cache if possible) and cache the value


includes/functions_convert.php at line 582

import_attachment

public void import_attachment(mixed source, bool use_target)

includes/functions_convert.php at line 489

import_attachment_files

public void import_attachment_files(str category_name)

includes/functions_convert.php at line 661

import_avatar

public void import_avatar(mixed source, bool use_target, bool user_id)

includes/functions_convert.php at line 421

import_avatar_gallery

public void import_avatar_gallery(str gallery_name, bool subdirs_as_galleries)

includes/functions_convert.php at line 623

import_rank

public void import_rank(mixed source, bool use_target)

includes/functions_convert.php at line 641

import_smiley

public void import_smiley(mixed source, bool use_target)

includes/functions_convert.php at line 41

inc

public void inc(mixed var)

Return the next value


includes/functions_convert.php at line 77

is_empty

public void is_empty(mixed mixed)

Function to mimic php's empty() function (it is the same)


includes/functions_convert.php at line 116

is_item_locked

public void is_item_locked(mixed bool)

Convert a boolean into the appropriate phpBB constant indicating whether the item is locked


includes/functions_convert.php at line 49

is_positive

public void is_positive(mixed n)

Return whether the value is positive


includes/functions_convert.php at line 219

is_topic_locked

public void is_topic_locked(mixed bool)

Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked


includes/functions_convert.php at line 132

is_user_anonymous

public void is_user_anonymous(mixed user_id)

Determine whether a user is anonymous and return the appropriate new user_id


includes/functions_convert.php at line 227

make_uid

public void make_uid(mixed timestamp)

Generate a bbcode_uid value


includes/functions_convert.php at line 1076

make_unique_filename

public void make_unique_filename(mixed filename)

Index messages on the fly as we convert them

Todo:
naderman, can you check that this works with the new search plugins as it's use is currently disabled (and thus untested)function search_indexing($message = ''){ global $fulltext_search, $convert_row; if (!isset($convert_row['post_id'])) { return; } if (!$message) { if (!isset($convert_row['message'])) { return; } $message = $convert_row['message']; } $title = (isset($convert_row['title'])) ? $convert_row['title'] : ''; $fulltext_search->index('post', $convert_row['post_id'], $message, $title, $convert_row['poster_id'], $convert_row['forum_id']);}

includes/functions_convert.php at line 1484

mass_auth

public void mass_auth(string ug_type, mixed forum_id, mixed ug_id, mixed acl_list, int setting)

Grant permissions to a specified user or group

Parameters:
ug_type - user|group|user_role|group_role
forum_id - forum ids (array|int|0) -> 0 == all forums
ug_id - [int] user_id|group_id : [string] usergroup name
acl_list - [string] acl entry : [array] acl entries : [string] role entry
setting - ACL_YES|ACL_NO|ACL_NEVER

includes/functions_convert.php at line 327

mimetype

public void mimetype(mixed filename)

Determine the MIME-type of a specified filename This does not actually inspect the file, but simply uses the file extension


includes/functions_convert.php at line 166

minutes_to_hours

public void minutes_to_hours(mixed minutes)

Convert a value from minutes to hours


includes/functions_convert.php at line 57

not

public void not(mixed var)

Boolean inverse of the value


includes/functions_convert.php at line 267

null_to_str

public void null_to_str(mixed value)

Convert nulls to empty strings for fields which allowed a NULL value in the source but not the destination


includes/functions_convert.php at line 259

null_to_zero

public void null_to_zero(mixed value)

Convert nulls to zeros for fields which allowed a NULL value in the source but not the destination


includes/functions_convert.php at line 1334

path

public void path(mixed path, bool path_relative)

install/convertors/functions_phpbb20.php at line 1368

phpbb_attachment_category

public void phpbb_attachment_category(mixed cat_id)

Convert the attachment category constants This is only used if the Attachment MOD was installed


install/convertors/functions_phpbb20.php at line 1391

phpbb_attachment_forum_perms

public void phpbb_attachment_forum_perms(mixed forum_permissions)

Obtain list of forums in which different attachment categories can be used


install/convertors/functions_phpbb20.php at line 1437

phpbb_avatar_type

public void phpbb_avatar_type(mixed type)

Convert the avatar type constants


install/convertors/functions_phpbb20.php at line 1783

phpbb_check_username_collisions

public void phpbb_check_username_collisions()

install/convertors/functions_phpbb20.php at line 546

phpbb_convert_authentication

public void phpbb_convert_authentication(mixed mode)

Convert authentication user, group and forum table has to be filled in order to work


install/convertors/functions_phpbb20.php at line 1112

phpbb_convert_group_name

public void phpbb_convert_group_name(mixed group_name)

Convert the group name, making sure to avoid conflicts with 3.0 special groups


install/convertors/functions_phpbb20.php at line 1134

phpbb_convert_group_type

public void phpbb_convert_group_type(mixed group_type)

Convert the group type constants


install/convertors/functions_phpbb20.php at line 1158

phpbb_convert_topic_type

public void phpbb_convert_topic_type(mixed topic_type)

Convert the topic type constants


install/convertors/functions_phpbb20.php at line 1335

phpbb_copy_thumbnails

public void phpbb_copy_thumbnails()

Copy thumbnails of uploaded images from the 2.0.x forum This is only used if the Attachment MOD was installed


install/convertors/functions_phpbb20.php at line 1686

phpbb_create_userconv_table

public void phpbb_create_userconv_table()

Checks whether there are any usernames on the old board that would map to the same username_clean on phpBB3. Prints out a list if any exist and exits.


install/convertors/functions_phpbb20.php at line 1675

phpbb_disallowed_username

public void phpbb_disallowed_username(mixed username)

Adjust 2.0.x disallowed names to 3.0.x format


install/convertors/functions_phpbb20.php at line 23

phpbb_forum_flags

public void phpbb_forum_flags()

Set forum flags - only prune old polls by default


install/convertors/functions_phpbb20.php at line 1501

phpbb_get_avatar_height

public void phpbb_get_avatar_height(mixed user_avatar)

Find out about the avatar's dimensions


install/convertors/functions_phpbb20.php at line 1516

phpbb_get_avatar_width

public void phpbb_get_avatar_width(mixed user_avatar)

Find out about the avatar's dimensions


install/convertors/functions_phpbb20.php at line 434

phpbb_get_birthday

public void phpbb_get_birthday(str birthday)

Convert Birthday from Birthday MOD to phpBB Format


install/convertors/functions_phpbb20.php at line 1291

phpbb_get_files_dir

public void phpbb_get_files_dir()

Obtain the path to uploaded files on the 2.0.x forum This is only used if the Attachment MOD was installed


install/convertors/functions_phpbb20.php at line 1558

phpbb_get_savebox_id

public void phpbb_get_savebox_id(mixed user_id)

Obtain the folder_id for the custom folder created to replace the savebox from 2.0.x (used to store saved private messages)


install/convertors/functions_phpbb20.php at line 1580

phpbb_import_attach_config

public void phpbb_import_attach_config()

Transfer attachment specific configuration options These were not stored in the main config table on 2.0.x This is only used if the Attachment MOD was installed


install/convertors/functions_phpbb20.php at line 1470

phpbb_import_avatar

public void phpbb_import_avatar(mixed user_avatar)

Transfer avatars, copying the image if it was uploaded


install/convertors/functions_phpbb20.php at line 1655

phpbb_inactive_reason

public void phpbb_inactive_reason()

Calculate the reason a user became inactive We can't actually tell the difference between a manual deactivation and one for profile changes from the data available to assume the latter


install/convertors/functions_phpbb20.php at line 1633

phpbb_inactive_time

public void phpbb_inactive_time()

Calculate the date a user became inactive


install/convertors/functions_phpbb20.php at line 52

phpbb_insert_forums

public void phpbb_insert_forums()

Insert/Convert forums


install/convertors/functions_phpbb20.php at line 1550

phpbb_new_pm

public void phpbb_new_pm(mixed pm_type)

Calculate whether a private message was new using the bitfield


install/convertors/functions_phpbb20.php at line 1275

phpbb_post_edit_user

public void phpbb_post_edit_user()

Determine the last user to edit a post In practice we only tracked edits by the original poster in 2.0.x so this will only be set if they had edited their own post


install/convertors/functions_phpbb20.php at line 1191

phpbb_prepare_message

public void phpbb_prepare_message(mixed message)

Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield

Todo:
What do we want to do about HTML in messages - currently it gets converted to the entities, but there may be some objections to this

install/convertors/functions_phpbb20.php at line 1532

phpbb_privmsgs_to_userid

public void phpbb_privmsgs_to_userid(mixed to_userid)

Calculate the correct to_address field for private messages


install/convertors/functions_phpbb20.php at line 1182

phpbb_replace_size

public void phpbb_replace_size(mixed matches)

install/convertors/functions_phpbb20.php at line 426

phpbb_set_default_encoding

public void phpbb_set_default_encoding(mixed text)

Same as phpbb_set_encoding, but forcing boards default language


install/convertors/functions_phpbb20.php at line 319

phpbb_set_encoding

public void phpbb_set_encoding(string text, bool grab_user_lang)

Function for recoding text with the default language

Parameters:
text - text to recode to utf8
grab_user_lang - if set to true the function tries to use $convert_row['user_lang'] (and falls back to $convert_row['poster_id']) instead of the boards default language

install/convertors/functions_phpbb20.php at line 1088

phpbb_set_primary_group

public void phpbb_set_primary_group(mixed user_level)

Set primary group. Really simple and only based on user_level (remaining groups will be assigned later)


install/convertors/functions_phpbb20.php at line 1461

phpbb_smilie_html_decode

public void phpbb_smilie_html_decode(mixed code)

Just undos the replacing of '<' and '>'


install/convertors/functions_phpbb20.php at line 1542

phpbb_unread_pm

public void phpbb_unread_pm(mixed pm_type)

Calculate whether a private message was unread using the bitfield


install/convertors/functions_phpbb20.php at line 473

phpbb_user_id

public void phpbb_user_id(mixed user_id)

Return correct user id value Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well


includes/functions_convert.php at line 2430

relative_base

public void relative_base(mixed path, bool is_relative, bool line, bool file)

includes/functions_convert.php at line 393

remote_avatar_dims

public void remote_avatar_dims()

Obtain the dimensions of all remotely hosted avatars This should only be called from execute_last There can be significant network overhead if there are a large number of remote avatars

Todo:
Look at the option of allowing the user to decide whether this is called or to force the dimensions

includes/functions_convert.php at line 2131

remove_invalid_users

public void remove_invalid_users()

Cleanly remove invalid user entries after converting the users table...


includes/functions_install.php at line 516

remove_remarks

public void remove_remarks(mixed sql)

remove_remarks will strip the sql comment lines out of an uploaded sql file


includes/functions_convert.php at line 1271

restore_config

public static void restore_config(mixed schema)

Transfers the relevant configuration information from the source forum The mapping of fields is specified in $config_schema, see convert_phpbb20.php for more details


includes/functions_convert.php at line 1012

set_user_options

public static void set_user_options()

includes/functions_convert.php at line 158

set_user_type

public void set_user_type(mixed user_active)

Convert a boolean into the appropriate phpBB constant indicating whether the user is active


includes/functions_install.php at line 525

split_sql_file

public void split_sql_file(mixed sql, mixed delimiter)

split_sql_file will split an uploaded sql file into single sql statements. Note: expects trim() to have already been run on $sql.


includes/functions_convert.php at line 68

str_to_bool

public boolean str_to_bool(string str)

Convert a textual value to it's equivalent boolean value

Parameters:
str - String to convert (converts yes, on, y, 1 and true to boolean true)
Returns:
The equivalent value

includes/functions_convert.php at line 88

str_to_primary_group

public int str_to_primary_group(string status)

Convert the name of a user's primary group to the appropriate equivalent phpBB group id

Parameters:
status - The name of the group
Returns:
The group_id corresponding to the equivalent group

includes/functions_convert.php at line 1754

sync_post_count

public void sync_post_count(mixed offset, mixed limit)

Sync post count. We might need to do this in batches.


includes/functions_convert.php at line 1900

update_dynamic_config

public void update_dynamic_config()

Update any dynamic configuration variables after the conversion is finished

Todo:
Confirm that this updates all relevant values since it has not necessarily been kept in sync with all changes

includes/functions_convert.php at line 1314

update_folder_pm_count

public void update_folder_pm_count()

Update the count of PM's in custom folders for all users


includes/functions_convert.php at line 1991

update_topics_posted

public void update_topics_posted()

Updates topics_posted entries


includes/functions_convert.php at line 1681

update_unread_count

public static void update_unread_count()

Update the count of unread private messages for all users


includes/functions_convert.php at line 1137

user_group_auth

public void user_group_auth(string group, string select_query, mixed use_src_db)

Add users to the pre-defined "special" groups

Parameters:
group - The name of the special group to add to
select_query - An SQL query to retrieve the user(s) to add to the group

install/data/confusables.php at line 19

utf8_new_case_fold

public void utf8_new_case_fold(mixed text, str option)

Ignore.

install/data/confusables.php at line 59

utf8_new_case_fold_nfkc

public static void utf8_new_case_fold_nfkc(mixed text, str option)

install/data/new_normalizer.php at line 26

utf8_new_normalize_nfc

public mixed utf8_new_normalize_nfc(mixed strings)

A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings to be in NFC (Normalization Form Composition).

Parameters:
strings - a string or an array of strings to normalize
Returns:
the normalized content, preserving array keys if array given.

includes/functions_convert.php at line 243

validate_website

public static void validate_website(mixed url)

Validate a website address


includes/functions_convert.php at line 1098

words_unique

public void words_unique(mixed words)

phpBB3