当前位置: 首页>>代码示例>>PHP>>正文


PHP Gdn_Module类代码示例

本文整理汇总了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 '';
 }
开发者ID:tautomers,项目名称:knoopvszombies,代码行数:7,代码来源:class.addpeoplemodule.php

示例2: toString

 public function toString()
 {
     if (!$this->data('DiscussionEvents')) {
         $this->getData($this->Limit);
     }
     return parent::ToString();
 }
开发者ID:pkonecki,项目名称:DiscussionEvent,代码行数:7,代码来源:class.discussioneventmodule.php

示例3: ToString

 public function ToString()
 {
     if (!Gdn::Session()->IsValid() && C('Garden.Modules.ShowGuestModule')) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:elpum,项目名称:TgaForumBundle,代码行数:7,代码来源:class.guestmodule.php

示例4: ToString

 public function ToString()
 {
     if (is_object($this->User)) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:7,代码来源:class.userinfomodule.php

示例5: __construct

 public function __construct(&$Sender = '')
 {
     $this->HtmlId = 'SideMenu';
     $this->AutoLinkGroups = TRUE;
     $this->ClearGroups();
     parent::__construct($Sender);
 }
开发者ID:kerphi,项目名称:Garden,代码行数:7,代码来源:class.sidemenumodule.php

示例6: ToString

 public function ToString()
 {
     if ($this->_ActivityData !== FALSE && $this->_ActivityData->NumRows() > 0) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:sheldon,项目名称:Garden,代码行数:7,代码来源:class.recentactivitymodule.php

示例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();
 }
开发者ID:3marproof,项目名称:vanilla,代码行数:34,代码来源:class.profileoptionsmodule.php

示例8: ToString

 public function ToString()
 {
     if (!Gdn::Session()->IsValid()) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:edward-tsai,项目名称:vanilla4china,代码行数:7,代码来源:class.guestmodule.php

示例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();
 }
开发者ID:sitexa,项目名称:vanilla,代码行数:27,代码来源:class.conditionmodule.php

示例10: ToString

 public function ToString()
 {
     if (Gdn::Config('Vanilla.Categories.Use') == TRUE) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:sheldon,项目名称:Garden,代码行数:7,代码来源:class.categoriesmodule.php

示例11: ToString

 public function ToString()
 {
     if (isset($this->Data) && is_object($this->Data) && $this->Data->NumRows() > 0) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:tautomers,项目名称:knoopvszombies,代码行数:7,代码来源:class.bookmarkedmodule.php

示例12: toString

 public function toString()
 {
     if (is_object($this->Data) && $this->Data->numRows() > 0) {
         return parent::toString();
     }
     return '';
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:7,代码来源:class.inthisconversationmodule.php

示例13: ToString

 public function ToString()
 {
     if ($this->Data) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:7,代码来源:class.categoriesmodule.php

示例14: toString

 public function toString()
 {
     if (Gdn::session()->isValid()) {
         return parent::ToString();
     }
     return '';
 }
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:7,代码来源:class.categoryfollowtogglemodule.php

示例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 '';
 }
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:7,代码来源:class.categorymoderatorsmodule.php


注:本文中的Gdn_Module类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。