當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gdn_Controller::AddJSFile方法代碼示例

本文整理匯總了PHP中Gdn_Controller::AddJSFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gdn_Controller::AddJSFile方法的具體用法?PHP Gdn_Controller::AddJSFile怎麽用?PHP Gdn_Controller::AddJSFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gdn_Controller的用法示例。


在下文中一共展示了Gdn_Controller::AddJSFile方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Controller_Index

 /**
  * List all tags and allow searching
  * 
  * @param Gdn_Controller $Sender
  */
 public function Controller_Index($Sender)
 {
     $Sender->Title('Tagging');
     $Sender->AddSideMenu('settings/tagging');
     $Sender->AddCSSFile('plugins/Tagging/design/tagadmin.css');
     $Sender->AddJSFile('plugins/Tagging/js/admin.js');
     $SQL = Gdn::SQL();
     $Sender->Form->Method = 'get';
     $Sender->Form->InputPrefix = '';
     //$Sender->Form->Action = '/settings/tagging';
     list($Offset, $Limit) = OffsetLimit($Sender->Request->Get('Page'), 100);
     $Sender->SetData('_Limit', $Limit);
     if ($Search = $Sender->Request->Get('Search')) {
         $SQL->Like('Name', $Search, 'right');
     }
     $Data = $SQL->Select('t.*')->From('Tag t')->OrderBy('t.Name', 'asc')->OrderBy('t.CountDiscussions', 'desc')->Limit($Limit, $Offset)->Get()->ResultArray();
     $Sender->SetData('Tags', $Data);
     if ($Search = $Sender->Request->Get('Search')) {
         $SQL->Like('Name', $Search, 'right');
     }
     $Sender->SetData('RecordCount', $SQL->GetCount('Tag'));
     $Sender->Render('tagging', '', 'plugins/Tagging');
 }
開發者ID:bishopb,項目名稱:vanilla,代碼行數:28,代碼來源:class.tagging.plugin.php

示例2: SettingsController_Tagging_Create

   /**
    * Tag management (let admins rename tags, remove tags, etc).
    * TODO: manage the Plugins.Tagging.Required boolean setting that makes tagging required or not.
    * @param Gdn_Controller $Sender
    */
   public function SettingsController_Tagging_Create($Sender, $Args) {
      $Sender->Permission('Garden.Settings.Manage');
      $Sender->Title('Tagging');
      $Sender->AddSideMenu('settings/tagging');
      $Sender->AddCSSFile('plugins/Tagging/design/tagadmin.css');
      $Sender->AddJSFile('plugins/Tagging/admin.js');
      $SQL = Gdn::SQL();

      list($Offset, $Limit) = OffsetLimit($Sender->Request->Get('Page'), 100);
      $Sender->SetData('_Limit', $Limit);

      $Sender->SetData('Tags', $SQL
         ->Select('t.*')
         ->From('Tag t')
         ->OrderBy('t.Name', 'asc')
         ->OrderBy('t.CountDiscussions', 'desc')
         ->Limit($Limit, $Offset)
         ->Get()->ResultArray());

      $Sender->SetData('RecordCount', $SQL->GetCount('Tag'));
         
      $Sender->Render('Tagging', '', 'plugins/Tagging');
   }
開發者ID:nerdgirl,項目名稱:Forums-ILoveBadTV,代碼行數:28,代碼來源:class.tagging.plugin.php

示例3: base_render_before

 /**
  *
  *
  * @param Gdn_Controller $Sender
  * @param $Args
  */
 public function base_render_before($Sender, $Args)
 {
     if (!Gdn::Session()->UserID) {
         $Sender->AddJSFile('jsconnect.js', 'plugins/jsconnect');
         $Sender->AddCssFile('jsconnect.css', 'plugins/jsconnect');
     }
 }
開發者ID:vanilla,項目名稱:addons,代碼行數:13,代碼來源:class.jsconnect.plugin.php


注:本文中的Gdn_Controller::AddJSFile方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。