本文整理汇总了PHP中CBTxt::Th方法的典型用法代码示例。如果您正苦于以下问题:PHP CBTxt::Th方法的具体用法?PHP CBTxt::Th怎么用?PHP CBTxt::Th使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBTxt
的用法示例。
在下文中一共展示了CBTxt::Th方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showGroupPanes
/**
* render frontend group panes
*
* @param cbgjGroup $row
* @param cbgjCategory $category
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showGroupPanes( $row, $category, $user, $plugin ) {
$authorized = cbgjClass::getAuthorization( $category, $row, $user );
if ( $row->get( 'published' ) == 1 ) {
$state = '<div><i class="icon-ban-circle"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'unpublish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '">' . CBTxt::Ph( 'Unpublish [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>';
} else {
$state = '<div><i class="icon-ok"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Publish [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>';
}
$groupAdmins = $row->getAdmins();
$groupMods = $row->getModerators();
$return = '<legend class="gjHeaderTitle">' . $row->getName() . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. $row->getLogo( true )
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforeGroupInfo', array( $row, $category, $user, $plugin ) )
. ( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $row->nestedCount() . '</div>' : null )
. ( $row->userCount() ? '<div>' . cbgjClass::getOverride( 'user', true ) . ': ' . $row->userCount() . '</div>' : null )
. ( $row->get( 'user_id' ) ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $row->getOwnerName( true ) . '</div>' : null )
. ( ! empty( $groupMods ) ? '<div>' . cbgjClass::getOverride( 'moderator', true ) . ': ' . implode( ', ', $groupMods ) . '</div>' : null )
. ( ! empty( $groupAdmins ) ? '<div>' . cbgjClass::getOverride( 'admin', true ) . ': ' . implode( ', ', $groupAdmins ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Type: [grp_type]', array( '[grp_type]' => $row->getType() ) ) . '</div>'
. '<div>' . CBTxt::Ph( 'Access: [grp_access]', array( '[grp_access]' => $row->getAccess() ) ) . '</div>'
. '<div>' . cbgjClass::getOverride( 'category' ) . ': ' . $category->getName( 0, true ) . '</div>'
. ( $row->get( 'parent' ) ? '<div>' . cbgjClass::getOverride( 'group' ) . ': ' . $row->getParent()->getName( 0, true ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Created: [grp_date]', array( '[grp_date]' => cbFormatDate( $row->get( 'date' ), 1, false ) ) ) . '</div>'
. cbgjClass::getIntegrations( 'gj_onAfterGroupInfo', array( $row, $category, $user, $plugin ) )
. '</div>';
if ( $row->get( 'description' ) ) {
$return .= '<div class="gjGridLeftDesc span12 well well-small">'
. $row->getDescription()
. '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforeGroupMenu', array( $row, $category, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( array( 'grp_join', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . ( cbgjClass::hasAccess( 'grp_invited', $authorized ) ? CBTxt::Th( 'Accept Invite' ) : CBTxt::Ph( 'Join [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( array( 'grp_nested_create', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( array( 'grp_leave', 'grp_approved' ), $authorized, true ) ? '<div><i class="icon-minus"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'leave', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to leave this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '">' . CBTxt::Ph( 'Leave [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ? '<div><i class="icon-pencil"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Edit [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'grp_message', $authorized ) && $row->userCount() ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'message', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Message [users]', array( '[users]' => cbgjClass::getOverride( 'user', true ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ? $state : null )
. ( cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ? '<div><i class="icon-remove"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'delete', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [group] and all its associated [users]?', array( '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ) ) . '">' . CBTxt::Ph( 'Delete [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterGroupMenu', array( $row, $category, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'grp_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. ( $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $row->getParent()->getUrl() . '">' . CBTxt::Ph( 'Back to [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( ! $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $category->getUrl() . '">' . CBTxt::Ph( 'Back to [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. '</div>'
. '</div>';
return $return;
}
示例2: showCategoryPanes
/**
* render frontend category panes
*
* @param cbgjCategory $row
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showCategoryPanes( $row, $user, $plugin ) {
$authorized = cbgjClass::getAuthorization( $row, null, $user );
if ( $row->get( 'published' ) == 1 ) {
$state = '<div><i class="icon-ban-circle"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'unpublish', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [category]?', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '">' . CBTxt::Ph( 'Unpublish [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>';
} else {
$state = '<div><i class="icon-ok"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Publish [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>';
}
$return = '<legend class="gjHeaderTitle">' . $row->getName() . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. $row->getLogo( true )
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforeCategoryInfo', array( $row, $user, $plugin ) )
. ( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $row->nestedCount() . '</div>' : null )
. ( $row->groupCount() ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $row->groupCount() . '</div>' : null )
. ( $row->get( 'user_id' ) ? '<div>' . cbgjClass::getOverride( 'owner' ) . ': ' . $row->getOwnerName( true ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Types: [cat_types]', array( '[cat_types]' => implode( ', ', $row->getTypes() ) ) ) . '</div>'
. '<div>' . CBTxt::Ph( 'Access: [cat_access]', array( '[cat_access]' => $row->getAccess() ) ) . '</div>'
. ( $row->get( 'parent' ) ? '<div>' . cbgjClass::getOverride( 'category' ) . ': ' . $row->getParent()->getName( 0, true ) . '</div>' : null )
. '<div>' . CBTxt::Ph( 'Created: [cat_date]', array( '[cat_date]' => cbFormatDate( $row->get( 'date' ), 1, false ) ) ) . '</div>'
. cbgjClass::getIntegrations( 'gj_onAfterCategoryInfo', array( $row, $user, $plugin ) )
. '</div>';
if ( $row->get( 'description' ) ) {
$return .= '<div class="gjGridLeftDesc span12 well well-small">'
. $row->getDescription()
. '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforeCategoryMenu', array( $row, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'cat_nested_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'cat_grp_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'groups', 'new', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><i class="icon-pencil"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Edit [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'cat_message', $authorized ) && $row->groupCount() ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ? $state : null )
. ( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><i class="icon-remove"></i> <a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) ) . '">' . CBTxt::Ph( 'Delete [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterCategoryMenu', array( $row, $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'cat_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show', (int) $row->get( 'id' ) ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. ( $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . $row->getParent()->getUrl() . '">' . CBTxt::Ph( 'Back to [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( ! $row->get( 'parent' ) ? '<div><i class="icon-share-alt"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '">' . CBTxt::Ph( 'Back to [overview]', array( '[overview]' => cbgjClass::getOverride( 'overview' ) ) ) . '</a></div>' : null )
. '</div>'
. '</div>';
return $return;
}
示例3: showCategoryMessage
/**
* render frontend category message
*
* @param cbgjCategory $row
* @param array $input
* @param moscomprofilerUser $user
* @param object $plugin
*/
static function showCategoryMessage( $row, $input, $user, $plugin ) {
$row->setPathway( CBTxt::P( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), cbgjClass::getPluginURL( array( 'categories', 'message', (int) $row->get( 'id' ) ) ) );
$return = '<div class="gjCategoryMessage">'
. '<form action="' . cbgjClass::getPluginURL( array( 'categories', 'send', (int) $row->get( 'id' ) ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
. '<legend class="gjEditTitle">' . CBTxt::Ph( 'Message [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</legend>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['subject']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [groups] message subject.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
. '</span>'
. '</div>'
. '</div>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['body']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [groups] message body.', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) )
. '</span>'
. '</div>'
. '</div>';
if ( $input['captcha'] !== false ) {
$return .= '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Captcha' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. '<div style="margin-bottom: 5px;">' . $input['captcha']['code'] . '</div>'
. '<div>' . $input['captcha']['input'] . '</div>'
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. '</span>'
. '</div>'
. '</div>';
}
$return .= '<div class="gjButtonWrapper form-actions">'
. '<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" /> '
. '<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'show', (int) $row->get( 'id' ) ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
. '</div>'
. cbGetSpoofInputTag( 'plugin' )
. '</form>'
. '</div>';
echo $return;
}
示例4: showOverviewMessage
/**
* render frontend overview message
*
* @param array $input
* @param moscomprofilerUser $user
* @param object $plugin
*/
static function showOverviewMessage( $input, $user, $plugin ) {
global $_CB_framework;
$generalTitle = $plugin->params->get( 'general_title', $plugin->name );
$pageTitle = CBTxt::P( 'Message [category]', array( '[category]' => cbgjClass::getOverride( 'category', true ) ) );
$_CB_framework->setPageTitle( htmlspecialchars( $pageTitle ) );
if ( $generalTitle != '' ) {
$_CB_framework->appendPathWay( htmlspecialchars( CBTxt::T( $generalTitle ) ), cbgjClass::getPluginURL() );
}
$_CB_framework->appendPathWay( htmlspecialchars( cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) ), cbgjClass::getPluginURL( array( 'overview' ) ) );
$_CB_framework->appendPathWay( htmlspecialchars( $pageTitle ), cbgjClass::getPluginURL( array( 'overview', 'message' ) ) );
$return = '<div class="gjOverviewMessage">'
. '<form action="' . cbgjClass::getPluginURL( array( 'overview', 'send' ) ) . '" method="post" enctype="multipart/form-data" name="gjForm" id="gjForm" class="gjForm form-horizontal">'
. '<legend class="gjEditTitle">' . $pageTitle . '</legend>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Subject' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['subject']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [categories] message subject.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) )
. '</span>'
. '</div>'
. '</div>'
. '<div class="gjEditContentInput control-group">'
. '<label class="gjEditContentInputTitle control-label">' . CBTxt::Th( 'Body' ) . '</label>'
. '<div class="gjEditContentInputField controls">'
. $input['body']
. '<span class="gjEditContentInputIcon help-inline">'
. cbgjClass::getIcon( null, CBTxt::T( 'Required' ), 'icon-star' )
. cbgjClass::getIcon( CBTxt::P( 'Input [categories] message body.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) )
. '</span>'
. '</div>'
. '</div>'
. '<div class="gjButtonWrapper form-actions">'
. '<input type="submit" value="' . htmlspecialchars( CBTxt::T( 'Send Message' ) ) . '" class="gjButton gjButtonSubmit btn btn-primary" /> '
. '<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Cancel' ) ) . '" class="gjButton gjButtonCancel btn btn-mini" onclick="' . cbgjClass::getPluginURL( array( 'overview' ), CBTxt::T( 'Are you sure you want to cancel? All unsaved data will be lost!' ) ) . '" />'
. '</div>'
. cbGetSpoofInputTag( 'plugin' )
. '</form>'
. '</div>';
echo $return;
}
示例5: listUsedStrings
/**
* Lists the used translations into an HTML table for display
*
* @return string
*/
public function listUsedStrings()
{
$r = null;
if ($this->translatedStrings) {
$r = '<table class="adminlist" id="cbtranslatedstrings"><tr class="sectiontableheader"><th>' . ($this->mode == 3 ? CBTxt::Th('Untranslated strings on this page') : CBTxt::Th('Translations on this page')) . ': ' . CBTxt::Th('Keys') . '</th><th>' . CBTxt::Th('Default string') . '</th><th>' . CBTxt::Th('Translated string') . '</th></tr>';
$s = 0;
foreach ($this->translatedStrings as $k => $v) {
$columns = $this->generateHtmlColumns($k, $v);
$r .= '<tr class="sectiontableentry' . (($s & 1) + 1) . ' row' . ($s++ & 1) . '">';
foreach ($columns as $htmlColumn) {
$r .= '<td>' . $htmlColumn . '</td>';
}
$r .= '</tr>';
}
$r .= '</table>';
}
return $r;
}
示例6: showOverviewPanes
/**
* render frontend overview panes
*
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showOverviewPanes( $user, $plugin ) {
$overviewDesc = CBTxt::Th( $plugin->params->get( 'overview_desc', null ) );
$authorized = cbgjClass::getAuthorization( null, null, $user );
$categoryCount = count( cbgjData::getCategories( array( 'cat_access', 'mod_lvl1' ), array( 'parent', '=', 0 ) ) );
$return = '<legend class="gjHeaderTitle">' . cbgjClass::getOverride( 'category', true ) . ' ' . cbgjClass::getOverride( 'overview' ) . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. '<img alt="' . htmlspecialchars( CBTxt::T( 'Logo' ) ) . '" src="' . $plugin->livePath . '/images/' . $plugin->params->get( 'overview_logo', 'default_overview.png' ) . '" class="gjLogoDefault img-polaroid" />'
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforeOverviewInfo', array( $user, $plugin ) )
. ( $categoryCount ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $categoryCount . '</div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterOverviewInfo', array( $user, $plugin ) )
. '</div>';
if ( $overviewDesc ) {
if ( $plugin->params->get( 'overview_desc_content', 0 ) ) {
$overviewDesc = cbgjClass::prepareContentPlugins( $overviewDesc );
}
$return .= '<div class="gjGridLeftDesc span12 well well-small">' . $overviewDesc . '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforeOverviewMenu', array( $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'cat_create', $authorized ) ? '<div><i class="icon-plus"></i> <a href="' . cbgjClass::getPluginURL( array( 'categories', 'new' ) ) . '">' . CBTxt::Ph( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'usr_mod', $authorized ) && $categoryCount ? '<div><i class="icon-envelope"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview', 'message' ) ) . '">' . CBTxt::Ph( 'Message [categories]', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'usr_panel', $authorized ) ? '<div><i class="icon-home"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel' ) ) . '">' . CBTxt::Ph( 'My [panel]', array( '[panel]' => cbgjClass::getOverride( 'panel' ) ) ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterOverviewMenu', array( $user, $plugin ), null, null )
. ( cbgjClass::hasAccess( 'gen_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show' ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. '</div>'
. '</div>';
return $return;
}
示例7: showOverviewMain
/**
* render frontend overview main
*
* @param object $rows
* @param object $pageNav
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showOverviewMain( $rows, $pageNav, $user, $plugin ) {
$authorized = cbgjClass::getAuthorization( null, null, $user );
$overviewSearch = $plugin->params->get( 'overview_search', 1 );
$overviewPaging = $plugin->params->get( 'overview_paging', 1 );
$overviewLimitbox = $plugin->params->get( 'overview_limitbox', 1 );
$categoryDescLimit = (int) $plugin->params->get( 'overview_cat_desc_limit', 150 );
$categoryApprove = $plugin->params->get( 'category_approve', 0 );
$newCategory = ( $plugin->params->get( 'overview_new_category', 0 ) && cbgjClass::hasAccess( 'cat_create', $authorized ) );
$newGroup = ( $plugin->params->get( 'overview_new_group', 0 ) && cbgjClass::hasAccess( 'grp_create', $authorized ) );
$return = null;
if ( $newCategory || $newGroup ) {
$return .= '<div class="gjTop gjTopCenter">'
. '<div class="btn-group">'
. ( $newCategory ? '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [category]', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'new' ), true ) . '" />' : null )
. ( $newGroup ? '<input type="button" value="' . htmlspecialchars( CBTxt::P( 'New [group]', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ) ) . '" class="gjButton btn" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'new' ), true, true, false, null, true ) . '" />' : null )
. '</div>'
. '</div>';
}
$return .= '<form action="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '" method="post" name="gjForm" id="gjForm" class="gjForm">'
. ( $overviewSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );
if ( $rows ) foreach ( $rows as $row ) {
$authorized = cbgjClass::getAuthorization( $row, null, $user );
if ( $row->get( 'published' ) == 1 ) {
$state = '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'unpublish', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [category]?', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), true, false, null, true ) . '"><i class="icon-ban-circle"></i> ' . CBTxt::Th( 'Unpublish' ) . '</a></div>';
} else {
$state = '<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-ok"></i> ' . CBTxt::Th( 'Publish' ) . '</a></div>';
}
$canApprove = ( $categoryApprove && ( $row->get( 'published' ) == -1 ) && cbgjClass::hasAccess( 'cat_can_publish', $authorized ) );
$beforeMenu = cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryMenu', array( $row, $user, $plugin ) );
$afterMenu = cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryMenu', array( $row, $user, $plugin ) );
$return .= '<div class="gjContent row-fluid">'
. '<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
. '<div class="gjContentBody mini-layout span10">'
. '<div class="gjContentBodyHeader row-fluid">'
. '<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . '</small></h5></div>'
. '<div class="gjContentBodyMenu span3">';
if ( $canApprove ) {
$return .= '<input type="button" value="' . htmlspecialchars( CBTxt::T( 'Approve' ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'publish', (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
} else {
if ( ( $row->get( 'published' ) == 0 ) || ( ( $row->get( 'published' ) == 1 ) && ( ! cbgjClass::hasAccess( 'cat_approved', $authorized ) ) ) ) {
$return .= cbgjClass::getIcon( null, CBTxt::P( 'This [category] is currently unpublished.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) ), 'icon-eye-close' );
}
}
if ( $beforeMenu || cbgjClass::hasAccess( array( 'mod_lvl1', 'cat_can_publish' ), $authorized ) || $afterMenu ) {
$menuItems = $beforeMenu
. ( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'categories', 'edit', (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
. ( ( ! $canApprove ) && cbgjClass::hasAccess( 'cat_can_publish', $authorized ) ? $state : null )
. ( cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'categories', 'delete', (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [category] and all its associated [groups]?', array( '[category]' => cbgjClass::getOverride( 'category' ), '[groups]' => cbgjClass::getOverride( 'group', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
. $afterMenu;
$return .= cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
}
$return .= '</div>'
. '</div>'
. '<div class="gjContentBodyInfo">' . ( $row->getDescription( $categoryDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $categoryDescLimit ) . '</div>' : null ) . '</div>'
. '<div class="gjContentDivider"></div>'
. '<div class="gjContentBodyFooter">'
. cbgjClass::getIntegrations( 'gj_onBeforeOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
. ( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl1', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'category', $row->nestedCount() ) . ' | ' : null )
. ( $row->groupCount() ? cbgjClass::getOverride( 'group', $row->groupCount() ) . ' | ' : null )
. implode( ', ', $row->getTypes() )
. cbgjClass::getIntegrations( 'gj_onAfterOverviewCategoryInfo', array( $row, $user, $plugin ), null, 'span' )
. '</div>'
. '</div>'
. '</div>';
} else {
$return .= '<div class="gjContent">';
if ( $overviewSearch && $pageNav->searching ) {
$return .= CBTxt::Ph( 'No [category] search results found.', array( '[category]' => cbgjClass::getOverride( 'category' ) ) );
} else {
$return .= CBTxt::Ph( 'There are no [categories] available.', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) );
}
$return .= '</div>';
}
if ( $overviewPaging ) {
$return .= '<div class="gjPaging pagination pagination-centered">'
. ( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
//.........这里部分代码省略.........
示例8: edittab
function edittab(&$row, $option, &$lists, $tabid, &$paramsEditorHtml)
{
global $_CB_framework, $task, $_CB_database, $_PLUGINS;
_CBsecureAboveForm('edittab');
outputCbTemplate(2);
outputCbJs(2);
initToolTip(2);
$_CB_framework->outputCbJQuery('');
global $_CB_Backend_Title;
$_CB_Backend_Title = array(0 => array('cbicon-48-tabs', CBTxt::T('Community Builder Tab') . ": <small>" . ($row->tabid ? CBTxt::T('Edit') . ' [ ' . htmlspecialchars(getLangDefinition($row->title)) . ' ]' : CBTxt::T('New')) . '</small>'));
if ($row->tabid && !$row->enabled) {
echo '<div class="cbWarning">' . CBTxt::T('Tab is not published') . '</div>' . "\n";
}
$editorSave_description = $_CB_framework->saveCmsEditorJS('description');
ob_start();
?>
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'showTab') {
<?php
echo $editorSave_description;
?>
cbsubmitform( pressbutton );
return;
}
var r = new RegExp("[^0-9A-Za-z]", "i");
// do field validation
if (jQuery.trim(form.title.value) == "") {
alert('<?php
echo addslashes(CBTxt::T('You must provide a title.'));
?>
');
} else {
<?php
echo $editorSave_description;
?>
cbsubmitform( pressbutton );
}
}
<?php
$js = ob_get_contents();
ob_end_clean();
$_CB_framework->document->addHeadScriptDeclaration($js);
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<form action="<?php
echo $_CB_framework->backendUrl('index.php?option=com_comprofiler&task=saveTab');
?>
" method="POST" name="adminForm">
<table cellspacing="0" cellpadding="0" width="100%">
<tr valign="top">
<td width="60%" valign="top">
<table class="adminform">
<tr>
<th colspan="3">
<?php
echo CBTxt::T('Tab Details');
?>
</th>
</tr>
<tr>
<td width="20%"><?php
echo CBTxt::T('Title');
?>
:</td>
<td width="35%"><input type="text" name="title" class="inputbox" size="40" value="<?php
echo htmlspecialchars($row->title);
?>
" /></td>
<td width="45%"><?php
echo CBTxt::T('Title as will appear on tab.');
?>
</td>
</tr>
<tr>
<td colspan="3"><?php
echo CBTxt::T('Description: This description appears only on user edit, not on profile (For profile text, use delimiter fields)');
?>
:</td>
</tr>
<tr>
<td colspan="3" align="left"><?php
echo $_CB_framework->displayCmsEditor('description', $row->description, 600, 200, 50, 10);
// <textarea name="description" class="inputbox" cols="40" rows="10">< ?php echo htmlspecialchars( $row->description ); ? ></textarea>
?>
</td>
</tr>
<tr>
<td><?php
echo CBTxt::T('Publish');
?>
:</td>
<td><?php
echo $lists['enabled'];
?>
</td>
<td> </td>
</tr>
//.........这里部分代码省略.........
示例9: showPanelPanes
/**
* render frontend panel panes
*
* @param moscomprofilerUser $user
* @param object $plugin
* @return string
*/
static function showPanelPanes( $user, $plugin ) {
$panelDesc = CBTxt::Th( $plugin->params->get( 'panel_desc', null ) );
$panelCategoryDisplay = $plugin->params->get( 'panel_category_display', 1 );
$panelGroupDisplay = $plugin->params->get( 'panel_group_display', 1 );
$panelJoinedDisplay = $plugin->params->get( 'panel_joined_display', 1 );
$panelInvitesDisplay = $plugin->params->get( 'panel_invites_display', 1 );
$panelInvitedDisplay = $plugin->params->get( 'panel_invited_display', 1 );
$authorized = cbgjClass::getAuthorization( null, null, $user );
$ownedCategories = count( cbgjData::getCategories( null, array( 'user_id', '=', $user->id ) ) );
if ( $plugin->params->get( 'group_tab_joined', 0 ) ) {
$access = array( 'user_id', '=', (int) $user->id, array( 'e.user_id', '=', (int) $user->id, 'e.status', '!IN', array( -1, 0, 4 ) ) );
} else {
$access = array( 'user_id', '=', (int) $user->id );
}
$ownedGroups = count( cbgjData::getGroups( null, $access ) );
if ( $plugin->params->get( 'joined_tab_owned', 0 ) ) {
$access = array( 'user_id', '=', (int) $user->id, array( 'e.user_id', '=', (int) $user->id, 'e.status', '!IN', array( -1, 0, 4 ) ) );
} else {
$access = array( 'e.user_id', '=', (int) $user->id, 'e.status', '!IN', array( -1, 0, 4 ) );
}
$joinedGroups = count( cbgjData::getGroups( null, $access ) );
$ownedInvites = count( cbgjData::getInvites( null, array( 'user_id', '=', (int) $user->id ) ) );
$invitedTo = count( cbgjData::getInvites( null, array( 'user', '=', (int) $user->id, array( 'email', '=', $user->email ) ) ) );
$return = '<legend class="gjHeaderTitle">' . cbgjClass::getOverride( 'panel' ) . '</legend>'
. '<div class="gjGrid row-fluid">'
. '<div class="gjGridLeft span9">'
. '<div class="gjGridLeftLogo span4">'
. '<img alt="' . htmlspecialchars( CBTxt::Th( 'Logo' ) ) . '" src="' . $plugin->livePath . '/images/' . $plugin->params->get( 'panel_logo', 'default_panel.png' ) . '" class="gjLogoDefault img-polaroid" />'
. '</div>'
. '<div class="gjGridLeftInfo span8">'
. cbgjClass::getIntegrations( 'gj_onBeforePanelInfo', array( $user, $plugin ) )
. ( $panelCategoryDisplay && $ownedCategories ? '<div>' . cbgjClass::getOverride( 'category', true ) . ': ' . $ownedCategories . '</div>' : null )
. ( $panelGroupDisplay && $ownedGroups ? '<div>' . cbgjClass::getOverride( 'group', true ) . ': ' . $ownedGroups . '</div>' : null )
. ( $panelJoinedDisplay && $joinedGroups ? '<div>' . CBTxt::Ph( 'Joined: [grp_joined_count]', array( '[grp_joined_count]' => $joinedGroups ) ) . '</div>' : null )
. ( $panelInvitesDisplay && $ownedInvites ? '<div>' . CBTxt::Ph( 'Invites: [grp_invite_count]', array( '[grp_invite_count]' => $ownedInvites ) ) . '</div>' : null )
. ( $panelInvitedDisplay && $invitedTo ? '<div>' . CBTxt::Ph( 'Invited: [grp_invited_count]', array( '[grp_invited_count]' => $invitedTo ) ) . '</div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterPanelInfo', array( $user, $plugin ) )
. '</div>';
if ( $panelDesc ) {
if ( $plugin->params->get( 'panel_desc_content', 0 ) ) {
$panelDesc = cbgjClass::prepareContentPlugins( $panelDesc );
}
$return .= '<div class="gjGridLeftDesc span12 well well-small">' . $panelDesc . '</div>';
}
$return .= '</div>'
. '<div class="gjGridRight span3">'
. cbgjClass::getIntegrations( 'gj_onBeforePanelMenu', array( $user, $plugin ) )
. ( $panelCategoryDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-home"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'categories' ) ) . '">' . CBTxt::Ph( 'My [categories]', array( '[categories]' => cbgjClass::getOverride( 'category', true ) ) ) . '</a></div>' : null )
. ( $panelGroupDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-user"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'groups' ) ) . '">' . CBTxt::Ph( 'My [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
. ( $panelJoinedDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-user"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'joined' ) ) . '">' . CBTxt::Ph( 'Joined [groups]', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) ) . '</a></div>' : null )
. ( $panelInvitesDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-inbox"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'invites' ) ) . '">' . CBTxt::Th( 'My Invites' ) . '</a></div>' : null )
. ( $panelInvitedDisplay && cbgjClass::hasAccess( 'usr_reg', $authorized ) ? '<div><i class="icon-inbox"></i> <a href="' . cbgjClass::getPluginURL( array( 'panel', 'invited' ) ) . '">' . CBTxt::Th( 'Invited To' ) . '</a></div>' : null )
. cbgjClass::getIntegrations( 'gj_onAfterPanelMenu', array( $user, $plugin ) )
. ( cbgjClass::hasAccess( 'gen_usr_notifications', $authorized ) ? '<div><i class="icon-info-sign"></i> <a href="' . cbgjClass::getPluginURL( array( 'notifications', 'show' ) ) . '">' . CBTxt::Th( 'Notifications' ) . '</a></div>' : null )
. '<div><i class="icon-share-alt"></i> <a href="' . cbgjClass::getPluginURL( array( 'overview' ) ) . '">' . CBTxt::Ph( 'Back to [overview]', array( '[overview]' => cbgjClass::getOverride( 'overview' ) ) ) . '</a></div>'
. '</div>'
. '</div>';
return $return;
}
示例10: showInvited
/**
* render frontend tab invites
*
* @param object $rows
* @param object $pageNav
* @param moscomprofilerUser $displayed
* @param moscomprofilerUser $user
* @param object $plugin
* @param boolean $tabbed
* @return mixed
*/
static function showInvited( $rows, $pageNav, $displayed, $user, $plugin, $tabbed ) {
global $_CB_framework;
$invitedTabSearch = $plugin->params->get( 'invited_tab_search', 1 );
$invitedTabPaging = $plugin->params->get( 'invited_tab_paging', 1 );
$invitedTabLimitbox = $plugin->params->get( 'invited_tab_limitbox', 1 );
$invitedTabDescLimit = (int) $plugin->params->get( 'invited_tab_desc_limit', 150 );
if ( ! $tabbed ) {
$formUrl = cbgjClass::getPluginURL( array( 'panel', 'invited' ) );
} else {
$formUrl = $_CB_framework->userProfileUrl( $displayed->id, true, $plugin->tab->tabid );
}
$return = '<div class="gjTabInvited">'
. '<form action="' . $formUrl . '" method="post" name="gjTabForm_invited" id="gjTabForm_invited" class="gjForm">'
. ( $invitedTabSearch && ( $pageNav->searching || $pageNav->total ) ? '<div class="gjTop gjTopRight">' . $pageNav->search . '</div>' : null );
if ( $rows ) foreach ( $rows as $row ) {
$category = $row->getCategory();
$authorized = cbgjClass::getAuthorization( $category, $row, $user );
if ( $row->get( 'published' ) == 1 ) {
$state = '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'unpublish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to unpublish this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), true, false, null, true ) . '"><i class="icon-ban-circle"></i> ' . CBTxt::Th( 'Unpublish' ) . '</a></div>';
} else {
$state = '<div><a href="' . cbgjClass::getPluginURL( array( 'groups', 'publish', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-ok"></i> ' . CBTxt::Th( 'Publish' ) . '</a></div>';
}
$beforeMenu = cbgjClass::getIntegrations( 'gj_onBeforeProfileGroupInvitedMenu', array( $row, $category, $displayed, $user, $plugin ) );
$afterMenu = cbgjClass::getIntegrations( 'gj_onAfterProfileGroupInvitedMenu', array( $row, $category, $displayed, $user, $plugin ) );
$return .= '<div class="gjContent row-fluid">'
. '<div class="gjContentLogo span2">' . $row->getLogo( true, true, true ) . '</div>'
. '<div class="gjContentBody mini-layout span10">'
. '<div class="gjContentBodyHeader row-fluid">'
. '<div class="gjContentBodyTitle span9"><h5>' . $row->getName( 0, true ) . '<small> ' . cbFormatDate( $row->get( 'date' ), 1, false ) . ' - ' . $category->getName( 0, true ) . ( $row->get( 'parent' ) ? ' - ' . $row->getParent()->getName( 0, true ) : null ) . '</small></h5></div>'
. '<div class="gjContentBodyMenu span3">';
if ( cbgjClass::hasAccess( 'grp_join', $authorized ) ) {
$return .= '<input type="button" value="' . htmlspecialchars( ( cbgjClass::hasAccess( 'grp_invited', $authorized ) ? CBTxt::T( 'Accept Invite' ) : CBTxt::T( 'Join' ) ) ) . '" class="gjButton btn btn-mini btn-success" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'join', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), true, true, false, null, true ) . '" />';
}
if ( $beforeMenu || cbgjClass::hasAccess( array( 'grp_leave', 'mod_lvl2', 'mod_lvl3', 'grp_can_publish' ), $authorized ) || $afterMenu ) {
$menuItems = $beforeMenu
. ( cbgjClass::hasAccess( 'grp_leave', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'leave', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to leave this [group]?', array( '[group]' => cbgjClass::getOverride( 'group' ) ) ), true, false, null, true ) . '"><i class="icon-minus"></i> ' . CBTxt::Th( 'Leave' ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'mod_lvl3', $authorized ) ? '<div><a href="' . cbgjClass::getPluginURL( array( 'groups', 'edit', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), null, true, false, null, true ) . '"><i class="icon-pencil"></i> ' . CBTxt::Th( 'Edit' ) . '</a></div>' : null )
. ( cbgjClass::hasAccess( 'grp_can_publish', $authorized ) ? $state : null )
. ( cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ? '<div><a href="javascript: void(0);" onclick="' . cbgjClass::getPluginURL( array( 'groups', 'delete', (int) $category->get( 'id' ), (int) $row->get( 'id' ) ), CBTxt::P( 'Are you sure you want to delete this [group] and all its associated [users]?', array( '[group]' => cbgjClass::getOverride( 'group' ), '[users]' => cbgjClass::getOverride( 'user', true ) ) ), true, false, null, true ) . '"><i class="icon-remove"></i> ' . CBTxt::Th( 'Delete' ) . '</a></div>' : null )
. $afterMenu;
$return .= cbgjClass::getDropdown( $menuItems, CBTxt::Th( 'Menu' ) );
}
$return .= '</div>'
. '</div>'
. '<div class="gjContentBodyInfo">' . ( $row->getDescription( $invitedTabDescLimit ) ? '<div class="well well-small">' . $row->getDescription( $invitedTabDescLimit ) . '</div>' : null ) . '</div>'
. '<div class="gjContentDivider"></div>'
. '<div class="gjContentBodyFooter">'
. cbgjClass::getIntegrations( 'gj_onBeforeProfileGroupInvitedInfo', array( $row, $category, $displayed, $user, $plugin ), null, 'span' )
. ( ( ( ( ! $row->get( 'nested' ) ) && cbgjClass::hasAccess( 'mod_lvl2', $authorized ) ) || $row->get( 'nested' ) ) && $row->nestedCount() ? cbgjClass::getOverride( 'group', $row->nestedCount() ) . ' | ' : null )
. ( $row->userCount() ? cbgjClass::getOverride( 'user', $row->userCount() ) . ' | ' : null )
. $row->getType()
. cbgjClass::getIntegrations( 'gj_onAfterProfileGroupInvitedInfo', array( $row, $category, $displayed, $user, $plugin ), null, 'span' )
. '</div>'
. '</div>'
. '</div>';
} else {
$return .= '<div class="gjContent">';
if ( $invitedTabSearch && $pageNav->searching ) {
$return .= CBTxt::Th( 'No invite search results found.' );
} else {
if ( $displayed->id == $user->id ) {
$return .= CBTxt::Ph( 'You are not invited to any [groups].', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) );
} else {
$return .= CBTxt::Ph( 'This user is not invited to any [groups].', array( '[groups]' => cbgjClass::getOverride( 'group', true ) ) );
}
}
$return .= '</div>';
}
if ( $invitedTabPaging ) {
$return .= '<div class="gjPaging pagination pagination-centered">'
. ( $pageNav->total > $pageNav->limit ? $pageNav->pagelinks : null )
. ( ! $invitedTabLimitbox ? $pageNav->getLimitBox( false ) : ( $pageNav->total ? '<div class="gjPagingLimitbox">' . $pageNav->limitbox . '</div>' : null ) )
. '</div>';
}
//.........这里部分代码省略.........
示例11: ajaxResults
function ajaxResults($usernames, $emailSubject, $emailBody, $limitstart, $limit, $total, $errors)
{
global $_CB_framework;
if ($errors == 0) {
?>
<h3><?php
echo sprintf(CBTxt::T('Sent email to %s of %s users'), min($total, $limitstart + $limit), $total);
?>
</h3>
<h4><?php
echo sprintf(CBTxt::T('Just sent %s emails to following users:'), min($limit, $total - $limitstart));
?>
</h4>
<div><?php
echo $usernames;
?>
</div>
<h3><?php
} else {
?>
<h3><?php
echo sprintf(CBTxt::T('Could not send email to %s of %s users out of %s emails to send'), $errors, min($total, $limitstart + $limit), $total);
?>
</h3>
<h4><?php
echo sprintf(CBTxt::T('Just sent %s emails to following users:'), min($limit, $total - $limitstart) - $errors);
?>
</h4>
<div><?php
echo $usernames;
?>
</div>
<h3><?php
}
if ($total - ($limitstart + $limit) > 0) {
echo sprintf(CBTxt::T('Still %s emails remaining to send.'), $total - ($limitstart + $limit));
} else {
if ($errors > 0) {
echo sprintf(CBTxt::T('%s emails could not be sent due to a sending error.'), $errors);
} elseif ($total == 1) {
echo CBTxt::T('Your email has been sent.');
} else {
echo sprintf(CBTxt::T('All %s emails have been sent.'), $total);
}
}
?>
</h3>
<?php
if (!($total - ($limitstart + $limit) > 0)) {
?>
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
<thead>
<tr>
<th colspan="2" width="100%" class="title"><?php
echo CBTxt::T('Email Sent');
?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td width="15%" class="captionCell"><?php
echo CBTxt::T('Email Subject');
?>
:</td>
<td width="85%" class="fieldCell">
<?php
echo htmlspecialchars($emailSubject);
?>
</td>
</tr>
<tr>
<td class="captionCell"><?php
echo CBTxt::T('Email Message');
?>
:</td>
<td class="fieldCell">
<?php
echo $emailBody;
?>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th align="center" colspan="2"></th>
</tr>
</tfoot>
</table>
<h3><a href="<?php
echo $_CB_framework->backendUrl('index.php?option=com_comprofiler&task=showusers');
?>
"><?php
echo CBTxt::Th('Click here to go back to users management');
?>
</a></h3>
<?php
}
//.........这里部分代码省略.........
示例12: _form_spacer
/**
* @param string The name of the form element
* @param string The value of the element
* @param CBSimpleXMLElement $node The xml element for the parameter
* @param string The control name
* @return string The html for the element
*/
function _form_spacer( $name, $value, &$node, $control_name ) {
if ( $value ) {
return '<strong id="' . $this->control_id( $control_name, $name ) . '">' . CBTxt::Th( $value ) . '</strong>';
} else {
return '<hr id="' . $this->control_id( $control_name, $name ) . '" />';
}
}
示例13: loginForm
static function loginForm($option, &$postvars, $regErrorMSG = null)
{
global $_CB_framework, $_CB_database, $_PLUGINS;
$results = $_PLUGINS->trigger('onBeforeLoginFormDisplay', array(&$postvars, $regErrorMSG));
if ($_PLUGINS->is_errors()) {
echo "<script type=\"text/javascript\">alert(\"" . $_PLUGINS->getErrorMSG() . "\"); window.history.go(-1); </script>\n";
exit;
}
outputCbTemplate(1);
outputCbJs(1);
initToolTip(1);
$params = null;
$login_module_file = $_CB_framework->getCfg('absolute_path') . '/modules/' . (checkJversion() > 0 ? 'mod_cblogin/' : '') . 'mod_cblogin.php';
if (file_exists($login_module_file)) {
define('_UE_LOGIN_FROM', 'loginform');
$_CB_database->setQuery("SELECT params from #__modules WHERE module = 'mod_cblogin' ORDER BY ordering", 0, 1);
$raw_params = $_CB_database->loadResult();
$params = new cbParamsBase($raw_params);
// needed for login module
// $params of login module is needed for the include( $login_module_file ) below !!
ob_start();
include $login_module_file;
$moduleContent = ob_get_contents();
ob_end_clean();
} else {
$moduleContent = CBTxt::Th("Error: CB Login module not installed (required).");
}
if ($regErrorMSG) {
echo "<div class='error'>" . $regErrorMSG . "</div>\n";
}
// output results of plugins event "onBeforeRegisterFormDisplay":
if (is_array($results)) {
echo implode('', $results);
}
echo '<div class="cbclearboth"><div id="cb_cb_comp_login"><div class="componentheading">' . _LOGIN_TITLE . '</div><div class="cb_comp_outer"><div class="cb_comp_inner">';
echo $moduleContent;
echo '</div></div></div></div>';
echo "<div class=\"cbClr\"></div>";
}
示例14: getEditTab
/**
* Generates the HTML to display the user edit tab
* @param object tab reflecting the tab database entry
* @param object mosUser reflecting the user being displayed
* @param int 1 for front-end, 2 for back-end
* @returns mixed : either string HTML for tab content, or false if ErrorMSG generated
*/
function getEditTab($tab,$user,$ui) {
global $_CB_framework;
//fix to hide edit tab from front-end!
//if ($ui==1) return;
// Get all relevant tab parameters - these settings are global and set by the admin
$tabparams = $this->_pgGetTabParameters($user);
//print_r($tabparams);
$isModerator=isModerator($_CB_framework->myId());
if ($ui==1 && $tabparams["pgallowuserenable"]!=1 && $tabparams["cbpgenable"]!=1 && !$isModerator) {
return null;
}
$testfeature = 0; // test feature setting to allow backend running total edits set this to 1;
$return = $this->_writeTabDescription( $tab, $user );
$return .= "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\">\n";
// Short Greeting:
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">" . CBTxt::Th("Short Greeting") . ":</td>\n";
$return .= " <td class=\"fieldCell\"><input class=\"inputbox\" type=\"text\" name=\"".$this->_getPGparamName("cb_pgshortgreeting")."\" mosReq=\"0\" mosLabel=\"" . htmlspecialchars(CBTxt::T("Short Greeting")) . "\" value=\"".cbUnHtmlspecialchars($user->cb_pgshortgreeting)."\" size=\"40\" />";
$return .= getFieldIcons($ui, false, true, CBTxt::Th("Enter a short greeting for your gallery viewers"), CBTxt::Th("Short Greeting").":");
$return .= "</td></tr>\n";
$lists = array();
// make the select list for the special gallery yes/no fields (normally 1=yes, 0=no)
$yesno = array();
$yesno[] = moscomprofilerHTML::makeOption( '_UE_YES', _CMN_YES ); // 1
$yesno[] = moscomprofilerHTML::makeOption( '_UE_NO', _CMN_NO ); // 0
// Enable Gallery:
// logic is: that backend can edit cb field but frontend can only edit if parameter is set to allow or if moderator is viewing
//
if ($tabparams["pgallowuserenable"] || $ui==2 || $isModerator) {
$lists['_pg_EnableProfileGallery'] = moscomprofilerHTML::radioList( $yesno, $this->_getPGparamName("cb_pgenable"), 'class="inputbox" size="1" mosReq="0" mosLabel="' . htmlspecialchars(CBTxt::T("Enable Gallery")).'"', 'value', 'text', $user->cb_pgenable);
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">" . CBTxt::Th("Enable Gallery") . ":</td>\n";
$return .= " <td class=\"fieldCell\">".$lists['_pg_EnableProfileGallery'];
$return .= getFieldIcons($ui, false, false, CBTxt::Th("Select Yes or No to turn-on or off the Gallery Tab"),CBTxt::Th("Enable Gallery") . ":");
$return .= "</td>\n</tr>\n";
}
// Enable Autopublish Items:
if ($tabparams["pgallowautopublishoverride"] || $ui==2 || $isModerator) {
$lists['_pg_AutoPublish'] = moscomprofilerHTML::radioList( $yesno, $this->_getPGparamName("cb_pgautopublish"), 'class="inputbox" size="1" mosReq="0" mosLabel="' . htmlspecialchars(CBTxt::T("Autopublish items")).'"', 'value', 'text', $user->cb_pgautopublish);
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">" . CBTxt::Th("Autopublish items") . ":</td>\n";
$return .= " <td class=\"fieldCell\">";
if ($tabparams["pgautopublish"]) {
$return .= $lists['_pg_AutoPublish'];
} else {
$return .= ($tabparams["cbpgautopublish"] ? _CMN_YES : _CMN_NO);
}
$return .= getFieldIcons($ui, false, false, CBTxt::Th("Select Yes or No to autopublish or not newly uploaded gallery items"), CBTxt::Th("Autopublish items").":");
$return .= "</td>\n</tr>\n";
}
// Auto-approve Items setting in backend or frontend for moderators:
if ( ($ui == 2 && $tabparams["pgallowautoapproveoverride"]) || ($isModerator && $tabparams["pgallowautoapproveoverride"]) ) {
$lists['_pg_AutoApprove'] = moscomprofilerHTML::radioList( $yesno, $this->_getPGparamName("cb_pgautoapprove"), 'class="inputbox" size="1" mosReq="0" mosLabel="' . htmlspecialchars(CBTxt::T("Automatically approve")) . '"', 'value', 'text', $user->cb_pgautoapprove);
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">" . CBTxt::Th("Automatically approve") . ":</td>\n";
$return .= " <td class=\"fieldCell\">". $lists['_pg_AutoApprove'];
$return .= getFieldIcons($ui, false, false,CBTxt::Th("This value can be set by the admin to over-ride the gallery plugin backend default approval parameter"), CBTxt::Th("Automatically approve") . ":");
$return .= "</td>\n</tr>\n";
}
// Storage Quota setting only in backend or frontend for moderators:
if (isset($user->cb_pgtotalquotasize) && $user->cb_pgtotalquotasize) {
$quota = $user->cb_pgtotalquotasize;
} else {
$quota = $tabparams["pgdefaultquota"];
}
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">" . CBTxt::Th("Storage Quota (KB)") . ":</td>\n";
$return .= " <td class=\"fieldCell\">";
if ($ui == 2 || $isModerator) {
$return .= "<input class=\"inputbox\" type=\"text\" name=\"".$this->_getPGparamName("cb_pgtotalquotasize")."\" mosReq=\"0\" mosLabel=\"" . htmlspecialchars(CBTxt::T("Storage Quota (KB)")) . "\" value=\"".(isset($user->cb_pgtotalquotasize) ? $user->cb_pgtotalquotasize : null)."\" size=\"10\" />";
$return .= " (" . CBTxt::Th("Default setting") . ": ".$tabparams["pgdefaultquota"].")";
} else {
$return .= $quota;
}
$return .= getFieldIcons($ui, false, false, CBTxt::Th("This value can be set by the admin to over-ride the gallery plugin backend default user quota"), CBTxt::Th("Storage Quota (KB)") . ":");
$return .= "</td>\n</tr>\n";
// Uploaded Items Quota setting only in backend or frontend for moderators:
if (isset($user->cb_pgtotalquotaitems) && $user->cb_pgtotalquotaitems) {
//.........这里部分代码省略.........
示例15: _DEFAULT
/** Users View */
static function _DEFAULT()
{
CBtoolmenuBar::startTable();
if (CBuser::getMyInstance()->authoriseAction('core.create', 'com_users')) {
CBtoolmenuBar::addNew();
}
if (CBuser::getMyInstance()->authoriseAction('core.edit', 'com_users')) {
CBtoolmenuBar::editList();
}
CBtoolmenuBar::spacer();
CBtoolmenuBar::custom('emailusers', 'mail.png', 'mail.png', 'Mass Mail', false);
CBtoolmenuBar::spacer();
CBtoolmenuBar::custom('resendconfirmationemails', 'mail.png', 'mail.png', 'Resend Confirmations', false);
CBtoolmenuBar::spacer();
if (CBuser::getMyInstance()->authoriseAction('core.delete', 'com_users')) {
CBtoolmenuBar::deleteList();
CBtoolmenuBar::spacer();
}
self::_PERMISSIONS('com_users', '<div class="cbbejeoptionsintro cbbejeoptionsintrocomusers">' . CBTxt::Th("These are the Joomla Users Manager Options: Some of these Preferences and all of the Permissions also apply to the Community Builder User Manager (except \"Access Component\" which applies only to the Joomla Users Manager. The \"Access Component\" permission for Community Builder is located in CB Configuration Options. To hide CB Users Manager to a group, simply disable all its permissions here):") . '</div>');
CBtoolmenuBar::spacer();
CBtoolmenuBar::endTable();
}