Squiz Matrix
4.12.2
|
Public Member Functions | |
Ipb ($path, $version) | |
setup ($path) | |
isConnected () | |
disconnect () | |
getIpbURL () | |
search ($assetid) | |
authenticateUser (&$bridge, $username, $password, $is_email_login) | |
getAllInfo ($cols=Array(), $id=0) | |
getMemberGroupInfo ($table_name='members', $cols=Array(), $id=0) | |
getMembers ($member_id=0, $group_id=0, $cols=Array()) | |
getCustomFields () | |
getMemberCustomFieldData ($member_id) | |
getGroupInfo ($group_id) | |
getListOfGroups () | |
canViewBoard ($username) | |
getMemberInfo ($member_id) | |
getMemberInfoByName ($member_name) | |
getMemberParent ($member_id) | |
getListOfMembers ($group_id=0) | |
getRootForumInfo ($forum_id) | |
getListOfRootForums () | |
getForumInfo ($forum_id) | |
getForumParent ($forum_id) | |
getListOfForums ($root_forum_id) | |
getTopicInfo ($topic_id) | |
getTopicParent ($topic_id) | |
getListOfTopics ($forum_id) | |
getPostInfo ($post_id) | |
getPostParent ($post_id) | |
getListOfPosts ($topic_id, $forum_id=NULL, $limit=0) | |
getPollInfo ($poll_id) | |
getListOfPolls () | |
_buildQuery ($columns, $table_name, $table_short_name, $where='', $join='', $order_by='', $limit='') | |
_getResult ($sql, $key_change=Array(), $one_element=FALSE, $backward=FALSE) | |
_htmlDecode ($result) | |
Data Fields | |
$db | |
$needed_files | |
$info = NULL | |
$version = '2_0_4' | |
$registry = NULL | |
$command = 'fetch_row' | |
$command_free = 'free_result' | |
Protected Member Functions | |
_assertValidResult ($db, $message) | |
_getMemberIdField () | |
_getMemberGroupIdField () | |
_maintainDataFormat ($data=Array()) | |
|
protected |
_buildQuery | ( | $columns, | |
$table_name, | |||
$table_short_name, | |||
$where = '' , |
|||
$join = '' , |
|||
$order_by = '' , |
|||
$limit = '' |
|||
) |
Return sql query string
array | $columns | the list of columns |
string | $table_name | the name of the table |
string | $table_short_name | the short name of the table |
string | $where | WHERE clauss |
string | $join | JOIN clause |
string | $order_by | ORDER BY clause |
string | $limit | LIMIT clause |
|
protected |
|
protected |
_getResult | ( | $sql, | |
$key_change = Array() , |
|||
$one_element = FALSE , |
|||
$backward = FALSE |
|||
) |
Return the db execution result
string | $sql | the sql query to execute |
array | $key_change | The caller can specify the name of the key by providing the pair of the old and new key |
boolean | $one_element | If the result only contains one element, it's TRUE |
boolean | $backward | If TRUE, make sure the data in the array is backward compatible |
_htmlDecode | ( | $result | ) |
Convert html encoded characters
This function is useful since IPB stores html encoded characters in the database. All the results from database go through this function to make sure they do not contain any html encoded chars
string | $result | the string to convert |
|
protected |
authenticateUser | ( | & | $bridge, |
$username, | |||
$password, | |||
$is_email_login | |||
) |
Authenticate the user based on the username and the password
object | $bridge | The current bridge |
string | $username | the user name to verify |
string | $password | the password to verify |
boolean | $is_email_login | it's TRUE if email is used for loggin |
canViewBoard | ( | $username | ) |
disconnect | ( | ) |
getAllInfo | ( | $cols = Array() , |
|
$id = 0 |
|||
) |
Returns the summary of members and groups in multi dimen array
The returned array can take two different forms. If cols is not specified, the associative array have the id of members/groups as a key. For example, Also, this function return all the information of members and groups at once.
Array( 'id' => Array( 'name' => value, 'mgroup => value, ... ), );
If the list of wanted columns is passed, no key is specified in the returned array
Array( 0 => Array( 'id' => value, 'name' => value, 'mgroup => value, ... ), ... );
array | $cols | the list of wanted columns |
int | $id | optionally the id of member/group can be specified |
getCustomFields | ( | ) |
getForumInfo | ( | $forum_id | ) |
getForumParent | ( | $forum_id | ) |
getGroupInfo | ( | $group_id | ) |
getListOfForums | ( | $root_forum_id | ) |
getListOfGroups | ( | ) |
getListOfMembers | ( | $group_id = 0 | ) |
getListOfPolls | ( | ) |
getListOfPosts | ( | $topic_id, | |
$forum_id = NULL , |
|||
$limit = 0 |
|||
) |
getListOfRootForums | ( | ) |
getListOfTopics | ( | $forum_id | ) |
getMemberCustomFieldData | ( | $member_id | ) |
getMemberGroupInfo | ( | $table_name = 'members' , |
|
$cols = Array() , |
|||
$id = 0 |
|||
) |
Returns the summary of members/groups in multi dimen array
The returned array can take two different forms. If cols is not specified, the associative array have the id of members/groups as a key. For example,
Array( 'id' => Array( 'name' => value, 'mgroup => value, ... ), );
If the list of wanted columns is passed, no key is specified in the returned array
Array( 0 => Array( 'id' => value, 'name' => value, 'mgroup => value, ... ), ... );
string | $table_name | the name of the table |
array | $cols | the list of wanted columns |
int | $id | optionally the id of member/group can be specified |
getMemberInfo | ( | $member_id | ) |
getMemberInfoByName | ( | $member_name | ) |
getMemberParent | ( | $member_id | ) |
getMembers | ( | $member_id = 0 , |
|
$group_id = 0 , |
|||
$cols = Array() |
|||
) |
getPollInfo | ( | $poll_id | ) |
getPostInfo | ( | $post_id | ) |
getPostParent | ( | $post_id | ) |
getRootForumInfo | ( | $forum_id | ) |
getTopicInfo | ( | $topic_id | ) |
getTopicParent | ( | $topic_id | ) |
Ipb | ( | $path, | |
$version | |||
) |
isConnected | ( | ) |
search | ( | $assetid | ) |
Search the database for the given shadow assetid Since IPB can have same primary key for member and group, ipb_bridge adds an unique prefix for different asset type. For example, member has 'm_' as a prefix and 'g_' for a group.
int | $assetid | the id of the shadow asset to search |
setup | ( | $path | ) |
Set up the database connection
This function includes all necessary files from IPB, then establishes db connection to their database
string | $path | the absolute path to Invision Power Board installation |
string | $version | the version of the Invision Power Board installation |
$needed_files |