Implementation of Kunena v3.x Forums for Joomla Forum converter.

phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared

since 2.5.0 bbPress (r5144)
link Docs https://codex.bbpress.org/import-forums/kunena/
package bbPress
inherited_from \BBP_Converter_Base

 Methods

This is the constructor and it connects to the platform databases.

__construct() 
Inherited

This method is to take the pass out of the database and compare to a pass the user has typed in.

authenticate_pass($password, $serialized_pass) 
inherited_from \BBP_Converter_Base::authenticate_pass()

Parameters

$password

$serialized_pass

Translate the forum status from Kunena v3.x numerics to WordPress's strings.

callback_forum_status(integer $status = 0) : string

Parameters

$status

integer

Kunena v3.x numeric forum status

Returns

stringWordPress safe

Translate the forum type from Kunena v3.x numerics to WordPress's strings.

callback_forum_type(integer $status = 0) : string

Parameters

$status

integer

Kunena v3.x numeric forum type

Returns

stringWordPress safe

Run password through wp_hash_password().

callback_pass(string $username = '', string $password = ''
Inherited

Parameters

$username

string

$password

string

This method is to save the salt and password together. That way when we authenticate it we can get it out of the database as one value. Array values are auto sanitized by WordPress.

callback_savepass($field, $row) 

Parameters

$field

$row

Verify the topic/reply count.

callback_topic_reply_count(integer $count = 1) : string

Parameters

$count

integer

Kunena v3.x topic/reply counts

Returns

stringWordPress safe

Translate the post status from Kunena v3.x numerics to WordPress's strings.

callback_topic_status(integer $status = 0) : string

Parameters

$status

integer

Kunena v3.x numeric topic status

Returns

stringWordPress safe

This method deletes data from the wp database.

clean() 
Inherited
since 2.6.0 bbPress (r6456)

This method deletes passwords from the wp database.

clean_passwords(integer $start = 1
Inherited

Parameters

$start

integer

Start row

This method converts anonymous replies.

convert_anonymous_reply_authors($start = 1
Inherited
since 2.6.0 bbPress (r5538)

Parameters

$start

This method converts anonymous topics.

convert_anonymous_topic_authors($start = 1
Inherited
since 2.6.0 bbPress (r5538)

Parameters

$start

Convert Favorites.

convert_favorites($start = 1
Inherited

Parameters

$start

This method converts old forum hierarchy to new bbPress hierarchy.

convert_forum_parents($start = 1
Inherited

Parameters

$start

Convert Forum Subscriptions.

convert_forum_subscriptions($start = 1
Inherited

Parameters

$start

Convert Forums.

convert_forums($start = 1
Inherited

Parameters

$start

Convert Posts.

convert_replies($start = 1
Inherited

Parameters

$start

This method converts old reply_to post id to new bbPress reply_to post id.

convert_reply_to_parents($start = 1
Inherited
since 2.4.0 bbPress (r5093)

Parameters

$start

Convert Table.

convert_table(string $to_type, integer $start) 
Inherited

Parameters

$to_type

string

to type

$start

integer

Start row

Convert Topic Tags.

convert_tags($start = 1
Inherited

Parameters

$start

This method converts old closed topics to bbPress closed topics.

convert_topic_closed_topics($start = 1
Inherited
since 2.6.0 bbPress (r5425)

Parameters

$start

This method converts old topic stickies to new bbPress stickies.

convert_topic_stickies($start = 1
Inherited
since 2.5.0 bbPress (r5170)

Parameters

$start

Convert Topic Subscriptions.

convert_topic_subscriptions($start = 1
Inherited

Parameters

$start

This method converts old topic super stickies to new bbPress super stickies.

convert_topic_super_stickies($start = 1
Inherited
since 2.5.0 bbPress (r5170)

Parameters

$start

Convert Topics / Threads.

convert_topics($start = 1
Inherited

Parameters

$start

Convert Users.

convert_users($start = 1
Inherited

Parameters

$start

This method allows us to indicates what is or is not converted for each converter.

info() 
inherited_from \BBP_Converter_Base::info()

Sets up the field mappings

setup_globals() 
inherited_from \BBP_Converter_Base::setup_globals()

Setup global values.

setup_globals() 
Inherited

This method implements the authentication for the different forums.

authenticate_pass(string $password, $hash) 
Inherited

Parameters

$password

string

Un-encoded password.

$hash

callback_datetime()

callback_datetime($field) 
Inherited

Parameters

$field

callback_html()

callback_html($field) 
Inherited

Parameters

$field

callback_negative()

callback_negative($field) 
Inherited

Parameters

$field

callback_null()

callback_null($field) 
Inherited

Parameters

$field

callback_slug()

callback_slug($field) 
Inherited

Parameters

$field

Info

info() 
Inherited

Check if the topic or reply author is anonymous.

callback_check_anonymous(string $field) : string
Inherited
since 2.6.0 bbPress (r5544)

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to forum ID's.

callback_forumid(string $field) : string
Inherited

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to reply_to post id.

callback_reply_to(string $field) : string
Inherited
since 2.4.0 bbPress (r5093)

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to topic ID's.

callback_topicid(string $field) : string
Inherited

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls map topics ID's to forum ID's.

callback_topicid_to_forumid(string $field) : string
Inherited

Parameters

$field

string

Returns

string

A mini cache system to reduce database calls to user ID's.

callback_userid(string $field) : string
Inherited

Parameters

$field

string

Returns

string

Update the number of rows in the current step.

count_rows_by_results(string $query = '') : boolean
Inherited
since 2.6.0 bbPress (r6637)

Parameters

$query

string

The literal MySQL query.

Returns

boolean

Update the number of rows in the current step.

count_rows_by_table(string $table_name = '') : boolean
Inherited
since 2.6.0 bbPress (r6637)

Parameters

$table_name

string

The literal MySQL query.

Returns

boolean

This method grabs appropriate fields from the table specified.

get_fields(string $tablename = ''
Inherited

Parameters

$tablename

string

The table name to grab fields from.

Update the last query option and return results.

get_results(string $query = '', string $output = OBJECT
Inherited

Parameters

$query

string

$output

string

Update the last query option and return results.

get_row(string $query = ''
Inherited

Parameters

$query

string

Initialize the converter

init() 
Inherited
since 2.1.0

Update the last query option and do a general query.

query(string $query = ''
Inherited

Parameters

$query

string

Update the last query ran.

update_query(string $query = '') : boolean
Inherited
since 2.6.0 bbPress (r6637)

Parameters

$query

string

The literal MySQL query.

Returns

boolean

 Properties

 

Custom BBCode class properties in a key => value format

$bbcode_parser_properties : array

Default

array()
 

This is the charset for your wp database.

$charset : \str

Default

''
 

Whether to clean up any old converter data. Default false.

$clean : boolean

Default

false
 

Whether users should be converted or not. Default false.

$convert_users : boolean

Default

false
 

Sync table available.

$sync_table : boolean

Default

false
 

Sync table name.

$sync_table_name : \str

Default

''
 

This is the field mapping array to process.

$field_map : \array()

Default

array()
 

Map of from old forum ids to new forum ids. It is for optimization.

$map_forumid : \array()

Default

array()
 

Map of from old reply_to ids to new reply_to ids. It is for optimization.

$map_reply_to : \array()

Default

array()
 

Map of from old topic ids to new topic ids. It is for optimization.

$map_topicid : \array()

Default

array()
 

Map of topic to forum. It is for optimization.

$map_topicid_to_forumid : \array()

Default

array()
 

Map of from old user ids to new user ids. It is for optimization.

$map_userid : \array()

Default

array()
 

Maximum number of rows to convert at 1 time. Default 100.

$max_rows : integer

Default

100
 

This is the connection to the other platforms database.

$opdb : object

Default

 

This is the connection to the WordPress database.

$wpdb : object

Default