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


PHP Gdn_Controller::AddDefinition方法代碼示例

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


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

示例1: AttachButtonBarResources

 /**
  * Insert buttonbar resources
  * 
  * This method is abstracted because it is invoked by two different 
  * controllers.
  * 
  * @param Gdn_Controller $Sender 
  */
 protected function AttachButtonBarResources($Sender, $Formatter)
 {
     $Sender->AddCssFile('buttonbar.css', 'plugins/ButtonBar');
     $Sender->AddJsFile('buttonbar.js', 'plugins/ButtonBar');
     $Sender->AddJsFile('jquery.hotkeys.js', 'plugins/ButtonBar');
     $Sender->AddDefinition('InputFormat', $Formatter);
 }
開發者ID:seedbank,項目名稱:old-repo,代碼行數:15,代碼來源:class.buttonbar.plugin.php

示例2: AttachButtonBarResources

 /**
  * Insert buttonbar resources
  * 
  * This method is abstracted because it is invoked by multiple controllers.
  * 
  * @param Gdn_Controller $Sender 
  */
 protected function AttachButtonBarResources($Sender, $Formatter)
 {
     if (!in_array($Formatter, $this->Formats)) {
         return;
     }
     $Sender->AddJsFile('buttonbar.js', 'plugins/ButtonBar');
     $Sender->AddJsFile('jquery.hotkeys.js', 'plugins/ButtonBar');
     $Sender->AddDefinition('ButtonBarLinkUrl', T('ButtonBar.LinkUrlText', 'Enter your URL:'));
     $Sender->AddDefinition('ButtonBarImageUrl', T('ButtonBar.ImageUrlText', 'Enter image URL:'));
     $Sender->AddDefinition('ButtonBarBBCodeHelpText', T('ButtonBar.BBCodeHelp', 'You can use <b><a href="http://en.wikipedia.org/wiki/BBCode" target="_new">BBCode</a></b> in your post.'));
     $Sender->AddDefinition('ButtonBarHtmlHelpText', T('ButtonBar.HtmlHelp', 'You can use <b><a href="http://htmlguide.drgrog.com/cheatsheet.php" target="_new">Simple Html</a></b> in your post.'));
     $Sender->AddDefinition('ButtonBarMarkdownHelpText', T('ButtonBar.MarkdownHelp', 'You can use <b><a href="http://en.wikipedia.org/wiki/Markdown" target="_new">Markdown</a></b> in your post.'));
     $Sender->AddDefinition('InputFormat', $Formatter);
 }
開發者ID:edward-tsai,項目名稱:vanilla4china,代碼行數:21,代碼來源:class.buttonbar.plugin.php

示例3: AddPasswordStrength

 /**
  * 
  * @param Gdn_Controller $Controller
  */
 public function AddPasswordStrength($Controller)
 {
     $Controller->AddJsFile('password.js');
     $Controller->AddDefinition('MinPassLength', C('Garden.Registration.MinPasswordLength'));
     $Controller->AddDefinition('PasswordTranslations', T('Password Translations', 'Too Short,Contains Username,Very Weak,Weak,Ok,Good,Strong'));
 }
開發者ID:statico,項目名稱:openshift-origin-vanillaforums,代碼行數:10,代碼來源:class.usermodel.php

示例4: _Emotify

   /**
    *
    * @param Gdn_Controller $Sender
    */
	private function _Emotify($Sender) {
		$Sender->AddJsFile('plugins/Emotify/emotify.js');   
      $Sender->AddCssFile('plugins/Emotify/emotify.css');
      $Sender->AddDefinition('FormatEmoticons', C('Plugins.Emotify.FormatEmoticons', TRUE));
	}
開發者ID:nerdgirl,項目名稱:Forums-ILoveBadTV,代碼行數:9,代碼來源:default.php

示例5: AddPasswordStrength

 /**
  *
  * @param Gdn_Controller $Controller
  */
 public function AddPasswordStrength($Controller)
 {
     $Controller->AddJsFile('password.js');
     $Controller->AddDefinition('MinPassLength', C('Garden.Registration.MinPasswordLength'));
     $Controller->AddDefinition('PasswordTranslations', implode(',', array(T('Password Too Short', 'Too Short'), T('Password Contains Username', 'Contains Username'), T('Password Very Weak', 'Very Weak'), T('Password Weak', 'Weak'), T('Password Ok', 'OK'), T('Password Good', 'Good'), T('Password Strong', 'Strong'))));
 }
開發者ID:3marproof,項目名稱:vanilla,代碼行數:10,代碼來源:class.usermodel.php


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