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


PHP Preference::insert方法代码示例

本文整理汇总了PHP中Preference::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Preference::insert方法的具体用法?PHP Preference::insert怎么用?PHP Preference::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Preference的用法示例。


在下文中一共展示了Preference::insert方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('gmaps_api_key')) {
         return false;
     }
     Preference::insert('gmaps_api_key', 'GoogleMaps api key', '', '75', 'string', 'plugins', $this->name);
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:13,代码来源:GoogleMaps.plugin.php

示例2: install

 /**
  * install
  * This function installs the upnp localplay controller
  */
 public function install()
 {
     $sql = "CREATE TABLE `localplay_upnp` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " . "`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " . "`owner` INT( 11 ) NOT NULL, " . "`url` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL  " . ") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
     $db_results = Dba::query($sql);
     // Add an internal preference for the users current active instance
     Preference::insert('upnp_active', 'UPnP Active Instance', '0', '25', 'integer', 'internal', 'upnp');
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:12,代码来源:upnp.controller.php

示例3: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('flickr_api_key')) {
         return false;
     }
     Preference::insert('flickr_api_key', 'Flickr api key', '', '25', 'string', 'plugins');
     return true;
 }
开发者ID:axelsimon,项目名称:ampache,代码行数:13,代码来源:Flickr.plugin.php

示例4: upgrade

 /**
  * upgrade
  * This is a recommended plugin function
  */
 public function upgrade()
 {
     $from_version = Plugin::get_plugin_version($this->name);
     if ($from_version < 2) {
         Preference::insert('catalogfav_columns', 'Catalog favorites columns', '1', '25', 'integer', 'plugins');
     }
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:12,代码来源:CatalogFavorites.plugin.php

示例5: install

 /**
  * install
  * This function installs the VLC localplay controller
  */
 public function install()
 {
     $sql = "CREATE TABLE `localplay_vlc` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " . "`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " . "`owner` INT( 11 ) NOT NULL, " . "`host` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " . "`port` INT( 11 ) UNSIGNED NOT NULL , " . "`password` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " . "`access` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '0'" . ") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
     $db_results = Dba::query($sql);
     // Add an internal preference for the users current active instance
     Preference::insert('vlc_active', 'VLC Active Instance', '0', '25', 'integer', 'internal');
     return true;
 }
开发者ID:cheese1,项目名称:ampache,代码行数:12,代码来源:vlc.controller.php

示例6: install

 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('tmdb_api_key')) {
         return false;
     }
     Preference::insert('tmdb_api_key', 'Tmdb api key', '', '75', 'string', 'plugins');
     return true;
 }
开发者ID:nioc,项目名称:ampache,代码行数:12,代码来源:Tmdb.plugin.php

示例7: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('flattr_user_id')) {
         return false;
     }
     Preference::insert('flattr_user_id', 'Flattr User ID', '', 25, 'string', 'plugins');
     return true;
 }
开发者ID:cheese1,项目名称:ampache,代码行数:14,代码来源:Flattr.plugin.php

示例8: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('ftl_max_items')) {
         return false;
     }
     Preference::insert('ftl_max_items', 'Friends timeline max items', '5', '25', 'integer', 'plugins', $this->name);
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:14,代码来源:FriendsTimeline.plugin.php

示例9: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed
     if (Preference::exists('googleanalytics_tracking_id')) {
         return false;
     }
     Preference::insert('googleanalytics_tracking_id', 'Google Analytics Tracking ID', '', 100, 'string', 'plugins', $this->name);
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:14,代码来源:GoogleAnalytics.plugin.php

示例10: install

 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('discogs_api_key')) {
         return false;
     }
     Preference::insert('discogs_api_key', 'Discogs consumer key', '', '75', 'string', 'plugins', $this->name);
     Preference::insert('discogs_secret_api_key', 'Discogs secret', '', '75', 'string', 'plugins', $this->name);
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:13,代码来源:Discogs.plugin.php

示例11: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('stream_control_hits_max')) {
         return false;
     }
     Preference::insert('stream_control_hits_max', 'Stream control maximal hits', '-1', '50', 'integer', 'plugins');
     Preference::insert('stream_control_hits_days', 'Stream control hits history (days)', '30', '50', 'integer', 'plugins');
     return true;
 }
开发者ID:ivan801,项目名称:ampache,代码行数:14,代码来源:StreamHits.plugin.php

示例12: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('stream_control_bandwidth_max')) {
         return false;
     }
     Preference::insert('stream_control_bandwidth_max', 'Stream control maximal bandwidth (Mo)', '1024', '50', 'integer', 'plugins', $this->name);
     Preference::insert('stream_control_bandwidth_days', 'Stream control bandwidth history (days)', '30', '50', 'integer', 'plugins', $this->name);
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:14,代码来源:StreamBandwidth.plugin.php

示例13: install

 /**
  * install
  * This is a required plugin function
  */
 public function install()
 {
     if (Preference::exists('tadb_api_key')) {
         return false;
     }
     // API Key requested in TheAudioDB forum, see http://www.theaudiodb.com/forum/viewtopic.php?f=6&t=8&start=140
     Preference::insert('tadb_api_key', 'TheAudioDb api key', '41214789306c4690752dfb', '75', 'string', 'plugins');
     return true;
 }
开发者ID:cheese1,项目名称:ampache,代码行数:13,代码来源:TheAudioDb.plugin.php

示例14: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     if (Preference::exists('7digital_api_key')) {
         return false;
     }
     Preference::insert('7digital_api_key', '7digital consumer key', '', '75', 'string', 'plugins');
     Preference::insert('7digital_secret_api_key', '7digital secret', '', '75', 'string', 'plugins');
     return true;
 }
开发者ID:nioc,项目名称:ampache,代码行数:14,代码来源:7Digital.plugin.php

示例15: install

 /**
  * install
  * This is a required plugin function. It inserts our preferences
  * into Ampache
  */
 public function install()
 {
     // Check and see if it's already installed (they've just hit refresh, those dorks)
     if (Preference::exists('headphones_api_url')) {
         return false;
     }
     Preference::insert('headphones_api_url', 'Headphones url', '', '25', 'string', 'plugins');
     Preference::insert('headphones_api_key', 'Headphones api key', '', '25', 'string', 'plugins');
     return true;
 }
开发者ID:nioc,项目名称:ampache,代码行数:15,代码来源:Headphones.plugin.php


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