本文整理汇总了PHP中BxDolAlerts类的典型用法代码示例。如果您正苦于以下问题:PHP BxDolAlerts类的具体用法?PHP BxDolAlerts怎么用?PHP BxDolAlerts使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BxDolAlerts类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getCode
public function getCode($sUrl, $sTitle, $aCustomVars = false)
{
// define markers for replacments
$aMarkers = array('url' => $sUrl, 'url_encoded' => rawurlencode($sUrl), 'lang' => $GLOBALS['sCurrentLanguage'], 'locale' => $this->_getLocaleFacebook($GLOBALS['sCurrentLanguage']), 'twit' => _t('_sys_social_sharing_twit'), 'title' => $sTitle, 'title_encoded' => rawurlencode($sTitle));
if (!empty($aCustomVars) && is_array($aCustomVars)) {
$aMarkers = array_merge($aMarkers, $aCustomVars);
}
// alert
$sOverrideOutput = null;
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts('system', 'social_sharing_display', '', '', array('buttons' => &$this->_aSocialButtons, 'markers' => &$aMarkers, 'override_output' => &$sOverrideOutput));
$oAlert->alert();
// return custom code if there is one
if ($sOverrideOutput) {
return $sOverrideOutput;
}
// return empty string of there is no buttons
if (empty($this->_aSocialButtons)) {
return '';
}
// prepare buttons
$aButtons = array();
foreach ($this->_aSocialButtons as $aButton) {
$sButton = $this->_replaceMarkers($aButton['content'], $aMarkers);
if (preg_match('/{[A-Za-z0-9_]+}/', $sButton)) {
// if not all markers are replaced skip it
continue;
}
$aButtons[] = array('button' => $sButton);
}
// output
$aTemplateVars = array('bx_repeat:buttons' => $aButtons);
return $GLOBALS['oSysTemplate']->parseHtmlByName('social_sharing.html', $aTemplateVars);
}
开发者ID:noormcs,项目名称:studoro,代码行数:34,代码来源:BxBaseSocialSharing.php
示例2: post
function post($sSystem, $iId, $iCmtAuthorId, $iCmtParentId, $iMood, $sFileId)
{
global $sIncPath;
global $sModule;
global $sHomeUrl;
$iId = (int) $iId;
$iCmtParentId = (int) $iCmtParentId;
$iMood = (int) $iMood;
bx_import('BxDolCmts');
$oCmts = BxDolCmts::getObjectInstance($sSystem, $iId);
if (!$oCmts) {
return 0;
}
$sText = '<iframe width="100%" height="240" src="[ray_url]modules/video_comments/embed.php?id=' . $sFileId . '" frameborder="0" allowfullscreen></iframe>';
$mixedOverrideResult = null;
$oAlert = new BxDolAlerts('bx_video_comments', 'post', $sFileId, getLoggedId(), array('override' => &$mixedOverrideResult, 'text' => &$sText, 'file_id' => &$sFileId, 'object_id' => &$iId, 'author' => &$iCmtAuthorId, 'parent_id' => &$iCmtParentId, 'mood' => &$iMood));
$oAlert->alert();
if (null !== $mixedOverrideResult) {
return $mixedOverrideResult;
}
$iCmtNewId = $oCmts->_oQuery->addComment($iId, $iCmtParentId, $iCmtAuthorId, $sText, $iMood);
if (false === $iCmtNewId) {
return 0;
}
bx_import('BxDolAlerts');
$oZ = new BxDolAlerts($sSystem, 'commentPost', $oCmts->getId(), $oCmts->_getAuthorId(), array('comment_id' => $iCmtNewId, 'comment_author_id' => $iCmtAuthorId));
$oZ->alert();
$oCmts->_triggerComment();
return $iCmtNewId;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:30,代码来源:customFunctions.inc.php
示例3: makeView
function makeView()
{
if (!$this->isEnabled()) {
return false;
}
$iMemberId = getLoggedId() ? getLoggedId() : 0;
$sIp = $_SERVER['REMOTE_ADDR'];
$iTime = time();
if ($iMemberId) {
$sWhere = " AND `viewer` = '{$iMemberId}' ";
} else {
$sWhere = " AND `viewer` = '0' AND `ip` = INET_ATON('{$sIp}') ";
}
$iTs = (int) $GLOBALS['MySQL']->getOne("SELECT `ts` FROM `{$this->_aSystem['table_track']}` WHERE `id` = '" . $this->getId() . "' {$sWhere}");
$iRet = 0;
if (!$iTs) {
$iRet = $GLOBALS['MySQL']->query("INSERT IGNORE INTO `{$this->_aSystem['table_track']}` SET `id` = '" . $this->getId() . "', `viewer` = '{$iMemberId}', `ip` = INET_ATON('{$sIp}'), `ts` = {$iTime}");
} elseif ($iTime - $iTs > $this->_aSystem['period']) {
$iRet = $GLOBALS['MySQL']->query("UPDATE `{$this->_aSystem['table_track']}` SET `ts` = {$iTime} WHERE `id` = '" . $this->getId() . "' AND `viewer` = '{$iMemberId}' AND `ip` = INET_ATON('{$sIp}')");
}
if ($iRet) {
$this->_triggerView();
$oZ = new BxDolAlerts($this->_sSystem, 'view', $this->getId(), $iMemberId);
$oZ->alert();
return true;
}
return false;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:28,代码来源:BxDolViews.php
示例4: onPost
public function onPost($iId)
{
//--- Event -> Post for Alerts Engine ---//
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'post', $iId);
$oAlert->alert();
//--- Event -> Post for Alerts Engine ---//
}
开发者ID:blas-dmx,项目名称:trident,代码行数:8,代码来源:BxNtfsModule.php
示例5: onContact
protected function onContact()
{
$iUserId = $this->getUserId();
$this->isAllowedContact(true);
//--- Event -> Contact for Alerts Engine ---//
$oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'contact', 0, $iUserId);
$oAlert->alert();
//--- Event -> Contact for Alerts Engine ---//
}
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxContactModule.php
示例6: getEmbedCode
function getEmbedCode($iFileId)
{
$sOverride = false;
$oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'embed_code', $iFileId, getLoggedId(), array('override' => &$sOverride));
$oAlert->alert();
if ($sOverride) {
return $sOverride;
}
$iFileId = (int) $iFileId;
return getEmbedCode('mp3', 'player', array('id' => $iFileId));
}
开发者ID:noormcs,项目名称:studoro,代码行数:11,代码来源:BxSoundsTemplate.php
示例7: generateUserNewPwd
function generateUserNewPwd($ID)
{
$sPwd = genRndPwd();
$sSalt = genRndSalt();
$sQuery = "\n UPDATE `Profiles`\n SET\n `Password` = '" . encryptUserPwd($sPwd, $sSalt) . "',\n `Salt` = '{$sSalt}'\n WHERE\n `ID`='{$ID}'\n ";
db_res($sQuery);
createUserDataFile($ID);
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php';
$oZ = new BxDolAlerts('profile', 'edit', $ID);
$oZ->alert();
return $sPwd;
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:12,代码来源:forgot.php
示例8: blockUser
function blockUser($iUserId, $iBlockedId, $bBlock)
{
bx_import('BxDolAlerts');
if ($bBlock) {
getResult("REPLACE INTO `sys_block_list` SET `ID` = '" . $iUserId . "', `Profile` = '" . $iBlockedId . "'");
$oZ = new BxDolAlerts('block', 'add', $iBlockedId, $iUserId);
} else {
getResult("DELETE FROM `sys_block_list` WHERE `ID` = '" . $iUserId . "' AND `Profile` = '" . $iBlockedId . "'");
$oZ = new BxDolAlerts('block', 'delete', $iBlockedId, $iUserId);
}
$oZ->alert();
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:12,代码来源:customFunctions.inc.php
示例9: PageCodeAdd
function PageCodeAdd()
{
$oInstallerUi = new BxDolInstallerUi();
$sResult = '';
if (isset($_POST['submit_upload']) && isset($_FILES['module']) && !empty($_FILES['module']['tmp_name']) && isset($GLOBALS['aEnabledTemplateAction']['upload'])) {
$sResult = $oInstallerUi->actionUpload('template', $_FILES['module'], $_POST);
}
$sContent = $oInstallerUi->getUploader($sResult, '_Template', true, $GLOBALS['aPages']['add']['url']);
$sContent = DesignBoxAdmin($GLOBALS['sPageTitle'], $sContent, $GLOBALS['aTopItems'], '', 11);
$oZ = new BxDolAlerts('system', 'admin_templates_blocks_add', 0, 0, array('title' => &$GLOBALS['sPageTitle'], 'code' => &$sContent));
$oZ->alert();
return $sContent;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:13,代码来源:templates.php
示例10: insertEvent
function insertEvent($aParams)
{
if ((int) $this->query("INSERT INTO `" . $this->_sPrefix . "events`(`" . implode("`, `", array_keys($aParams)) . "`, `date`) VALUES('" . implode("', '", array_values($aParams)) . "', UNIX_TIMESTAMP())") <= 0) {
return 0;
}
$iId = (int) $this->lastId();
if ($iId > 0 && isset($aParams['owner_id']) && (int) $aParams['owner_id'] > 0) {
//--- Wall -> Update for Alerts Engine ---//
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts('bx_' . $this->_oConfig->getUri(), 'update', $aParams['owner_id']);
$oAlert->alert();
//--- Wall -> Update for Alerts Engine ---//
}
return $iId;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:15,代码来源:BxWallDb.php
示例11: getUploaders
/**
* Get uploaders array
* @return array of uploaders
*/
function getUploaders()
{
if ($this->aUploaders) {
return $this->aUploaders;
}
// uploaders list with the following keys:
// 'title' - uploader title
// 'action' - uploader action name, action name must be passed with the submitted form as well as 'action'
// 'form' - uploader class method to get the uploader form, or service call array to get the form
// 'handle' - uploader class method to handle uploader form, or service call array to process form upload
$this->aUploaders = array('html5' => array('title' => '_sys_txt_uploader_html5', 'action' => 'accept_html5', 'form' => 'getUploadHtml5File', 'handle' => 'serviceAcceptHtml5File'), 'regular' => array('title' => '_' . $this->sPrefix . '_regular', 'action' => 'accept_upload', 'form' => 'getUploadFormFile', 'handle' => 'serviceAcceptFile'), 'record' => array('title' => '_' . $this->sPrefix . '_record', 'action' => 'accept_record', 'form' => 'getRecordFormFile', 'handle' => 'serviceAcceptRecordFile'), 'embed' => array('title' => '_' . $this->sPrefix . '_embed', 'action' => 'accept_embed', 'form' => 'getEmbedFormFile', 'handle' => 'serviceAcceptEmbedFile'));
$oAlert = new BxDolAlerts($this->getMainPrefix(), 'uploaders_init', 0, getLoggedId(), array('uploaders' => &$this->aUploaders, 'config' => $this));
$oAlert->alert();
return $this->aUploaders;
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:19,代码来源:BxDolFilesConfig.php
示例12: getCode
public function getCode($sContentId, $sModuleName, $sUrl, $sTitle, $aCustomVars = false)
{
// define markers for replacments
bx_import('BxDolLanguages');
$sLang = BxDolLanguages::getInstance()->getCurrentLanguage();
$aMarkers = array('id' => $sContentId, 'module' => $sModuleName, 'url' => $sUrl, 'url_encoded' => rawurlencode($sUrl), 'lang' => $sLang, 'locale' => $this->_getLocaleFacebook($sLang), 'title' => $sTitle, 'title_encoded' => rawurlencode($sTitle));
if (!empty($aCustomVars) && is_array($aCustomVars)) {
$aMarkers = array_merge($aMarkers, $aCustomVars);
}
// alert
$sOverrideOutput = null;
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts('system', 'social_sharing_display', '', '', array('buttons' => &$this->_aSocialButtons, 'markers' => &$aMarkers, 'override_output' => &$sOverrideOutput));
$oAlert->alert();
// return custom code if there is one
if ($sOverrideOutput) {
return $sOverrideOutput;
}
// return empty string of there is no buttons
if (empty($this->_aSocialButtons)) {
return '';
}
// prepare buttons
$aButtons = array();
foreach ($this->_aSocialButtons as $aButton) {
switch ($aButton['type']) {
case 'html':
$sButton = $this->_replaceMarkers($aButton['content'], $aMarkers);
break;
case 'service':
$a = @unserialize($aButton['content']);
if (false === $a || !is_array($a)) {
break;
}
$a = $this->_replaceMarkers($a, $aMarkers);
$sButton = BxDolService::call($a['module'], $a['method'], isset($a['params']) ? $a['params'] : array(), isset($a['class']) ? $a['class'] : 'Module');
break;
}
if (!isset($sButton) || preg_match('/{[A-Za-z0-9_]+}/', $sButton)) {
// if not all markers are replaced skip it
continue;
}
$aButtons[] = array('button' => $sButton, 'object' => $aButton['object']);
}
// output
$aTemplateVars = array('bx_repeat:buttons' => $aButtons);
return $this->_oTemplate->parseHtmlByName('social_sharing.html', $aTemplateVars);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:48,代码来源:BxBaseSocialSharing.php
示例13: actionCmtPost
function actionCmtPost()
{
$mixedResult = parent::actionCmtPost();
if (empty($mixedResult)) {
return $mixedResult;
}
$aEvent = $this->_oModule->_oDb->getEvents(array('browse' => 'id', 'object_id' => (int) $this->getId()));
if (isset($aEvent['owner_id']) && (int) $aEvent['owner_id'] > 0) {
//--- Wall -> Update for Alerts Engine ---//
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts('bx_' . $this->_oModule->_oConfig->getUri(), 'update', $aEvent['owner_id']);
$oAlert->alert();
//--- Wall -> Update for Alerts Engine ---//
}
return $mixedResult;
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:16,代码来源:BxWallCmts.php
示例14: processing
function processing()
{
$aIds = array();
if ($this->_oModule->_oDb->publish($aIds)) {
foreach ($aIds as $iId) {
//--- Entry -> Publish for Alerts Engine ---//
$oAlert = new BxDolAlerts($this->_oModule->_oConfig->getAlertsSystemName(), 'publish', $iId);
$oAlert->alert();
//--- Entry -> Publish for Alerts Engine ---//
//--- Reparse Global Tags ---//
$oTags = new BxDolTags();
$oTags->reparseObjTags($this->_oModule->_oConfig->getTagsSystemName(), $iId);
//--- Reparse Global Tags ---//
//--- Reparse Global Categories ---//
$oCategories = new BxDolCategories();
$oCategories->reparseObjTags($this->_oModule->_oConfig->getCategoriesSystemName(), $iId);
//--- Reparse Global Categories ---//
}
}
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:20,代码来源:BxDolTextCron.php
示例15: insertEvent
function insertEvent($aParams)
{
$aSet = array();
foreach ($aParams as $sKey => $sValue) {
$aSet[] = "`" . $sKey . "`='" . $sValue . "'";
}
if (!array_key_exists('date', $aParams)) {
$aSet[] = "`date`=UNIX_TIMESTAMP()";
}
if ((int) $this->query("INSERT INTO `" . $this->_sPrefix . "events` SET " . implode(", ", $aSet)) <= 0) {
return 0;
}
$iId = (int) $this->lastId();
if ($iId > 0 && isset($aParams['owner_id']) && (int) $aParams['owner_id'] > 0) {
//--- Wall -> Update for Alerts Engine ---//
bx_import('BxDolAlerts');
$oAlert = new BxDolAlerts('bx_' . $this->_oConfig->getUri(), 'update', $aParams['owner_id']);
$oAlert->alert();
//--- Wall -> Update for Alerts Engine ---//
}
return $iId;
}
开发者ID:hyrmedia,项目名称:dolphin.pro,代码行数:22,代码来源:BxWallDb.php
示例16: getMainMenu
public static function getMainMenu()
{
if (!isAdmin()) {
return '';
}
$sUri = $_SERVER['REQUEST_URI'];
$sPath = parse_url(BX_DOL_URL_ROOT, PHP_URL_PATH);
if ($sPath && $sPath != '/' && 0 == strncmp($sPath, $sUri, strlen($sPath))) {
$sUri = substr($sUri, strlen($sPath) - strlen($sUri));
}
$sUri = BX_DOL_URL_ROOT . trim($sUri, '/');
$sFile = basename($_SERVER['PHP_SELF']);
$oPermalinks = new BxDolPermalinks();
$aMenu = $GLOBALS['MySQL']->getAll("SELECT `id`, `name`, `title`, `url`, `icon` FROM `sys_menu_admin` WHERE `parent_id`='0' ORDER BY `order`");
$oZ = new BxDolAlerts('system', 'admin_menu', 0, 0, array('parent' => false, 'menu' => &$aMenu));
$oZ->alert();
$oBxDolAdminMenu = new self();
$aItems = array();
foreach ($aMenu as $aMenuItem) {
$aMenuItem['url'] = str_replace(array('{siteUrl}', '{siteAdminUrl}'), array(BX_DOL_URL_ROOT, BX_DOL_URL_ADMIN), $aMenuItem['url']);
$bActiveCateg = $sFile == 'index.php' && !empty($_GET['cat']) && $_GET['cat'] == $aMenuItem['name'];
$aSubmenu = $GLOBALS['MySQL']->getAll("SELECT * FROM `sys_menu_admin` WHERE `parent_id`= ? ORDER BY `order`", [$aMenuItem['id']]);
$oZ = new BxDolAlerts('system', 'admin_menu', 0, 0, array('parent' => &$aMenuItem, 'menu' => &$aSubmenu));
$oZ->alert();
$aSubitems = array();
foreach ($aSubmenu as $aSubmenuItem) {
$aSubmenuItem['url'] = $oPermalinks->permalink($aSubmenuItem['url']);
$aSubmenuItem['url'] = str_replace(array('{siteUrl}', '{siteAdminUrl}'), array(BX_DOL_URL_ROOT, BX_DOL_URL_ADMIN), $aSubmenuItem['url']);
if (!defined('BX_DOL_ADMIN_INDEX') && $aSubmenuItem['url'] != '' && (strpos($sUri, $aSubmenuItem['url']) !== false || strpos($aSubmenuItem['url'], $sUri) !== false)) {
$bActiveCateg = $bActiveItem = true;
} else {
$bActiveItem = false;
}
$aSubitems[] = $oBxDolAdminMenu->_getMainMenuSubitem($aSubmenuItem, $bActiveItem);
}
$aItems[] = $oBxDolAdminMenu->_getMainMenuItem($aMenuItem, $aSubitems, $bActiveCateg);
}
return $GLOBALS['oAdmTemplate']->parseHtmlByName('main_menu.html', array('bx_repeat:items' => $aItems));
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:39,代码来源:BxDolAdminMenu.php
示例17: getEmbedCode
function getEmbedCode($iFileId, $aExtra = array())
{
$sOverride = false;
$oAlert = new BxDolAlerts($this->_oConfig->getMainPrefix(), 'embed_code', $iFileId, getLoggedId(), array('override' => &$sOverride));
$oAlert->alert();
if ($sOverride) {
return $sOverride;
}
$iFileId = (int) $iFileId;
switch ($aExtra["source"]) {
case "":
$sEmbedCode = getEmbedCode('video', 'player', array('id' => $iFileId));
break;
case "youtube":
$sEmbedCode = str_replace("#video#", $aExtra["video"], YOUTUBE_VIDEO_EMBED);
$sEmbedCode = str_replace("#wmode#", getWMode(), $sEmbedCode);
$sEmbedCode = str_replace("#autoplay#", getSettingValue("video", "autoPlay") == TRUE_VAL ? "&autoplay=1" : "", $sEmbedCode);
break;
default:
$sEmbedCode = video_getCustomEmbedCode($aExtra["source"], $aExtra["video"]);
break;
}
return $sEmbedCode;
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:24,代码来源:BxVideosTemplate.php
示例18: BxDolAlerts
/**
* Constructor
* @param string $sType - system type
* @param string $sAction - system action
* @param int $iObjectId - object id
* @param int $iSenderId - sender (action's author) id
*/
function BxDolAlerts($sUnit, $sAction, $iObjectId, $iSender = 0, $aExtras = array())
{
$oCache = $GLOBALS['MySQL']->getDbCacheObject();
$aData = $oCache->getData($GLOBALS['MySQL']->genDbCacheKey('sys_alerts'));
if (null === $aData) {
$aData = BxDolAlerts::cache();
}
$this->_aAlerts = $aData['alerts'];
$this->_aHandlers = $aData['handlers'];
$this->sUnit = $sUnit;
$this->sAction = $sAction;
$this->iObject = (int) $iObjectId;
$this->iSender = !empty($iSender) ? (int) $iSender : (empty($_COOKIE['memberID']) ? 0 : (int) $_COOKIE['memberID']);
$this->aExtras = $aExtras;
}
开发者ID:noormcs,项目名称:studoro,代码行数:22,代码来源:BxDolAlerts.php
示例19: onEventDeleted
function onEventDeleted($iEntryId, $aDataEntry = array())
{
createUserDataFile($this->_iProfileId);
// arise alert
$oAlert = new BxDolAlerts('bx_avatar', 'delete', $iEntryId, $this->_iProfileId);
$oAlert->alert();
}
开发者ID:noormcs,项目名称:studoro,代码行数:7,代码来源:BxAvaModule.php
示例20: alertAdd
function alertAdd($iMedID, $bCheckPrivacy = false)
{
$aExtra = $this->_getExtraParams($_POST);
$aExtra = $this->_updateExtraParams($aExtra, $iMedID, $this->_iOwnerId);
if (!$bCheckPrivacy || !isset($aExtra['privacy_view']) || (int) $aExtra['privacy_view'] != (int) BX_DOL_PG_HIDDEN) {
$oZ = new BxDolAlerts($this->oModule->_oConfig->sPrefix, 'add', $iMedID, $this->_iOwnerId, $aExtra);
$oZ->alert();
}
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:9,代码来源:BxDolFilesUploader.php
注:本文中的BxDolAlerts类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论