本文整理匯總了PHP中IPSMember::canReceiveMobileNotifications方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::canReceiveMobileNotifications方法的具體用法?PHP IPSMember::canReceiveMobileNotifications怎麽用?PHP IPSMember::canReceiveMobileNotifications使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::canReceiveMobileNotifications方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: globalTemplate
function globalTemplate($html, $documentHeadItems, $css, $jsModules, $metaTags, array $header_items, $items = array(), $footer_items = array(), $stats = array())
{
$IPBHTML = "";
$uses_name = false;
$uses_email = false;
$_redirect = '';
foreach ($this->cache->getCache('login_methods') as $method) {
if ($method['login_user_id'] == 'username' or $method['login_user_id'] == 'either') {
$uses_name = true;
}
if ($method['login_user_id'] == 'email' or $method['login_user_id'] == 'either') {
$uses_email = true;
}
if ($method['login_login_url']) {
$_redirect = $method['login_login_url'];
}
}
//These strings are hardcoded for a reason :)
if ($uses_name and $uses_email) {
$this->lang->words['enter_name'] = "USERNAME OR EMAIL";
} else {
if ($uses_email) {
$this->lang->words['enter_name'] = "EMAIL";
} else {
$this->lang->words['enter_name'] = "USERNAME";
}
}
$IPBHTML .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<ipb>\r\n<title><![CDATA[{$header_items['title']}]]></title>\r\n<boardURL><![CDATA[{$this->settings['board_url']}]]></boardURL>\r\n<publicURL><![CDATA[{$this->settings['public_dir']}]]></publicURL>\r\n<forumHome><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("act=idx", "public", ''), "", "") . "]]></forumHome>\r\n<styleRevision><![CDATA[{$this->settings['style_last_updated']}]]></styleRevision>\r\n\r\n\r\n<memberData>\r\n\t" . (IPSMember::canReceiveMobileNotifications($this->memberData) ? "\r\n\t<push_enabled>1</push_enabled>\r\n " : "") . "\r\n\t<member_id>{$this->memberData['member_id']}</member_id>\r\n\t<notificationCnt>{$this->memberData['notification_cnt']}</notificationCnt>\r\n\t<messageCnt>{$this->memberData['msg_count_new']}</messageCnt>\r\n\t<isSuperMod>{$this->memberData['g_is_supmod']}</isSuperMod>\r\n\t<isMod>{$this->memberData['is_mod']}</isMod>\r\n\t<isAdmin>{$this->memberData['g_access_cp']}</isAdmin>\r\n\t<membersDisplayName><![CDATA[{$this->memberData['members_display_name']}]]></membersDisplayName>\r\n\t<secureHash>{$this->member->form_hash}</secureHash>\r\n\t<sessionId>{$this->member->session_id}</sessionId>\r\n\t<avatarThumb><![CDATA[{$this->memberData['pp_thumb_photo']}]]></avatarThumb>\r\n\t<profileURL><![CDATA[" . $this->registry->getClass('output')->formatUrl($this->registry->getClass('output')->buildUrl("showuser={$this->memberData['member_id']}", "public", ''), "{$this->memberData['members_seo_name']}", "showuser") . "]]></profileURL>\r\n</memberData>\r\n<admob>\r\n <adLocation>{$this->settings['admob_top']}|{$this->settings['admob_bottom']}</adLocation>\r\n <adCode>{$this->settings['admob_pub_id']}</adCode>\r\n</admob><loginMethod>{$this->lang->words['enter_name']}</loginMethod>\r\n\r\n{$html}\r\n</ipb>";
return $IPBHTML;
}
示例2: _userEnabledNotifications
/**
* Determines if a user has notifications enabled
*
* @return string XML
*/
protected function _userEnabledNotifications($memberData)
{
/* Check to see if notifications are enabled */
if (!IPSMember::canReceiveMobileNotifications($memberData)) {
return 0;
}
$count = $this->DB->buildAndFetch(array('select' => 'count(*) as count', 'from' => 'mobile_device_map', 'where' => "member_id={$this->memberData['member_id']}"));
if ($count['count']) {
return 1;
}
return 0;
}
示例3: __f__b94c8debdbc2f39ece6942ca98b016b6
function __f__b94c8debdbc2f39ece6942ca98b016b6($config, $emailData)
{
$_ips___x_retval = '';
$__iteratorCount = 0;
foreach ($this->_config as $key => $_config) {
$__iteratorCount++;
$_ips___x_retval .= "\n\t\t\t" . (!isset($_config['_done']) && $_config['_done'] != 1 ? "" . ($this->_lastApp != $_config['app'] ? "<tr class='row2'>\n\t\t\t\t\t\t<td colspan='{$this->_colCount}'>\n\t\t\t\t\t\t\t<h3>" . ($_config['app'] == 'core' ? "{$this->lang->words['notifytitle_other']}" : "" . IPSLib::getAppTitle($_config['app']) . "") . "</h3>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . (($this->_lastApp = $_config['app']) ? "" : "") . "" : "") . "\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='notify_title desc'>{$this->lang->words['notify__' . $_config['key']]}</h3></td>\n\t\t\t\t\t<td class='short'>\n\t\t\t\t\t\t<span class='notify_icon inline' title='{$this->lang->words['notify_type_inline']}'> </span>\n\t\t\t\t\t\t" . (isset($_config['options']['inline']) ? "<input type='checkbox' class='input_check' id='inline_{$key}' name=\"config_{$key}[]\" value=\"inline\"" . ((is_array($_config['defaults']) and in_array('inline', $_config['defaults'])) ? " checked=\"checked\"" : "") . " " . ($_config['disabled'] ? " disabled=\"disabled\"" : "") . " />" : "\n\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />\n\t\t\t\t\t\t") . "\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class='short'>\n\t\t\t\t\t\t<span class='notify_icon email' title='{$this->lang->words['notify_type_email']}'> </span>\n\t\t\t\t\t\t" . (isset($_config['options']['email']) ? "<input type='checkbox' class='input_check' id='email_{$key}' name=\"config_{$key}[]\" value=\"email\"" . ((is_array($_config['defaults']) and in_array('email', $_config['defaults'])) ? " checked=\"checked\"" : "") . " " . ($_config['disabled'] ? " disabled=\"disabled\"" : "") . " />" : "\n\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />\n\t\t\t\t\t\t") . "\n\t\t\t\t\t</td>\n\t\t\t\t\t" . (IPSMember::canReceiveMobileNotifications() ? "<td class='short'>\n\t\t\t\t\t\t<span class='notify_icon mobile' title='{$this->lang->words['notify_type_mobile']}'> </span>\n\t\t\t\t\t\t" . (isset($_config['options']['mobile']) ? "<input type='checkbox' class='input_check' id='mobile_{$key}' name=\"config_{$key}[]\" value=\"mobile\"" . ((is_array($this->_config[$key]['defaults']) and in_array('mobile', $this->_config[$key]['defaults'])) ? " checked=\"checked\"" : "") . " " . ($this->_config[$key]['disabled'] ? " disabled=\"disabled\"" : "") . " />" : "\n\t\t\t\t\t\t\t<input type='checkbox' class='input_check' name='' disabled='disabled' />\n\t\t\t\t\t\t") . "\n\t\t\t\t\t</td>" : "") . "\n\t\t\t\t</tr>" : "") . "\n\t\t\n";
}
$_ips___x_retval .= '';
unset($__iteratorCount);
return $_ips___x_retval;
}
示例4: _sendMobileNotification
/**
* Send a notification via mobile device
*
* @access protected
* @param array Member data
* @return mixed True, or can output an error
*/
protected function _sendMobileNotification($member)
{
/* Just save the notification, a task will handle it later */
if (IPSMember::canReceiveMobileNotifications($member)) {
$this->DB->insert('mobile_notifications', array('notify_title' => strip_tags($this->_notificationTitle), 'notify_date' => time(), 'member_id' => $member['member_id'], 'notify_url' => $this->_notificationUrl));
}
}