當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。