本文整理汇总了PHP中Gdn_Module类的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Module类的具体用法?PHP Gdn_Module怎么用?PHP Gdn_Module使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Gdn_Module类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ToString
public function ToString()
{
if (is_object($this->Conversation) && $this->Conversation->ConversationID > 0) {
return parent::ToString();
}
return '';
}
示例2: toString
public function toString()
{
if (!$this->data('DiscussionEvents')) {
$this->getData($this->Limit);
}
return parent::ToString();
}
示例3: ToString
public function ToString()
{
if (!Gdn::Session()->IsValid() && C('Garden.Modules.ShowGuestModule')) {
return parent::ToString();
}
return '';
}
示例4: ToString
public function ToString()
{
if (is_object($this->User)) {
return parent::ToString();
}
return '';
}
示例5: __construct
public function __construct(&$Sender = '')
{
$this->HtmlId = 'SideMenu';
$this->AutoLinkGroups = TRUE;
$this->ClearGroups();
parent::__construct($Sender);
}
示例6: ToString
public function ToString()
{
if ($this->_ActivityData !== FALSE && $this->_ActivityData->NumRows() > 0) {
return parent::ToString();
}
return '';
}
示例7: ToString
public function ToString()
{
$Session = Gdn::Session();
$Controller = Gdn::Controller();
$UserID = $Controller->User->UserID;
$MemberOptions = array();
$ProfileOptions = array();
$Controller->EventArguments['UserID'] = $UserID;
$Controller->EventArguments['ProfileOptions'] =& $ProfileOptions;
$Controller->EventArguments['MemberOptions'] =& $MemberOptions;
if ($Controller->EditMode) {
return '<div class="ProfileOptions">' . Anchor(T('Back to Profile'), UserUrl($Controller->User), array('class' => 'ProfileButtons')) . '</div>';
// $ProfileOptions[] = array('Text' => T('Back to Profile'), 'Url' => UserUrl($Controller->User), 'CssClass' => 'BackToProfile');
} else {
// Profile Editing
if (hasEditProfile($Controller->User->UserID)) {
$ProfileOptions[] = array('Text' => Sprite('SpEditProfile') . ' ' . T('Edit Profile'), 'Url' => UserUrl($Controller->User, '', 'edit'));
}
// Ban/Unban
$MayBan = CheckPermission('Garden.Moderation.Manage') || CheckPermission('Garden.Users.Edit') || CheckPermission('Moderation.Users.Ban');
if ($MayBan && $UserID != $Session->UserID) {
if ($Controller->User->Banned) {
$ProfileOptions[] = array('Text' => Sprite('SpBan') . ' ' . T('Unban'), 'Url' => "/user/ban?userid={$UserID}&unban=1", 'CssClass' => 'Popup');
} elseif (!$Controller->User->Admin) {
$ProfileOptions[] = array('Text' => Sprite('SpBan') . ' ' . T('Ban'), 'Url' => "/user/ban?userid={$UserID}", 'CssClass' => 'Popup');
}
}
// Delete content.
if (CheckPermission('Garden.Moderation.Manage')) {
$ProfileOptions[] = array('Text' => Sprite('SpDelete') . ' ' . T('Delete Content'), 'Url' => "/user/deletecontent?userid={$UserID}", 'CssClass' => 'Popup');
}
}
return parent::ToString();
}
示例8: ToString
public function ToString()
{
if (!Gdn::Session()->IsValid()) {
return parent::ToString();
}
return '';
}
示例9: toString
public function toString()
{
$Form = $this->_Sender->Form;
$this->_Sender->addJsFile('condition.js');
if ($Form->authenticatedPostBack()) {
// Grab the conditions from the form and convert them to the conditions array.
$this->Conditions($this->_FromForm());
} else {
}
$this->Types = array_merge(array('' => '(' . sprintf(t('Select a %s'), t('Condition Type', 'Type')) . ')'), Gdn_Condition::AllTypes());
//die(print_r($this->Types));
// Get all of the permissions that are valid for the permissions dropdown.
$PermissionModel = new PermissionModel();
$Permissions = $PermissionModel->GetGlobalPermissions(0);
$Permissions = array_keys($Permissions);
sort($Permissions);
$Permissions = array_combine($Permissions, $Permissions);
$Permissions = array_merge(array('' => '(' . sprintf(t('Select a %s'), t('Permission')) . ')'), $Permissions);
$this->Permissions = $Permissions;
// Get all of the roles.
$RoleModel = new RoleModel();
$Roles = $RoleModel->getArray();
$Roles = array_merge(array('-' => '(' . sprintf(t('Select a %s'), t('Role')) . ')'), $Roles);
$this->Roles = $Roles;
$this->Form = $Form;
return parent::ToString();
}
示例10: ToString
public function ToString()
{
if (Gdn::Config('Vanilla.Categories.Use') == TRUE) {
return parent::ToString();
}
return '';
}
示例11: ToString
public function ToString()
{
if (isset($this->Data) && is_object($this->Data) && $this->Data->NumRows() > 0) {
return parent::ToString();
}
return '';
}
示例12: toString
public function toString()
{
if (is_object($this->Data) && $this->Data->numRows() > 0) {
return parent::toString();
}
return '';
}
示例13: ToString
public function ToString()
{
if ($this->Data) {
return parent::ToString();
}
return '';
}
示例14: toString
public function toString()
{
if (Gdn::session()->isValid()) {
return parent::ToString();
}
return '';
}
示例15: toString
public function toString()
{
if (is_array($this->ModeratorData) && count($this->ModeratorData) > 0 && is_array($this->ModeratorData[0]->Moderators) && count($this->ModeratorData[0]->Moderators) > 0) {
return parent::ToString();
}
return '';
}