本文整理汇总了PHP中CBLib\Language\CBTxt类的典型用法代码示例。如果您正苦于以下问题:PHP CBTxt类的具体用法?PHP CBTxt怎么用?PHP CBTxt使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CBTxt类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* @param cbautoactionsActionTable $trigger
* @param UserTable $user
*/
public function execute( $trigger, $user )
{
$params = $trigger->getParams()->subTree( 'loginlogout' );
cbimport( 'cb.authentication' );
$cbAuthenticate = new CBAuthentication();
$isHttps = ( isset( $_SERVER['HTTPS'] ) && ( ! empty( $_SERVER['HTTPS'] ) ) && ( $_SERVER['HTTPS'] != 'off' ) );
$returnUrl = 'http' . ( $isHttps ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'];
if ( ( ! empty( $_SERVER['PHP_SELF'] ) ) && ( ! empty( $_SERVER['REQUEST_URI'] ) ) ) {
$returnUrl .= $_SERVER['REQUEST_URI'];
} else {
$returnUrl .= $_SERVER['SCRIPT_NAME'];
if ( isset( $_SERVER['QUERY_STRING'] ) && ( ! empty( $_SERVER['QUERY_STRING'] ) ) ) {
$returnUrl .= '?' . $_SERVER['QUERY_STRING'];
}
}
$returnUrl = cbUnHtmlspecialchars( preg_replace( '/[\\\"\\\'][\\s]*javascript:(.*)[\\\"\\\']/', '""', preg_replace( '/eval\((.*)\)/', '', htmlspecialchars( urldecode( $returnUrl ) ) ) ) );
if ( preg_match( '/index.php\?option=com_comprofiler&task=confirm&confirmCode=|index.php\?option=com_comprofiler&view=confirm&confirmCode=|index.php\?option=com_comprofiler&task=login|index.php\?option=com_comprofiler&view=login/', $returnUrl ) ) {
$returnUrl = 'index.php';
}
$redirect = $trigger->getSubstituteString( $params->get( 'redirect', null, GetterInterface::STRING ), array( 'cbautoactionsClass', 'escapeURL' ) );
if ( $redirect ) {
$returnUrl = $redirect;
}
$message = $trigger->getSubstituteString( CBTxt::T( $params->get( 'message', null, GetterInterface::RAW ) ), false );
if ( $params->get( 'mode', 1, GetterInterface::BOOLEAN ) ) {
$messagesToUser = array();
$alertMessages = array();
if ( $params->get( 'method', 1, GetterInterface::BOOLEAN ) ) {
$credentials = $trigger->getSubstituteString( $params->get( 'username', null, GetterInterface::STRING ) );
$method = 0;
} else {
$credentials = $trigger->getSubstituteString( $params->get( 'email', null, GetterInterface::STRING ) );
$method = 1;
}
$resultError = $cbAuthenticate->login( $credentials, false, 0, 1, $returnUrl, $messagesToUser, $alertMessages, $method );
if ( $redirect ) {
cbRedirect( $redirect, ( $resultError ? $resultError : ( $message ? $message : ( $alertMessages ? stripslashes( implode( '<br />', $alertMessages ) ) : null ) ) ), ( $resultError ? 'error' : 'message' ) );
}
} else {
$resultError = $cbAuthenticate->logout( $returnUrl );
if ( $redirect ) {
cbRedirect( $redirect, ( $resultError ? $resultError : ( $message ? $message : CBTxt::T( 'LOGOUT_SUCCESS', 'You have successfully logged out' ) ) ), ( $resultError ? 'error' : 'message' ) );
}
}
}
示例2: getOptions
protected function getOptions() {
if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) ) {
return array();
}
/** @noinspection PhpIncludeInspection */
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
cbimport( 'language.front' );
$db = JFactory::getDBO();
$options = array();
$query = 'SELECT ' . $db->quoteName( 'element' ) . ' AS value'
. ', ' . $db->quoteName( 'name' ) . ' AS text'
. "\n FROM " . $db->quoteName( '#__comprofiler_plugin' )
. "\n WHERE " . $db->quoteName( 'type' ) . " NOT IN ( " . $db->quote( 'templates' ) . ", " . $db->quote( 'language' ) . " )"
. "\n ORDER BY " . $db->quoteName( 'ordering' );
$db->setQuery( $query );
$plugins = $db->loadObjectList();
if ( $plugins ) foreach ( $plugins as $plugin ) {
$options[] = JHtml::_( 'select.option', $plugin->value, CBTxt::T( $plugin->text ) );
}
return $options;
}
示例3: getOptions
protected function getOptions()
{
global $_CB_database;
if (!file_exists(JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php') || !file_exists(JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php')) {
return array();
}
/** @noinspection PhpIncludeInspection */
include_once JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
cbimport('cb.html');
cbimport('language.front');
$query = 'SELECT f.*' . "\n FROM " . $_CB_database->NameQuote('#__comprofiler_fields') . " AS f" . "\n LEFT JOIN " . $_CB_database->NameQuote('#__comprofiler_tabs') . " AS t" . ' ON t.' . $_CB_database->NameQuote('tabid') . ' = f.' . $_CB_database->NameQuote('tabid') . "\n WHERE f." . $_CB_database->NameQuote('published') . " = 1" . "\n AND f." . $_CB_database->NameQuote('name') . " != " . $_CB_database->Quote('NA') . "\n ORDER BY t." . $_CB_database->NameQuote('ordering') . ", f." . $_CB_database->NameQuote('ordering');
$_CB_database->setQuery($query);
$fields = $_CB_database->loadObjectList(null, '\\CB\\Database\\Table\\FieldTable', array(&$_CB_database));
$options = array();
/** @var FieldTable[] $fields */
if ($fields) {
foreach ($fields as $field) {
if (count($field->getTableColumns())) {
$title = CBTxt::T($field->title);
$options[] = JHtml::_('select.option', $field->name, $title ? $title . ' (' . $field->name . ')' : $field->name);
}
}
}
return $options;
}
示例4: showVideoActivity
/**
* render frontend event activity
*
* @param CB\Plugin\Activity\Table\ActivityTable $row
* @param string $title
* @param string $message
* @param CB\Plugin\Activity\Activity $stream
* @param VideoTable $video
* @param cbgjVideoPlugin $plugin
* @return string
*/
static function showVideoActivity( $row, &$title, &$message, $stream, $video, $plugin )
{
global $_CB_framework;
$title = CBTxt::T( 'GROUP_VIDEO_ACTIVITY_TITLE', 'published a video in [group]', array( '[group]' => '<strong><a href="' . $_CB_framework->pluginClassUrl( $plugin->_gjPlugin->element, true, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $video->group()->get( 'id' ) ) ) . '">' . htmlspecialchars( CBTxt::T( $video->group()->get( 'name' ) ) ) . '</a></strong>' ) );
$return = '<div class="gjVideoActivity">'
. '<div class="gjGroupVideoRow gjContainerBox img-thumbnail">'
. '<div class="gjContainerBoxHeader">'
. '<video width="640" height="360" style="width: 100%; height: 100%;" src="' . htmlspecialchars( $video->get( 'url' ) ) . '" type="' . htmlspecialchars( $video->mimeType() ) . '" controls="controls" preload="none" class="streamItemVideo gjVideoPlayer"></video>'
. '</div>'
. '<div class="gjContainerBoxBody text-left">'
. '<div class="gjContainerBoxTitle">'
. '<strong>'
. '<a href="' . htmlspecialchars( $video->get( 'url' ) ) . '" target="_blank" rel="nofollow">' . htmlspecialchars( ( $video->get( 'title' ) ? $video->get( 'title' ) : $video->name() ) ) . '</a>'
. '</strong>'
. '</div>';
if ( $video->get( 'caption' ) ) {
$return .= '<div class="gjContainerBoxContent cbMoreLess">'
. '<div class="cbMoreLessContent">'
. htmlspecialchars( $video->get( 'caption' ) )
. '</div>'
. '<div class="cbMoreLessOpen fade-edge hidden">'
. '<a href="javascript: void(0);" class="cbMoreLessButton">' . CBTxt::T( 'See More' ) . '</a>'
. '</div>'
. '</div>';
}
$return .= '</div>'
. '</div>'
. '</div>';
return $return;
}
示例5: showWallNotifications
/**
* render frontend group wall notify params
*
* @param NotificationTable $row
* @param array $input
* @param GroupTable $group
* @param UserTable $user
* @param cbgjWallPlugin $plugin
* @return string
*/
static function showWallNotifications( $row, $input, $group, $user, $plugin )
{
$return = '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="params__wall_new" class="col-sm-9 control-label">' . CBTxt::T( 'Create of new post' ) . '</label>'
. '<div class="cb_field col-sm-3 text-right">'
. $input['wall_new']
. '</div>'
. '</div>';
if ( $row->group()->params()->get( 'wall', 1 ) == 2 ) {
$return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="params__wall_approve" class="col-sm-9 control-label">' . CBTxt::T( 'New post requires approval' ) . '</label>'
. '<div class="cb_field col-sm-3 text-right">'
. $input['wall_approve']
. '</div>'
. '</div>';
}
if ( $plugin->params->get( 'groups_wall_replies', 1 ) ) {
$return .= '<div class="cbft_select cbtt_select form-group cb_form_line clearfix">'
. '<label for="params__wall_reply" class="col-sm-9 control-label">' . CBTxt::T( 'User reply to my existing posts' ) . '</label>'
. '<div class="cb_field col-sm-3 text-right">'
. $input['wall_reply']
. '</div>'
. '</div>';
}
return $return;
}
示例6: showPosts
/**
* Shows Forum Posts
*
* @param stdClass[] $rows Rows to show
* @param cbPageNav $pageNav Page Navigation
* @param boolean $searching Are we searching currently ?
* @param string[] $input Inputs to show
* @param UserTable $viewer Viewing User
* @param UserTable $user Viewed at User
* @param TabTable $tab Current Tab
* @param PluginTable $plugin Current Plugin
* @return string
*/
public static function showPosts($rows, $pageNav, $searching, $input, $viewer, $user, $tab, $plugin)
{
global $_CB_framework;
$tabPaging = $tab->params->get('tab_posts_paging', 1);
$canSearch = $tab->params->get('tab_posts_search', 1) && ($searching || $pageNav->total);
$return = '<div class="forumsPostsTab tab-content">' . '<form action="' . $_CB_framework->userProfileUrl($user->id, true, $tab->tabid) . '" method="post" name="forumPostsForm" id="forumPostsForm" class="forumPostsForm">';
if ($canSearch) {
$return .= '<div class="forumsHeader row" style="margin-bottom: 10px;">' . '<div class="col-sm-offset-8 col-sm-4 text-right">' . '<div class="input-group">' . '<span class="input-group-addon"><span class="fa fa-search"></span></span>' . $input['search'] . '</div>' . '</div>' . '</div>';
}
$return .= '<table class="forumsContainer table table-hover table-responsive">' . '<thead>' . '<tr>' . '<th style="width: 50%;" class="text-left">' . CBTxt::T('Subject') . '</th>' . '<th style="width: 25%;" class="text-left hidden-xs">' . CBTxt::T('Category') . '</th>' . '<th style="width: 25%;" class="text-left hidden-xs">' . CBTxt::T('Date') . '</th>' . '</tr>' . '</thead>' . '<tbody>';
if ($rows) {
foreach ($rows as $row) {
$return .= '<tr>' . '<td style="width: 50%;" class="text-left"><a href="' . (isset($row->url) ? $row->url : cbforumsModel::getForumURL($row->category_id, $row->id)) . '">' . cbforumsClass::cleanPost($row->subject) . '</a></td>' . '<td style="width: 25%;" class="text-left hidden-xs"><a href="' . (isset($row->category_url) ? $row->category_url : cbforumsModel::getForumURL($row->category_id)) . '">' . cbforumsClass::cleanPost($row->category_name) . '</a></td>' . '<td style="width: 25%;" class="text-left hidden-xs">' . cbFormatDate(date('Y-m-d H:i:s', $row->date)) . '</td>' . '</tr>';
}
} else {
$return .= '<tr>' . '<td colspan="3" class="text-left">';
if ($searching) {
$return .= CBTxt::T('No post search results found.');
} else {
if ($viewer->id == $user->id) {
$return .= CBTxt::T('You have no posts.');
} else {
$return .= CBTxt::T('This user has no posts.');
}
}
$return .= '</td>' . '</tr>';
}
$return .= '</tbody>';
if ($tabPaging && $pageNav->total > $pageNav->limit) {
$return .= '<tfoot>' . '<tr>' . '<td colspan="3" class="text-center">' . $pageNav->getListLinks() . '</td>' . '</tr>' . '</tfoot>';
}
$return .= '</table>' . $pageNav->getLimitBox(false) . '</form>' . '</div>';
return $return;
}
示例7: showAbout
/**
* prepare frontend about render
*
* @param string $return
* @param GroupTable $group
* @param string $users
* @param string $invites
* @param array $counters
* @param array $buttons
* @param array $menu
* @param cbTabs $tabs
* @param UserTable $user
* @return array|null
*/
public function showAbout( &$return, &$group, &$users, &$invites, &$counters, &$buttons, &$menu, &$tabs, $user )
{
global $_CB_framework;
if ( CBGroupJive::isModerator( $user->get( 'id' ) ) || ( ( $group->get( 'published' ) == 1 ) && ( CBGroupJive::getGroupStatus( $user, $group ) >= 3 ) ) ) {
$menu[] = '<a href="' . $_CB_framework->pluginClassUrl( $this->element, true, array( 'action' => 'about', 'func' => 'edit', 'id' => (int) $group->get( 'id' ) ) ) . '"><span class="fa fa-edit"></span> ' . CBTxt::T( 'About' ) . '</a>';
}
$about = trim( $group->params()->get( 'about_content' ) );
if ( ( ! $about ) || ( $about == '<p></p>' ) ) {
return null;
}
CBGroupJive::getTemplate( 'about', true, true, $this->element );
if ( $this->params->get( 'groups_about_substitutions', 0 ) ) {
$about = CBuser::getInstance( (int) $user->get( 'id' ), false )->replaceUserVars( $about, false, false, null, false );
}
if ( $this->params->get( 'groups_about_content_plugins', 0 ) ) {
$about = Application::Cms()->prepareHtmlContentPlugins( $about );
}
return array( 'id' => 'about',
'title' => CBTxt::T( 'About' ),
'content' => HTML_groupjiveAbout::showAbout( $about, $group, $user, $this )
);
}
示例8: execute
/**
* @param cbautoactionsActionTable $trigger
* @param UserTable $user
*/
public function execute( $trigger, $user )
{
foreach ( $trigger->getParams()->subTree( 'menu' ) as $row ) {
/** @var ParamsInterface $row */
$menuTitle = $trigger->getSubstituteString( $row->get( 'title', null, GetterInterface::STRING ) );
if ( ! $menuTitle ) {
if ( $trigger->getParams()->get( 'debug', false, GetterInterface::BOOLEAN ) ) {
var_dump( CBTxt::T( 'AUTO_ACTION_MENU_NO_TITLE', ':: Action [action] :: CB Menu skipped due to missing title', array( '[action]' => (int) $trigger->get( 'id' ) ) ) );
}
continue;
}
$menuType = $trigger->getSubstituteString( $row->get( 'type', null, GetterInterface::STRING ), true, false );
$menuClass = $trigger->getSubstituteString( $row->get( 'class', null, GetterInterface::STRING ), true, false );
$menuTarget = $row->get( 'target', null, GetterInterface::STRING );
$menuImg = $trigger->getSubstituteString( $row->get( 'image', null, GetterInterface::STRING ), false );
$menuItem = array();
$menuItem['arrayPos'] = array( $menuType => array( $menuClass => null ) );
$menuItem['position'] = $row->get( 'position', 'menuBar', GetterInterface::STRING );
$menuItem['caption'] = htmlspecialchars( $menuTitle );
$menuItem['url'] = $trigger->getSubstituteString( $row->get( 'url', null, GetterInterface::STRING ), false );
$menuItem['target'] = ( $menuTarget ? htmlspecialchars( $menuTarget ) : null );
$menuItem['img'] = ( $menuImg ? ( $menuImg[0] == '<' ? $menuImg : '<img src="' . htmlspecialchars( $menuImg ) . '" />' ) : null );
$menuItem['tooltip'] = htmlspecialchars( $trigger->getSubstituteString( $row->get( 'tooltip', null, GetterInterface::STRING ), false ) );
$this->addMenu( $menuItem );
}
}
示例9: check
/**
* @return bool
*/
public function check()
{
if ( $this->get( 'user_id' ) == '' ) {
$this->setError( CBTxt::T( 'Owner not specified!' ) );
return false;
} elseif ( $this->get( 'group' ) == '' ) {
$this->setError( CBTxt::T( 'Group not specified!' ) );
return false;
} elseif ( $this->get( 'post' ) == '' ) {
$this->setError( CBTxt::T( 'Post not specified!' ) );
return false;
} elseif ( ! $this->group()->get( 'id' ) ) {
$this->setError( CBTxt::T( 'Group does not exist!' ) );
return false;
} elseif ( $this->get( 'reply' ) ) {
if ( ! $this->reply()->get( 'id' ) ) {
$this->setError( CBTxt::T( 'Reply does not exist!' ) );
return false;
}
}
return true;
}
示例10: showArticleTab
/**
* Renders the Articles tab
*
* @param Table[] $rows Articles to render
* @param cbPageNav $pageNav Pagination
* @param boolean $searching Currently searching
* @param string[] $input HTML of input elements
* @param UserTable $viewer Viewing user
* @param UserTable $user Viewed user
* @param stdClass $model The model reference
* @param TabTable $tab Current Tab
* @param PluginTable $plugin Current Plugin
* @return string HTML
*/
public static function showArticleTab($rows, $pageNav, $searching, $input, $viewer, $user, $model, $tab, $plugin)
{
global $_CB_framework;
$tabPaging = $tab->params->get('tab_paging', 1);
$canSearch = $tab->params->get('tab_search', 1) && ($searching || $pageNav->total);
$return = '<div class="articlesTab">' . '<form action="' . $_CB_framework->userProfileUrl($user->id, true, $tab->tabid) . '" method="post" name="articleForm" id="articleForm" class="articleForm">';
if ($canSearch) {
$return .= '<div class="articlesHeader row" style="margin-bottom: 10px;">' . '<div class="col-sm-offset-8 col-sm-4 text-right">' . '<div class="input-group">' . '<span class="input-group-addon"><span class="fa fa-search"></span></span>' . $input['search'] . '</div>' . '</div>' . '</div>';
}
$return .= '<table class="articlesContainer table table-hover table-responsive">' . '<thead>' . '<tr>' . '<th style="width: 50%;" class="text-left">' . CBTxt::T('Article') . '</th>' . '<th style="width: 25%;" class="text-left hidden-xs">' . CBTxt::T('Category') . '</th>' . '<th style="width: 25%;" class="text-left hidden-xs">' . CBTxt::T('Created') . '</th>' . '</tr>' . '</thead>' . '<tbody>';
if ($rows) {
foreach ($rows as $row) {
$return .= '<tr>' . '<td style="width: 50%;" class="text-left"><a href="' . cbarticlesModel::getUrl($row, true, 'article') . '">' . $row->get('title') . '</a></td>' . '<td style="width: 25%;" class="text-left hidden-xs">' . ($row->get('category') ? '<a href="' . cbarticlesModel::getUrl($row, true, 'category') . '">' . $row->get('category_title') . '</a>' : CBTxt::T('None')) . '</td>' . '<td style="width: 25%;" class="text-left hidden-xs">' . cbFormatDate($row->get('created')) . '</td>' . '</tr>';
}
} else {
$return .= '<tr>' . '<td colspan="3" class="text-left">';
if ($searching) {
$return .= CBTxt::T('No article search results found.');
} else {
if ($viewer->id == $user->id) {
$return .= CBTxt::T('You have no articles.');
} else {
$return .= CBTxt::T('This user has no articles.');
}
}
$return .= '</td>' . '</tr>';
}
$return .= '</tbody>';
if ($tabPaging && $pageNav->total > $pageNav->limit) {
$return .= '<tfoot>' . '<tr>' . '<td colspan="3" class="text-center">' . $pageNav->getListLinks() . '</td>' . '</tr>' . '</tfoot>';
}
$return .= '</table>' . $pageNav->getLimitBox(false) . '</form>' . '</div>';
return $return;
}
示例11: check
/**
* @return bool
*/
public function check()
{
$emote = cbutf8_strtolower( preg_replace( '/[^-a-zA-Z0-9_.]/', '', $this->get( 'value' ) ) );
if ( $emote == '' ) {
$this->setError( CBTxt::T( 'Emote not specified!' ) );
return false;
} elseif ( ( $this->get( 'icon' ) == '' ) && ( $this->get( 'class' ) == '' ) ) {
$this->setError( CBTxt::T( 'Icon not specified!' ) );
return false;
} else {
$row = new EmoteTable();
$row->load( array( 'value' => $emote ) );
if ( $row->get( 'id' ) && ( $this->get( 'id' ) != $row->get( 'id' ) ) ) {
$this->setError( CBTxt::T( 'Emote already exists!' ) );
return false;
}
}
return true;
}
示例12: showWallActivity
/**
* render frontend wall activity
*
* @param CB\Plugin\Activity\Table\ActivityTable $row
* @param string $title
* @param string $message
* @param CB\Plugin\Activity\Activity $stream
* @param WallTable $post
* @param cbgjWallPlugin $plugin
* @return string
*/
static function showWallActivity( $row, &$title, &$message, $stream, $post, $plugin )
{
global $_CB_framework;
$title = CBTxt::T( 'GROUP_WALL_ACTIVITY_TITLE', 'posted in [group]', array( '[group]' => '<strong><a href="' . $_CB_framework->pluginClassUrl( $plugin->_gjPlugin->element, true, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $post->group()->get( 'id' ) ) ) . '">' . htmlspecialchars( CBTxt::T( $post->group()->get( 'name' ) ) ) . '</a></strong>' ) );
$message = $post->post();
return null;
}
示例13: showTags
/**
* @param TagTable[] $rows
* @param Tags $stream
* @param int $output 0: Normal, 1: Raw, 2: Inline, 3: Load , 4: Save
* @param UserTable $user
* @param UserTable $viewer
* @param cbPluginHandler $plugin
* @return null|string
*/
static public function showTags( $rows, $stream, $output, $user, $viewer, $plugin )
{
global $_PLUGINS;
CBActivity::loadHeaders( $output );
$sourceClean = htmlspecialchars( $stream->source() );
$tags = array();
$return = null;
$_PLUGINS->trigger( 'activity_onBeforeDisplayTags', array( &$return, &$rows, $stream, $output ) );
if ( $rows ) foreach ( $rows as $row ) {
$rowId = $sourceClean . 'Tag' . (int) $row->get( 'id' );
if ( is_numeric( $row->get( 'user' ) ) ) {
$name = CBuser::getInstance( (int) $row->get( 'user' ), false )->getField( 'formatname', null, 'html', 'none', 'list', 0, true );
} else {
$name = htmlspecialchars( $row->get( 'user' ) );
}
if ( ! $name ) {
continue;
}
$tags[] = '<span id="' . $rowId . '" class="streamTag">'
. $name
. '</span>';
}
if ( $tags ) {
$return .= ( ! in_array( $output, array( 1, 4 ) ) ? '<span class="' . $sourceClean . 'Tags streamTags">' : null );
if ( count( $tags ) > 2 ) {
$tagOne = array_shift( $tags );
$tagTwo = array_shift( $tags );
$moreTooltip = cbTooltip( null, '<div class="streamTagRow">' . implode( '</div><div class="streamTagRow">', $tags ) . '</div>', null, 'auto', null, null, null, 'data-hascbtooltip="true" data-cbtooltip-position-my="bottom center" data-cbtooltip-position-at="top center" data-cbtooltip-open-event="click" data-cbtooltip-close-event="click unfocus" data-cbtooltip-button-hide="true"' );
$more = '<a href="javascript: void(0);"' . $moreTooltip . '>' . CBTxt::T( 'TAGS_MORE', '%%COUNT%% more', array( '%%COUNT%%' => count( $tags ) ) ) . '</a>';
$return .= CBTxt::T( 'TAGS_MORE_THAN_TWO', '[tag_1], [tag_2], and [more]', array( '[tag_1]' => $tagOne, '[tag_2]' => $tagTwo, '[more]' => $more ) );
} elseif ( count( $tags ) > 1 ) {
$return .= CBTxt::T( 'TAGS_TWO', '[tag_1] and [tag_2]', array( '[tag_1]' => $tags[0], '[tag_2]' => $tags[1] ) );
} else {
$return .= $tags[0];
}
$return .= ( ! in_array( $output, array( 1, 4 ) ) ? '</span>' : null );
}
$return .= CBActivity::reloadHeaders( $output );
$_PLUGINS->trigger( 'activity_onAfterDisplayTags', array( &$return, $rows, $stream, $output ) );
return $return;
}
示例14: showBlog
/**
* @param OrderedTable $row
* @param UserTable $user
* @param stdClass $model
* @param PluginTable $plugin
*/
static function showBlog($row, $user, $model, $plugin)
{
global $_CB_framework;
$_CB_framework->setPageTitle($row->get('title'));
$_CB_framework->appendPathWay(htmlspecialchars(CBTxt::T('Blogs')), $_CB_framework->userProfileUrl($row->get('user', $user->get('id')), true, 'cbblogsTab'));
$_CB_framework->appendPathWay(htmlspecialchars($row->get('title')), $_CB_framework->pluginClassUrl($plugin->element, true, array('action' => 'blogs', 'func' => 'show', 'id' => (int) $row->get('id'))));
$cbUser =& CBuser::getInstance((int) $row->get('user'), false);
$return = '<div class="blowShow">' . '<div class="blogsTitle page-header"><h3>' . $row->get('title') . ' <small>' . CBTxt::T('WRITTEN_BY_BLOG_AUTHOR', 'Written by [blog_author]', array('[blog_author]' => $cbUser->getField('formatname', null, 'html', 'none', 'list', 0, true))) . '</small></h3></div>' . '<div class="blogsHeader well well-sm">' . CBTxt::T('CATEGORY_CATEGORY', 'Category: [category]', array('[category]' => $row->get('category'))) . ' / ' . CBTxt::T('CREATED_CREATED', 'Created: [created]', array('[created]' => cbFormatDate($row->get('created')))) . ($row->get('modified') && $row->get('modified') != '0000-00-00 00:00:00' ? ' / ' . CBTxt::T('MODIFIED_MODIFIED', 'Modified: [modified]', array('[modified]' => cbFormatDate($row->get('modified')))) : null) . '</div>' . '<div class="blogsText">' . $row->get('blog_intro') . $row->get('blog_full') . '</div>' . '</div>';
echo $return;
}
示例15: showconsultation
/**
* @param OrderedTable $row
* @param UserTable $user
* @param stdClass $model
* @param PluginTable $plugin
*/
static function showconsultation( $row, $user, /** @noinspection PhpUnusedParameterInspection */ $model, $plugin, $bids )
{
global $_CB_framework;
$_CB_framework->setPageTitle( $row->get( 'title' ) );
$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( 'consultations' ) ), $_CB_framework->userProfileUrl( $row->get( 'user', $user->get( 'id' ) ), true, 'cbconsultationsTab' ) );
$_CB_framework->appendPathWay( htmlspecialchars( $row->get( 'title' ) ), $_CB_framework->pluginClassUrl( $plugin->element, true, array( 'action' => 'consultations', 'func' => 'show', 'id' => (int) $row->get( 'id' ) ) ) );
$cbUser =& CBuser::getInstance( (int) $row->get( 'user' ), false );
$return = '<div class="blowShow">'
. '<div class="consultationsTitle page-header"><h3>' . $row->get( 'title' ) . ' <small>' . CBTxt::T( 'WRITTEN_BY_consultation_AUTHOR', 'Written by [consultation_author]', array( '[consultation_author]' => $cbUser->getField( 'formatname', null, 'html', 'none', 'list', 0, true ) ) ) . '</small></h3></div>'
. '<div class="consultationsHeader well well-sm">'
. CBTxt::T( 'CATEGORY_CATEGORY', 'Category: [category]', array( '[category]' => $row->get( 'category' ) ) )
. ' / ' . CBTxt::T( 'CREATED_CREATED', 'Created: [created]', array( '[created]' => cbFormatDate( $row->get( 'created' ) ) ) )
. ( $row->get( 'modified' ) && ( $row->get( 'modified' ) != '0000-00-00 00:00:00' ) ? ' / ' . CBTxt::T( 'MODIFIED_MODIFIED', 'Modified: [modified]', array( '[modified]' => cbFormatDate( $row->get( 'modified' ) ) ) ) : null )
. '</div>'
. '<div class="consultationsText">' . $row->get( 'consultation_intro' ) . $row->get( 'consultation_full' ) . '</div>'
. '</div>';
if($bids!=null){
$return .= '<script >
window.___gcfg = {
lang: \'ru\',
parsetags: \'onload\'
};
</script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
';
$return .= '<h2>Ставки</h2>';
if(empty($bids)){
$return .= "Нет ставок";
}else{
$return .= '<table cellspacing="5" class="consultationsContainer table table-hover table-responsive">';
$return .= '<tr><th>Дата</th><th>Пользователь</th><th>e-mail</th><th>Цена</th><th></th></tr>';
foreach($bids as $key=>$value){
$return .='<tr>';
$return .= '<td>'.$value->bid_date.'</td>';
$return .= '<td>'.$value->name.'</td>';
$return .= '<td>'.$value->email.'</td>';
$return .= '<td>$'.$value->bid_price.'</td>';
$return .= '<td>';
if($key==0){
//Old version was using Goolge Hangouts for communications.
//$return .= '<g:hangout render="createhangout" hangout_type="normal" topic="'.addslashes($row->get('title')).'"
// invites="[{ id : \''.$value->email.'\', invite_type : \'EMAIL\' }]">
// </g:hangout>';
//New version is using CloudInterpreter
$return .= '<a target="_blank" href="http://dev.cloudinterpreter.com:8901/'.md5($row->get('id')).'"><button class="btn btn-success">Начать консультацию</button></a>';
}
$return .= '</td>';
$return .='</tr>';
}
$return .= '</table>';
}
}
echo $return;
}