UNA
UNA Core

Classes

class  BxDol
 
interface  iBxDolSingleton
 
interface  iBxDolFactoryObject
 
interface  iBxDolReplaceable
 
interface  iBxDolProfile
 
interface  iBxDolProfileService
 
interface  iBxDolContentInfoService
 
interface  iBxDolCalendarService
 
class  BxDolAccount
 
class  BxDolAccountQuery
 
class  BxDolAcl
 
class  BxDolAclQuery
 
class  BxDolAlerts
 
class  BxDolAlertsResponse
 
class  BxDolApiQuery
 
class  BxDolAuditGrid
 
class  BxDolAuditQuery
 
class  BxDolBadges
 
class  BxDolBadgesQuery
 
class  BxDolBan
 
class  BxDolCache
 
class  BxDolCacheAPC
 
class  BxDolCacheFile
 
class  BxDolCacheFileHtml
 
class  BxDolCacheMemcache
 
class  BxDolCacheUtilities
 
class  BxDolCacheXCache
 
class  BxDolCalendar
 
class  BxDolCaptcha
 
class  BxDolCaptchaQuery
 
class  BxDolCategories
 
class  BxDolCategoriesQuery
 
class  BxDolCategory
 
class  BxDolCategoryQuery
 
class  BxDolChart
 
class  BxDolChartGrowth
 
class  BxDolChartGrowthSpeed
 
class  BxDolChartQuery
 
class  BxDolCmts
 
class  BxDolCmtsGridAdministration
 
class  BxDolCmtsNotes
 
class  BxDolCmtsQuery
 
class  BxDolCmtsReviews
 
class  BxDolCmtsReviewsQuery
 
class  BxDolCmtsScore
 
class  BxDolCmtsVoteLikes
 
class  BxDolCmtsVoteReactions
 
class  BxDolConnection
 
class  BxDolConnectionQuery
 
class  BxDolContentFilter
 
class  BxDolContentInfo
 
class  BxDolContentInfoCmts
 
class  BxDolCover
 
class  BxDolCron
 
class  BxDolCronAccount
 
class  BxDolCronAcl
 
class  BxDolCronAudit
 
class  BxDolCronProfile
 
class  BxDolCronPruning
 
class  BxDolCronQuery
 
class  BxDolCronQueueEmail
 
class  BxDolCronQueuePush
 
class  BxDolCronStorage
 
class  BxDolCronTranscoder
 
class  BxDolCronUpgradeCheck
 
class  BxDolCronUpgradeModulesCheck
 
class  BxDolDb
 
class  BxDolDesigns
 
class  BxDolEditor
 
class  BxDolEditorQuery
 
class  BxDolEmailTemplates
 
class  BxDolEmailTemplatesQuery
 
class  BxDolEmbed
 
class  BxDolEmbedQuery
 
class  BxDolFactory
 
class  BxDolFactoryObject
 
class  BxDolFactoryObjectQuery
 
class  BxDolFavorite
 
class  BxDolFavoriteQuery
 
class  BxDolFeature
 
class  BxDolFeatureQuery
 
class  BxDolFile
 
class  BxDolFileHandler
 
class  BxDolFileHandlerQuery
 
class  BxDolForm
 
class  BxDolFormChecker
 
class  BxDolFormCheckerHelper
 
class  BxDolFormNested
 
class  BxDolFormNestedGhost
 
class  BxDolFormQuery
 
class  BxDolFtp
 
class  BxDolGrid
 
class  BxDolGridConnectionIn
 
class  BxDolGridConnectionOut
 
class  BxDolGridConnections
 
class  BxDolGridConnectionsRequests
 
class  BxDolGridQuery
 
class  BxDolGridQueues
 
class  BxDolGridRelatedMe
 
class  BxDolGridRelations
 
class  BxDolGridSubscribedMe
 
class  BxDolGridSubscriptions
 
class  BxDolGzip
 
class  BxDolImageResize
 
class  BxDolInformer
 
class  BxDolInstallerHasher
 
class  BxDolInstallerUtils
 
class  BxDolIO
 
class  BxDolKey
 
class  BxDolKeyQuery
 
class  BxDolLabel
 
class  BxDolLabelQuery
 
class  BxDolLanguages
 
class  BxDolLanguagesQuery
 
class  BxDolLiveUpdates
 
class  BxDolLiveUpdatesQuery
 
class  BxDolLocationField
 
class  BxDolLocationFieldGoogle
 
class  BxDolLocationFieldNominatim
 
class  BxDolLocationFieldQuery
 
class  BxDolLocationMap
 
class  BxDolLocationMapGoogleStatic
 
class  BxDolLocationMapLeaflet
 
class  BxDolLocationMapQuery
 
class  BxDolLog
 
class  BxDolLogs
 
class  BxDolLogsQuery
 
class  BxDolLogsStorageFolder
 
class  BxDolLogsStoragePHPLog
 
class  BxDolLogsStorageSTDErr
 
class  BxDolMenu
 
class  BxDolMenuQuery
 
class  BxDolMetatags
 
class  BxDolMetatagsQuery
 
class  BxDolMinify
 
class  BxDolModule
 
class  BxDolModuleConfig
 
class  BxDolModuleDb
 
class  BxDolModuleProxy
 
class  BxDolModuleQuery
 
class  BxDolModuleTemplate
 
class  BxDolObject
 
class  BxDolObjectQuery
 
class  BxDolPage
 
class  BxDolPageQuery
 
class  BxDolPaginate
 
class  BxDolPayments
 
class  BxDolPaymentsQuery
 
class  BxDolPermalinks
 
class  BxDolPlayer
 
class  BxDolPlayerQuery
 
class  BxDolPreloader
 
class  BxDolPreloaderQuery
 
class  BxDolPrivacy
 
class  BxDolPrivacyQuery
 
class  BxDolProfile
 
class  BxDolProfileAnonymous
 
class  BxDolProfileForms
 
class  BxDolProfileQuery
 
class  BxDolProfileUndefined
 
class  BxDolPush
 
class  BxDolQueue
 
class  BxDolQueueEmail
 
class  BxDolQueueEmailQuery
 
class  BxDolQueuePush
 
class  BxDolQueuePushQuery
 
class  BxDolQueueQuery
 
class  BxDolRecommendationQuery
 
class  BxDolRelation
 
class  BxDolRelationQuery
 
class  BxDolReport
 
class  BxDolReportQuery
 
class  BxDolRequest
 
class  BxDolRewriteRulesQuery
 
class  BxDolRss
 
class  BxDolRssBoonEx
 
class  BxDolRssFactory
 
class  BxDolRssPageBlock
 
class  BxDolRssQuery
 
class  BxDolScore
 
class  BxDolScoreQuery
 
class  BxDolSearch
 
class  BxDolSearchResult
 
class  BxDolSearchExtended
 
class  BxDolSearchExtendedQuery
 
class  BxDolService
 
class  BxDolSession
 
class  BxDolSessionQuery
 
class  BxDolSockets
 
class  BxDolSocketsSoketi
 
class  BxDolStorage
 
class  BxDolStorageHelperXhr
 
class  BxDolStorageHelperForm
 
class  BxDolStorageHelperPath
 
class  BxDolStorageHelperUrl
 
class  BxDolStorageHelperStorage
 
class  BxDolStorageLocal
 
class  BxDolStorageQuery
 
class  BxDolStorageS3
 
class  BxDolStorageS3v4
 
class  BxDolStorageS3v4alt
 
class  BxDolTemplate
 
class  BxDolTranscoder
 
class  BxDolTranscoderAudio
 
class  BxDolTranscoderAudioQuery
 
class  BxDolTranscoderImage
 
class  BxDolTranscoderImageQuery
 
class  BxDolTranscoderProxy
 
class  BxDolTranscoderQuery
 
class  BxDolTranscoderVideo
 
class  BxDolTranscoderVideoQuery
 
class  BxDolTwilio
 
class  BxDolUpgrader
 
class  BxDolUploader
 
class  BxDolUploaderQuery
 
class  BxDolView
 
class  BxDolViewQuery
 
class  BxDolVote
 
class  BxDolVoteLikes
 
class  BxDolVoteLikesQuery
 
class  BxDolVoteQuery
 
class  BxDolVoteReactions
 
class  BxDolVoteReactionsQuery
 
class  BxDolVoteStars
 
class  BxDolVoteStarsQuery
 
class  BxDolWiki
 
class  BxDolParsedown
 
class  BxDolWikiQuery
 
class  BxDolXmlParser
 

Functions

 BxDolBan::addConnection ($iInitiator, $iContent, $aParams=[])
 
static BxDolRelation::isEnabled ()
 
 BxDolRelation::actionAdd ($mixedContent=0, $iInitiator=false)
 
 BxDolRelation::actionConfirm ($iContent=0, $iInitiator=false)
 
 BxDolRelation::actionRemove ($iContent=0, $iInitiator=false)
 
 BxDolRelation::addConnection ($iInitiator, $iContent, $aParams=[])
 
 BxDolRelation::confirmConnection ($iInitiator, $iContent)
 
 BxDolRelation::getConnectionsAsArrayExt ($sContentType, $iId1, $iId2, $isMutual=false, $iStart=0, $iLimit=BX_CONNECTIONS_LIST_LIMIT, $iOrder=BX_CONNECTIONS_ORDER_NONE)
 
 BxDolRelation::getCommonContentExt ($iInitiator1, $iInitiator2, $isMutual=false, $iStart=0, $iLimit=BX_CONNECTIONS_LIST_LIMIT, $iOrder=BX_CONNECTIONS_ORDER_NONE)
 
 BxDolRelation::getConnectedInitiatorsExt ($iContent, $isMutual=false, $iStart=0, $iLimit=BX_CONNECTIONS_LIST_LIMIT, $iOrder=BX_CONNECTIONS_ORDER_NONE)
 
 BxDolRelation::getConnectedContentExt ($iInitiator, $isMutual=false, $iStart=0, $iLimit=BX_CONNECTIONS_LIST_LIMIT, $iOrder=BX_CONNECTIONS_ORDER_NONE)
 
 BxDolRelation::checkAllowedConnect ($iInitiator, $iContent, $isPerformAction=false, $isMutual=false, $isInvertResult=false, $isSwap=false, $isCheckExists=true)
 
 BxDolRelation::checkAllowedConnectCustom ($iInitiator, $iContent, $isPerformAction=false, $isMutual=false, $isInvertResult=false, $isSwap=false, $isCheckExists=true)
 
 DesignBoxContent ($sTitle, $sContent, $iTemplateNum=BX_DB_DEF, $mixedMenu=false)
 
 send_headers_page_changed ()
 
 bx_time_js ($iUnixTimestamp, $sFormatIdentifier=BX_FORMAT_DATE, $bForceFormat=false)
 
 bx_time_utc ($iUnixTimestamp)
 
 bx_get_logged_profile_id ()
 
 isLogged ()
 
 getLoggedId ()
 
 getLoggedPassword ()
 
 isMember ($iId=0)
 
if(!function_exists("isAdmin")) isRole ($iRole, $iId=0)
 
 bx_login ($iId, $bRememberMe=false)
 
 bx_logout ($bNotify=true)
 
 check_logged ()
 
 bx_check_password ($sLogin, $sPassword, $iRole=BX_DOL_ROLE_MEMBER)
 
 bx_check_login ($iID, $sPassword, $iRole=BX_DOL_ROLE_MEMBER)
 
 bx_require_authentication ($bStudio=false, $bAjaxMode=false, $sForceRelocate='')
 
 bx_login_form ($bStudio=false, $bAjaxMode=false, $sForceRelocate='')
 
 title2uri ($sValue)
 
 bx_process_input ($mixedData, $iDataType=BX_DATA_TEXT, $mixedParams=false, $isCheckMagicQuotes=true)
 
 bx_process_macros ($s)
 
 htmlspecialchars_adv ( $string)
 
 sendMailTemplate ($sTemplateName, $iAccountId=0, $iProfileId=0, $aReplaceVars=array(), $iEmailType=BX_EMAIL_NOTIFY, $bAddToQueue=false)
 
 sendMailTemplateSystem ($sTemplateName, $aReplaceVars=array(), $iEmailType=BX_EMAIL_SYSTEM, $bAddToQueue=false)
 
 sendMail ($mRecipientEmails, $sMailSubject, $sMailBody, $iRecipientID=0, $aPlus=array(), $iEmailType=BX_EMAIL_NOTIFY, $sEmailFlag='html', $isDisableAlert=false, $aCustomHeaders=array(), $bAddToQueue=false)
 
 bx_import ($sClassName, $mixedModule=array())
 
 bx_autoload ($sClassName)
 
 bx_instance ($sClassName, $aParams=array(), $mixedModule=array())
 
 bx_js_string ($mixedInput, $iQuoteType=BX_ESCAPE_STR_AUTO)
 
 bx_html_attribute ($mixedInput, $iQuoteType=BX_ESCAPE_STR_AUTO)
 
 bx_php_string_apos ($mixedInput)
 
 bx_file_get_contents ($sFileUrl, $aParams=array(), $sMethod='get', $aHeaders=array(), &$sHttpCode=null, $aBasicAuth=array(), $iTimeout=0, $aCustomCurlParams=array())
 
 bx_get_site_info_fix_relative_url ($sSourceUrl, $s)
 
 encryptUserPwd ($sPwd, $sSalt)
 
 encryptUserId ($sId)
 
 bx_parse_str ($s)
 
 bx_trim_nl_duplicates ($s)
 
 bx_convert_array2attrs ($a, $sClasses=false, $sStyles=false)
 
 bx_audit ($iContentId, $sContentModule, $sAction, $aParams, $iProfileId=0)
 
 bx_alert ($sUnit, $sAction, $iObjectId, $iSender=false, $aExtras=array())
 
 bx_is_srv ($mixedModule, $sMethod, $sClass="Module", $bIgnoreInactive=false)
 
 bx_is_srv_ii ($mixedModule, $sMethod, $sClass="Module")
 
 bx_srv ($mixed, $sMethod, $aParams=array(), $sClass='Module', $bIgnoreCache=false, $bIgnoreInactive=false)
 
 bx_srv_ii ($mixed, $sMethod, $aParams=array(), $sClass='Module', $bIgnoreCache=false)
 
 bx_srv_ic ($mixed, $sMethod, $aParams=array(), $sClass='Module', $bIgnoreInactive=false)
 
 bx_gen_method_name ($s, $aWordsDelimiter=array('_'))
 
 bx_trigger_error ($sMsg, $iNumLevelsBack=0)
 
 bx_get_ver ($bInvalidateCache=false)
 
 bx_check_maintenance_mode ($bShowHttpError=false)
 
 bx_check_minimal_requirements ($bShowHttpError=false)
 
 bx_check_redirect_to_correct_hostname ($bProcessRedirect=false)
 
 bx_get_self_url ()
 
 bx_check_redirect_to_remove_install_folder ($bProcessRedirect=false)
 
 bx_show_service_unavailable_error_and_exit ($sMsg=false, $iRetryAfter=86400)
 
 bx_smart_readfile ($sPath, $sFilename='', $sMimeType='application/octet-stream', $iCacheAge=0, $sCachePrivacy='public', $sContentDisposition='inline')
 
 bx_linkify ($text, $sAttrs='', $bHtmlSpecialChars=false)
 
 bx_linkify_html ($sHtmlOrig, $sAttrs='')
 
 bx_proto ()
 
 bx_has_proto ($sLink)
 
 bx_log ($sObject, $mixed)
 

Variables

 $GLOBALS ['bxDolClasses'] = array()
 
const CHECK_ACTION_MESSAGE_NOT_ALLOWED "_sys_acl_action_not_allowed"
 
const CHECK_ACTION_LANG_FILE_ACTION 1
 
const MEMBERSHIP_ID_NON_MEMBER 1
 
const MEMBERSHIP_ACTION_EDIT_ANY_ENTRY 'edit any entry'
 
const CHECK_ACTION_RESULT 0
 
const CHECK_ACTION_RESULT_ALLOWED 0
 
const MEMBERSHIP_PERIOD_UNIT_DAY 'day'
 
const BX_CONNECTIONS_LIST_COUNTER 5
 
const BX_CONNECTIONS_LIST_LIMIT 1000
 
const BX_CONNECTIONS_LIST_NO_LIMIT -1
 
const BX_CONNECTIONS_ORDER_NONE 0
 
const BX_CONNECTIONS_ORDER_ADDED_ASC 1
 
const BX_CONNECTIONS_ORDER_ADDED_DESC 2
 
const BX_CONNECTIONS_TYPE_ONE_WAY 'one-way'
 
const BX_CONNECTIONS_TYPE_MUTUAL 'mutual'
 
const BX_CONNECTIONS_CONTENT_TYPE_CONTENT 'content'
 
const BX_CONNECTIONS_CONTENT_TYPE_INITIATORS 'initiators'
 
const BX_CONNECTIONS_CONTENT_TYPE_COMMON 'common'
 
const BX_EDITOR_STANDARD 1
 
const BX_EDITOR_FULL 2
 
const BX_EDITOR_MINI 3
 
const BX_DATA_VALUES_ADDITIONAL 'LKey2'
 
const BX_DATA_VALUES_ALL 'all'
 
const BX_PLAYER_STANDARD 1
 
const BX_PLAYER_MINI 3
 
const BX_PLAYER_EMBED 2
 
const BX_PAGE_DEFAULT 0
 
const BX_PAGE_TYPE_DEFAULT 1
 
 if (!defined( 'BX_DOL_MAX_RETINA_DIMENSION_MOBILE')) define( 'BX_DOL_MAX_RETINA_DIMENSION_MOBILE'
 
const BX_DB_CONTENT_ONLY 0
 
const BX_DB_DEF 1
 
const BX_DB_EMPTY 2
 
const BX_DB_NO_CAPTION 3
 
const BX_DB_PADDING_CONTENT_ONLY 10
 
const BX_DB_PADDING_DEF 11
 
const BX_DB_PADDING_NO_CAPTION 13
 
const BX_FORMAT_TIME 'sys_format_time'
 
const BX_FORMAT_DATE_TIME 'sys_format_datetime'
 
const BX_MENU_TEMPLATE_SUBMENU 8
 
const BX_ESCAPE_STR_APOS 1
 
const BX_ESCAPE_STR_QUOTE 2
 
const BX_EMAIL_SYSTEM 0
 

Detailed Description

Copyright (c) UNA, Inc - https://una.io MIT License - https://opensource.org/licenses/MIT

Function Documentation

◆ actionAdd()

BxDolRelation::actionAdd (   $mixedContent = 0,
  $iInitiator = false 
)

Add new relation.

Parameters
$mixedContentcontent to make relation with or an array with content and relation type
Returns
array

◆ actionConfirm()

BxDolRelation::actionConfirm (   $iContent = 0,
  $iInitiator = false 
)

Confirm relation request without creation of retroactive relation.

Parameters
$iContentcontent to make relation with
Returns
array

◆ actionRemove()

BxDolRelation::actionRemove (   $iContent = 0,
  $iInitiator = false 
)

Remove relation without removing a retroactive relation. This method is wrapper for

See also
removeConnection to be called from
conn.php upon AJAX request to this file.
Parameters
$iContentcontent to make connection to, in most cases some content id, or other profile id in case of friends
Returns
array

◆ addConnection() [1/2]

BxDolBan::addConnection (   $iInitiator,
  $iContent,
  $aParams = [] 
)

Add new connection.

Parameters
$iInitiatorinitiator of the connection, in most cases some profile id
$iContentcontent to make connection to, in most cases some content id, or other profile id in case of friends
Returns
true - if connection was added, false - if connection already exists or error occured

◆ addConnection() [2/2]

BxDolRelation::addConnection (   $iInitiator,
  $iContent,
  $aParams = [] 
)

Add new connection.

Parameters
$iInitiatorinitiator of the connection, in most cases some profile id
$iContentcontent to make connection to, in most cases some content id, or other profile id in case of friends
Returns
true - if connection was added, false - if connection already exists or error occured

◆ bx_alert()

bx_alert (   $sUnit,
  $sAction,
  $iObjectId,
  $iSender = false,
  $aExtras = array() 
)

Raise an alert

Parameters
string$sUnit- system type
string$sAction- system action
int$iObjectId- object id
int$iSender- sender (action's author) profile id, if it is false - then currectly logged in profile id is used
array$aExtras- extra parameters

◆ bx_audit()

bx_audit (   $iContentId,
  $sContentModule,
  $sAction,
  $aParams,
  $iProfileId = 0 
)

Raise an audit event

Parameters
int$iContentId- content id
string$sContentModule- module name
string$sAction- system action key
array$aParams- array of parameters

◆ bx_autoload()

bx_autoload (   $sClassName)

used in spl_autoload_register() function, so no need to call bx_import for system classes

◆ bx_check_login()

bx_check_login (   $iID,
  $sPassword,
  $iRole = BX_DOL_ROLE_MEMBER 
)

Check encrypted password (ex., from Cookie)

Returns
empty string on success or error string on error

◆ bx_check_maintenance_mode()

bx_check_maintenance_mode (   $bShowHttpError = false)

Check if site maintetance mode is enabled. Maintetance mode is enabled when '.bx_maintenance' file exists in the script root folder, please note that this is hidden file and some file managers don't show it.

Parameters
$bShowHttpErrorshow 503 HTTP error if site is in mainenance mode
Returns
true if site is in maintenance mode, or false otherwise

◆ bx_check_minimal_requirements()

bx_check_minimal_requirements (   $bShowHttpError = false)

Check for minimal requirements. if BX_DISABLE_REQUIREMENTS_CHECK is defined then this requirements checking is skipped.

Parameters
$bShowHttpErrorshow 503 HTTP error if site doesn't meet minimal requirements
Returns
false if requirements are met, or array of errors of requirements aren't met

◆ bx_check_password()

bx_check_password (   $sLogin,
  $sPassword,
  $iRole = BX_DOL_ROLE_MEMBER 
)

Check unencrypted password

Returns
empty string on success or error string on error

◆ bx_check_redirect_to_correct_hostname()

bx_check_redirect_to_correct_hostname (   $bProcessRedirect = false)

Check if redirect to the correct hostname is required, for example redirect from site.com to www.site.com

Parameters
$bProcessRedirectprocess redirect and exit if needed

◆ bx_check_redirect_to_remove_install_folder()

bx_check_redirect_to_remove_install_folder (   $bProcessRedirect = false)

Check if redirect to remove install folder. If BX_SKIP_INSTALL_CHECK is defined then this redirect checking is skipped.

Parameters
$bProcessRedirectprocess redirect and exit if needed

◆ bx_convert_array2attrs()

bx_convert_array2attrs (   $a,
  $sClasses = false,
  $sStyles = false 
)

Convert array to attributes string

Example:

$a = array('name' => 'test', 'value' => 5);
echo $s; // outputs: name="test" value="5"
Parameters
$a- array of attributes
$sClasses- classes to merge with 'class' attribute
$sStyles- styles to merge with 'style' attribute
Returns
string

◆ bx_file_get_contents()

bx_file_get_contents (   $sFileUrl,
  $aParams = array(),
  $sMethod = 'get',
  $aHeaders = array(),
$sHttpCode = null,
  $aBasicAuth = array(),
  $iTimeout = 0,
  $aCustomCurlParams = array() 
)

Gets file contents by URL.

Parameters
string$sFileUrl- file URL to be read.
array$aParams- an array of parameters to be pathed with URL.
string$sMethod- post or get.
array$aHeaders- custom headers.
string$sHttpCode- HTTP code to return
array$aBasicAuth- array with 'user' and 'password' for Basic HTTP Auth
Returns
string the file's contents.

◆ bx_gen_method_name()

bx_gen_method_name (   $s,
  $aWordsDelimiter = array('_') 
)

Transform string to method name string, for example it changes 'some_method' string to 'SomeMethod' string

Parameters
$sstring where words are separated with underscore
$aWordsDelimiterword delimeters
Returns
string where every word begins with capital letter

◆ bx_get_logged_profile_id()

bx_get_logged_profile_id ( )
Returns
corrently logged in profile id

◆ bx_get_self_url()

bx_get_self_url ( )

Get URL of current page

◆ bx_get_site_info_fix_relative_url()

bx_get_site_info_fix_relative_url (   $sSourceUrl,
  $s 
)

Fix relative URL to make it absolute

Parameters
$sSourceUrlmain URL
$sURL to fix
Returns
absolute URL or URL wothout changes

◆ bx_get_ver()

bx_get_ver (   $bInvalidateCache = false)

Get system DB version, for files version

See also
BX_DOL_VERSION, these versions must match

◆ bx_has_proto()

bx_has_proto (   $sLink)

Checks protocol in the link

◆ bx_html_attribute()

bx_html_attribute (   $mixedInput,
  $iQuoteType = BX_ESCAPE_STR_AUTO 
)

Return input string/array ready to pass to html attribute with filtered symbols like ', " etc

Parameters
$mixedInput- string/array which should be filtered
$iQuoteType- string escaping BX_ESCAPE_STR_AUTO, BX_ESCAPE_STR_APOS or BX_ESCAPE_STR_QUOTE
Returns
converted string / array

◆ bx_import()

bx_import (   $sClassName,
  $mixedModule = array() 
)

Import class file, it automatically detects class path by its prefix or module array/name

Parameters
$sClassName- full class name or class postfix(withoit prefix) in the case of module class
$mixedModule- module array or module name in the case of module class

◆ bx_instance()

bx_instance (   $sClassName,
  $aParams = array(),
  $mixedModule = array() 
)

Gets an instance of class pathing necessary parameters if it's necessary.

Parameters
string$sClassNameclass name.
array$aParamsan array of parameters to be pathed to the constructor of the class.
array$mixedModulean array with module description. Is used when the requested class is located in some module.
Returns
unknown

◆ bx_is_srv()

bx_is_srv (   $mixedModule,
  $sMethod,
  $sClass = "Module",
  $bIgnoreInactive = false 
)

Check whether serice method exists or not

Parameters
$mixedmodule name or module id
$sMethodservice method name in format 'method_name', corresponding class metod is serviceMethodName
$sClassclass to search for service method, by default it is main module class
Returns
boolean check result

◆ bx_is_srv_ii()

bx_is_srv_ii (   $mixedModule,
  $sMethod,
  $sClass = "Module" 
)

Check whether serice method exists or not in 'Ignore Inactive' mode.

◆ bx_js_string()

bx_js_string (   $mixedInput,
  $iQuoteType = BX_ESCAPE_STR_AUTO 
)

Escapes string/array ready to pass to js script with filtered symbols like ', " etc

Parameters
$mixedInput- string/array which should be filtered
$iQuoteType- string escaping method: BX_ESCAPE_STR_AUTO(default), BX_ESCAPE_STR_APOS or BX_ESCAPE_STR_QUOTE
Returns
converted string / array

◆ bx_linkify()

bx_linkify (   $text,
  $sAttrs = '',
  $bHtmlSpecialChars = false 
)

Wrap in A tag links in TEXT string

Parameters
$text- text string without tags
$sAttrs- attributes string to add to the added A tag
$bHtmlSpecialChars- apply htmlspecialchars before processing
Returns
string where all links are wrapped in A tag

◆ bx_linkify_html()

bx_linkify_html (   $sHtmlOrig,
  $sAttrs = '' 
)

Wrap in A tag links in HTML string, which aren't wrapped in A tag yet

Parameters
$sHtmlOrig- HTML string
$sAttrs- attributes string to add to the added A tag
Returns
modified HTML string, in case of errror original string is returned

◆ bx_log()

bx_log (   $sObject,
  $mixed 
)

Log to logs object

Parameters
$sObject- logs object
$mixed- string or array to log

◆ bx_login()

bx_login (   $iId,
  $bRememberMe = false 
)

Login user by setting necessary cookies

Parameters
$iIdaccount id
$bRememberMeremember session
Returns
false if id isn't correct or array of user info if user was logged in

◆ bx_login_form()

bx_login_form (   $bStudio = false,
  $bAjaxMode = false,
  $sForceRelocate = '' 
)

Display login form and exit

Parameters
$bStudiodisplay login form for studio
$bAjaxModelogin form displayed via AJAX
sForceRelocateforece relocate

◆ bx_logout()

bx_logout (   $bNotify = true)

Logout user by removing cookies

◆ bx_parse_str()

bx_parse_str (   $s)

It works similar to parse_str php function, but it doesn't decode URL params

◆ bx_php_string_apos()

bx_php_string_apos (   $mixedInput)

Escapes string/array ready to pass to php script with filtered symbols like ', " etc

Parameters
mixed$mixedInput- string/array which should be filtered
Returns
converted string / array

◆ bx_process_input()

bx_process_input (   $mixedData,
  $iDataType = BX_DATA_TEXT,
  $mixedParams = false,
  $isCheckMagicQuotes = true 
)

Functions to process user input. DON'T use to process data before passing to SQL query - use db prepare instead

See also
BxDolDb::prepare. It is ok to use bx_process_input and then db prepare.
Parameters
$mixedDatadata to process
$iDataTypehow to handle data, possible valies:
BX_DATA_INT - integer value
BX_DATA_FLOAT - float values
BX_DATA_CHECKBOX - 'on' or empty string
BX_DATA_TEXT - text data, single line (default)
BX_DATA_TEXT_MULTILINE - text data, multiple lines
BX_DATA_HTML - HTML data
BX_DATA_DATE - date data type stored as yyyy-mm-dd
BX_DATA_DATETIME - date/time data type stored as yyyy-mm-dd hh:mm:ss
BX_DATA_DATE_TS' - date data type stored as unixtimestamp
BX_DATA_DATETIME_TS - date/time data type stored as unixtimestamp
BX_DATA_DATE_TS_UTC - date data type stored as unixtimestamp from UTC time
BX_DATA_DATETIME_TS_UTC - date/time data type stored as unixtimestamp from UTC time
$mixedParamsoptional parameters to pass for validation
$isCheckMagicQuotesdeprecated
Returns
the filtered data, or FALSE if the filter fails.

◆ bx_process_macros()

bx_process_macros (   $s)

This function converts macros upon text output. Macros represents constructions like this:

{{!module_name:function[param1, "param2"]}}

For example, to display some content from module Posts:

{{!bx_posts:get_search_result_unit[3]}}

Only users which have "use macros" ACL action enabled can use this functionlity.

Parameters
$stext to process
Returns
modified or not modified text

◆ bx_proto()

bx_proto ( )

Returns current site protocol http:// or https://

◆ bx_require_authentication()

bx_require_authentication (   $bStudio = false,
  $bAjaxMode = false,
  $sForceRelocate = '' 
)

Declare that content is require user authoriztion and display login form if user isn't logged in

Parameters
$bStudiorequire webmaster authorization

◆ bx_show_service_unavailable_error_and_exit()

bx_show_service_unavailable_error_and_exit (   $sMsg = false,
  $iRetryAfter = 86400 
)

Show HTTP 503 service unavailable error and exit

◆ bx_smart_readfile()

bx_smart_readfile (   $sPath,
  $sFilename = '',
  $sMimeType = 'application/octet-stream',
  $iCacheAge = 0,
  $sCachePrivacy = 'public',
  $sContentDisposition = 'inline' 
)

The function is sumilar to php readfile, but it send all required headers and can send file by chunks and suports file seek

Parameters
$sPathpath to file to output to the browser
$sFilenamefilename without path, ig file is saved from browser, then this name is used, not used(empty) by default
$sMimeTypefile mime type, by default 'application/octet-stream'
$iCacheAgefile cache age, by default 0
$sCachePrivacycache privacy 'public' (default value) or 'private'
$sContentDispositioncontent disposition header ('inline' or 'attachment' usually
Returns
true on success or false on error

◆ bx_srv()

bx_srv (   $mixed,
  $sMethod,
  $aParams = array(),
  $sClass = 'Module',
  $bIgnoreCache = false,
  $bIgnoreInactive = false 
)

Perform serice call

Parameters
$mixedmodule name or module id
$sMethodservice method name in format 'method_name', corresponding class metod is serviceMethodName
$aParamsparams to pass to service method
$sClassclass to search for service method, by default it is main module class
Returns
service call result

◆ bx_srv_ic()

bx_srv_ic (   $mixed,
  $sMethod,
  $aParams = array(),
  $sClass = 'Module',
  $bIgnoreInactive = false 
)

Perform serice call in 'Ignore Cache' mode.

◆ bx_srv_ii()

bx_srv_ii (   $mixed,
  $sMethod,
  $aParams = array(),
  $sClass = 'Module',
  $bIgnoreCache = false 
)

Perform serice call in 'Ignore Inactive' mode.

◆ bx_time_js()

bx_time_js (   $iUnixTimestamp,
  $sFormatIdentifier = BX_FORMAT_DATE,
  $bForceFormat = false 
)

Output time wrapped in <time> tag in HTML. Then time is autoformatted using JS upon page load, this is aumatically converted to user's timezone and updated in realtime in case of short periods of 'from now' time format.

This is just short version for:

See also
BxTemplFunctions::timeForJs
Parameters
$iUnixTimestamptime as unixtimestamp
$sFormatIdentifieroutput format identifier
See also
BX_FORMAT_DATE
BX_FORMAT_TIME
BX_FORMAT_DATE_TIME
Parameters
$bForceFormatforce provided format and don't use "from now" time autoformat.

◆ bx_time_utc()

bx_time_utc (   $iUnixTimestamp)

Get UTC/GMT time string in ISO8601 date format from provided unix timestamp

Parameters
$iUnixTimestamp- unix timestamp
Returns
ISO8601 formatted date/time string

◆ bx_trigger_error()

bx_trigger_error (   $sMsg,
  $iNumLevelsBack = 0 
)

Trigger user error

Parameters
$sMsgmessage to display
$iNumLevelsBackadd additional debug backtracing N levels back

◆ bx_trim_nl_duplicates()

bx_trim_nl_duplicates (   $s)

Strip all lines with no information for example:

,

◆ check_logged()

check_logged ( )

Check if user is logged in (necessary cookies are present) and set some global variables

◆ checkAllowedConnect()

BxDolRelation::checkAllowedConnect (   $iInitiator,
  $iContent,
  $isPerformAction = false,
  $isMutual = false,
  $isInvertResult = false,
  $isSwap = false,
  $isCheckExists = true 
)

Check whether connection between Initiator and Content can be established.

◆ checkAllowedConnectCustom()

BxDolRelation::checkAllowedConnectCustom (   $iInitiator,
  $iContent,
  $isPerformAction = false,
  $isMutual = false,
  $isInvertResult = false,
  $isSwap = false,
  $isCheckExists = true 
)

Custom check action method which can be overwritten. Currently only friends can establish relations.

◆ confirmConnection()

BxDolRelation::confirmConnection (   $iInitiator,
  $iContent 
)

Confirm relation request without creation of retroactive relation.

Parameters
$iInitiatorinitiator of the connection, in most cases some profile id
$iContentcontent to make connection to, in most cases some content id, or other profile id in case of friends
Returns
true - if connection was added, false - if connection already exists or error occured

◆ DesignBoxContent()

DesignBoxContent (   $sTitle,
  $sContent,
  $iTemplateNum = BX_DB_DEF,
  $mixedMenu = false 
)

Display "design box" HTML code

See also
BxBaseFunctions::DesignBoxContent
BX_DB_CONTENT_ONLY
BX_DB_DEF
BX_DB_EMPTY
BX_DB_NO_CAPTION
BX_DB_PADDING_CONTENT_ONLY
BX_DB_PADDING_DEF
BX_DB_PADDING_NO_CAPTION

◆ encryptUserId()

encryptUserId (   $sId)

Hash profile ID

◆ encryptUserPwd()

encryptUserPwd (   $sPwd,
  $sSalt 
)

Encrypt user password. When BX_PWD_ALGO is 'custom', then bx_custom_pwd_encrypt function with custom algorythm must be defined in inc/header.inc.php file.

Parameters
$sPwdclear password
$sSaltsalt
Returns
password hash

◆ getCommonContentExt()

BxDolRelation::getCommonContentExt (   $iInitiator1,
  $iInitiator2,
  $isMutual = false,
  $iStart = 0,
  $iLimit = BX_CONNECTIONS_LIST_LIMIT,
  $iOrder = BX_CONNECTIONS_ORDER_NONE 
)

Get common content (full info) between two initiators

Parameters
$iInitiator1one initiator
$iInitiator2second initiator
$isMutualget mutual connections only
Returns
array of available connections

◆ getConnectedContentExt()

BxDolRelation::getConnectedContentExt (   $iInitiator,
  $isMutual = false,
  $iStart = 0,
  $iLimit = BX_CONNECTIONS_LIST_LIMIT,
  $iOrder = BX_CONNECTIONS_ORDER_NONE 
)

Get connected content (full info)

Parameters
$iInitiatorinitiator of the connection
$isMutualget mutual connections only
Returns
array of available connections

◆ getConnectedInitiatorsExt()

BxDolRelation::getConnectedInitiatorsExt (   $iContent,
  $isMutual = false,
  $iStart = 0,
  $iLimit = BX_CONNECTIONS_LIST_LIMIT,
  $iOrder = BX_CONNECTIONS_ORDER_NONE 
)

Get connected initiators (full info)

Parameters
$iContentcontent of the connection
$isMutualget mutual connections only
Returns
array of available connections

◆ getConnectionsAsArrayExt()

BxDolRelation::getConnectionsAsArrayExt (   $sContentType,
  $iId1,
  $iId2,
  $isMutual = false,
  $iStart = 0,
  $iLimit = BX_CONNECTIONS_LIST_LIMIT,
  $iOrder = BX_CONNECTIONS_ORDER_NONE 
)

Compound function, which calls getCommonContentExt, getConnectedContentExt or getConnectedInitiatorsExt depending on $sContentType

Parameters
$sContentTypecontent type to get BX_CONNECTIONS_CONTENT_TYPE_CONTENT, BX_CONNECTIONS_CONTENT_TYPE_INITIATORS or BX_CONNECTIONS_CONTENT_TYPE_COMMON
$iId1one content or initiator
$iId2second content or initiator only in case of BX_CONNECTIONS_CONTENT_TYPE_COMMON content type
$isMutualget mutual connections only
Returns
array of available connections

◆ getLoggedId()

getLoggedId ( )
Returns
logged in account id

◆ getLoggedPassword()

getLoggedPassword ( )
Returns
logged in account password

◆ htmlspecialchars_adv()

htmlspecialchars_adv (   $string)

DEPRECATED

use bx_process_input + bx_process_output instead

function for processing pass data

This function cleans the GET/POST/COOKIE data if magic_quotes_gpc() is on for data which should be outputed immediately after submit

◆ isEnabled()

static BxDolRelation::isEnabled ( )
static

Whether the Relations feature is enabled globaly or not.

Returns
boolean

◆ isLogged()

isLogged ( )
Returns
true if user is logged in

◆ isMember()

isMember (   $iId = 0)

It checks if account role is member.

Returns
true if account is admin

◆ isRole()

if (!function_exists("isAdmin")) isRole (   $iRole,
  $iId = 0 
)

Check user role

Parameters
$iRolerole to check user for
$iIdoptional account id, if it isn't specified then curently logged in account is used
Returns
true if user is in the provided role

◆ send_headers_page_changed()

send_headers_page_changed ( )

Use this function in pages if you want to not cache it.

◆ sendMail()

sendMail (   $mRecipientEmails,
  $sMailSubject,
  $sMailBody,
  $iRecipientID = 0,
  $aPlus = array(),
  $iEmailType = BX_EMAIL_NOTIFY,
  $sEmailFlag = 'html',
  $isDisableAlert = false,
  $aCustomHeaders = array(),
  $bAddToQueue = false 
)

Send email function

Parameters
$mRecipientEmails- Email where email should be send, can be array, string with one email or comma separated
$sMailSubject- subject of the message
$sMailBody- Body of the message
$iRecipientID- ID of recipient profile
$aPlus- Array of additional information
$iEmailType- email message type: BX_EMAIL_SYSTEM, BX_EMAIL_NOTIFY or BX_EMAIL_MASS
$sEmailFlag- use 'html' for HTML email message
$isDisableAlert- disable alert
$aCustomHeaders- custom email headers
$bAddToQueue- add message to email queue
Returns
true if message was send or false otherwise

◆ sendMailTemplate()

sendMailTemplate (   $sTemplateName,
  $iAccountId = 0,
  $iProfileId = 0,
  $aReplaceVars = array(),
  $iEmailType = BX_EMAIL_NOTIFY,
  $bAddToQueue = false 
)

Send mail to user by parsing email template

◆ sendMailTemplateSystem()

sendMailTemplateSystem (   $sTemplateName,
  $aReplaceVars = array(),
  $iEmailType = BX_EMAIL_SYSTEM,
  $bAddToQueue = false 
)

Send system email

◆ title2uri()

title2uri (   $sValue)

< file name to use as mantenance mode indicator

The following two functions are needed to convert title to uri and back. It usefull when titles are used in URLs, like in Categories and Tags.

Variable Documentation

◆ $GLOBALS

$GLOBALS[ 'bxDolClasses'] = array()

Classes instances are stored here

◆ BX_CONNECTIONS_CONTENT_TYPE_COMMON

const BX_CONNECTIONS_CONTENT_TYPE_COMMON 'common'

Connections content type: common

◆ BX_CONNECTIONS_CONTENT_TYPE_CONTENT

const BX_CONNECTIONS_CONTENT_TYPE_CONTENT 'content'

Connections content type: content

◆ BX_CONNECTIONS_CONTENT_TYPE_INITIATORS

const BX_CONNECTIONS_CONTENT_TYPE_INITIATORS 'initiators'

Connections content type: initiators

◆ BX_CONNECTIONS_LIST_COUNTER

const BX_CONNECTIONS_LIST_COUNTER 5

Default limit for connections list in Counter.

◆ BX_CONNECTIONS_LIST_LIMIT

const BX_CONNECTIONS_LIST_LIMIT 1000

Default limit for connections lists

◆ BX_CONNECTIONS_LIST_NO_LIMIT

const BX_CONNECTIONS_LIST_NO_LIMIT -1

No limit for connections lists. Is needed for Total Number calculation.

◆ BX_CONNECTIONS_ORDER_ADDED_ASC

const BX_CONNECTIONS_ORDER_ADDED_ASC 1

Connections order: by addded time, asceding

◆ BX_CONNECTIONS_ORDER_ADDED_DESC

const BX_CONNECTIONS_ORDER_ADDED_DESC 2

Connections order: by addded time, desceding

◆ BX_CONNECTIONS_ORDER_NONE

const BX_CONNECTIONS_ORDER_NONE 0

Connections order: no order

◆ BX_CONNECTIONS_TYPE_MUTUAL

const BX_CONNECTIONS_TYPE_MUTUAL 'mutual'

Connection type: mutual

◆ BX_CONNECTIONS_TYPE_ONE_WAY

const BX_CONNECTIONS_TYPE_ONE_WAY 'one-way'

Connection type: one-way

◆ BX_DATA_VALUES_ADDITIONAL

const BX_DATA_VALUES_ADDITIONAL 'LKey2'

< Use default values for data items,

See also
BxDolForm::getDataItems

◆ BX_DATA_VALUES_ALL

const BX_DATA_VALUES_ALL 'all'

< Use additional values for data items,

See also
BxDolForm::getDataItems

◆ BX_DB_CONTENT_ONLY

const BX_DB_CONTENT_ONLY 0

design box with content only - no borders, no background, no caption

See also
DesignBoxContent

◆ BX_DB_DEF

const BX_DB_DEF 1

default design box with content, borders and caption

See also
DesignBoxContent

◆ BX_DB_EMPTY

const BX_DB_EMPTY 2

just empty design box, without anything

See also
DesignBoxContent

◆ BX_DB_NO_CAPTION

const BX_DB_NO_CAPTION 3

design box with content, like BX_DB_DEF but without caption

See also
DesignBoxContent

◆ BX_DB_PADDING_CONTENT_ONLY

const BX_DB_PADDING_CONTENT_ONLY 10

design box with content only wrapped with default padding - no borders, no background, no caption it can be used to just wrap content with default padding

See also
DesignBoxContent

◆ BX_DB_PADDING_DEF

const BX_DB_PADDING_DEF 11

default design box with content wrapped with default padding, borders and caption

See also
DesignBoxContent

◆ BX_DB_PADDING_NO_CAPTION

const BX_DB_PADDING_NO_CAPTION 13

design box with content wrapped with default padding, like BX_DB_DEF but without caption

See also
DesignBoxContent

◆ BX_EDITOR_FULL

const BX_EDITOR_FULL 2

Full WYSIWYG editor view. If not supported by editor, standard view is used.

See also
BxDolEditor::attachEditor

◆ BX_EDITOR_MINI

const BX_EDITOR_MINI 3

Mini WYSIWYG editor view. If not supported by editor, standard view is used.

See also
BxDolEditor::attachEditor

◆ BX_EDITOR_STANDARD

const BX_EDITOR_STANDARD 1

Standard WYSIWYG editor view.

See also
BxDolEditor::attachEditor

◆ BX_EMAIL_SYSTEM

const BX_EMAIL_SYSTEM 0

< escape quotes only, for js strings enclosed in quotes, for use in

See also
bx_js_string and
bx_html_attribute

◆ BX_ESCAPE_STR_APOS

const BX_ESCAPE_STR_APOS 1

< turn apostropes and quote signs into html special chars, for use in

See also
bx_js_string and
bx_html_attribute

◆ BX_ESCAPE_STR_QUOTE

const BX_ESCAPE_STR_QUOTE 2

< escape apostrophes only, for js strings enclosed in apostrophes, for use in

See also
bx_js_string and
bx_html_attribute

◆ BX_FORMAT_DATE_TIME

const BX_FORMAT_DATE_TIME 'sys_format_datetime'

< time format identifier for use in

See also
bx_time_js function

◆ BX_FORMAT_TIME

const BX_FORMAT_TIME 'sys_format_time'

< date format identifier for use in

See also
bx_time_js function

◆ BX_MENU_TEMPLATE_SUBMENU

const BX_MENU_TEMPLATE_SUBMENU 8

< datetime format identifier for use in

See also
bx_time_js function

◆ BX_PAGE_DEFAULT

const BX_PAGE_DEFAULT 0

Page display levels. Note. Both levels may refer to the same HTML templates.

'System' level. It uses page's NameIndex and is mainly used for pages which aren't registered in 'sys_objects_page' table. Also it's used in 'Injections' engine.

◆ BX_PAGE_TYPE_DEFAULT

const BX_PAGE_TYPE_DEFAULT 1

< transition page with redirect to display some msg, like 'please wait', without headers footers

'Builder based' level. It uses page's Type from BxDolPage class and is used for pages which are registered in 'sys_objects_page' table. Changeable in Studio -> Pages Builder -> Settings.

◆ BX_PLAYER_EMBED

const BX_PLAYER_EMBED 2

Player view in embed. If not supported by player, standard view is used.

See also
BxDolPlayer::attachPlayer

◆ BX_PLAYER_MINI

const BX_PLAYER_MINI 3

Mini Player view. If not supported by player, standard view is used.

See also
BxDolPlayer::attachPlayer

◆ BX_PLAYER_STANDARD

const BX_PLAYER_STANDARD 1

Standard Player view.

See also
BxDolPlayer::attachPlayer

◆ CHECK_ACTION_LANG_FILE_ACTION

const CHECK_ACTION_LANG_FILE_ACTION 1

Nodes of $args array that are passed to _t_ext() function by checkAction()

◆ CHECK_ACTION_MESSAGE_NOT_ALLOWED

const CHECK_ACTION_MESSAGE_NOT_ALLOWED "_sys_acl_action_not_allowed"

Message constants passed to _t_ext() function by checkAction()

NOTE: checkAction() returns language dependent messages

◆ CHECK_ACTION_RESULT

const CHECK_ACTION_RESULT 0

Indices for checkAction() result array

◆ CHECK_ACTION_RESULT_ALLOWED

const CHECK_ACTION_RESULT_ALLOWED 0

CHECK_ACTION_RESULT node values

◆ if

if(!defined('BX_DOL_SKIP_ATIME_UPDATE')) define('BX_DOL_SKIP_ATIME_UPDATE'

< file is subject to delete

time interval to not update last access time, it should be comaparatively low compared to atime_prining

max image dimension which will be processes as retine on mobiles

◆ MEMBERSHIP_ACTION_EDIT_ANY_ENTRY

const MEMBERSHIP_ACTION_EDIT_ANY_ENTRY 'edit any entry'

Standard membership actions

◆ MEMBERSHIP_ID_NON_MEMBER

const MEMBERSHIP_ID_NON_MEMBER 1

Standard membership ID's

◆ MEMBERSHIP_PERIOD_UNIT_DAY

const MEMBERSHIP_PERIOD_UNIT_DAY 'day'

Standard period units