diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-06 00:39:54 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-06 00:39:54 +0000 |
commit | bf6e9f88d8fbd520cf7373fa58ad3c45c76904dd (patch) | |
tree | 29618126b20adc850be5f94d3014d9be78bb7f37 /modules/plugins | |
parent | 00bcfdca5f523093770321c22f8c429f3d318af8 (diff) | |
download | ampache-bf6e9f88d8fbd520cf7373fa58ad3c45c76904dd.tar.gz ampache-bf6e9f88d8fbd520cf7373fa58ad3c45c76904dd.tar.bz2 ampache-bf6e9f88d8fbd520cf7373fa58ad3c45c76904dd.zip |
- Added modules section to sidebar, conforming to new layout from r1127
- Re-enabled plugins, added openstrands plugin
Diffstat (limited to 'modules/plugins')
-rw-r--r-- | modules/plugins/Lastfm.plugin.php | 20 | ||||
-rw-r--r-- | modules/plugins/OpenStrands.plugin.php | 73 |
2 files changed, 81 insertions, 12 deletions
diff --git a/modules/plugins/Lastfm.plugin.php b/modules/plugins/Lastfm.plugin.php index d5020a2a..4aa7535c 100644 --- a/modules/plugins/Lastfm.plugin.php +++ b/modules/plugins/Lastfm.plugin.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -21,12 +21,12 @@ class AmpacheLastfm { - var $name ='Last.FM'; - var $description ='Records your played songs to your Last.FM Account'; - var $url =''; - var $version ='000001'; - var $min_ampache ='334001'; - var $max_ampache ='334005'; + public $name ='Last.FM'; + public $description ='Records your played songs to your Last.FM Account'; + public $url =''; + public $version ='000002'; + public $min_ampache ='340007'; + public $max_ampache ='340008'; /** * Constructor @@ -54,8 +54,6 @@ class AmpacheLastfm { "VALUES ('lastfm_pass',' ','Last.FM Password','25','string','options')"; $db_results = Dba::query($sql); - fix_all_users_prefs(); - } // install /** @@ -66,11 +64,9 @@ class AmpacheLastfm { function uninstall() { /* We need to remove the preivously added preferences */ - $sql = "DELETE FROM preference WHERE name='lastfm_pass' OR name='lastfm_user'"; + $sql = "DELETE FROM `preference` WHERE `name`='lastfm_pass' OR `name`='lastfm_user'"; $db_results = Dba::query($sql); - fix_all_users_prefs(); - } // uninstall } // end AmpacheLastfm diff --git a/modules/plugins/OpenStrands.plugin.php b/modules/plugins/OpenStrands.plugin.php new file mode 100644 index 00000000..5fe6821e --- /dev/null +++ b/modules/plugins/OpenStrands.plugin.php @@ -0,0 +1,73 @@ +<?php +/* + + Copyright (c) 2001 - 2007 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +class AmpacheOpenStrands { + + public $name ='OpenStrands'; + public $description ='Interface with MyStrands, recommendations etc'; + public $url ='http://www.mystrands.com/openstrands/overview.vm'; + public $version ='000001'; + public $min_ampache ='340007'; + public $max_ampache ='340008'; + + /** + * Constructor + * This function does nothing... + */ + public function __construct() { + + return true; + + } // PluginLastfm + + /** + * install + * This is a required plugin function it inserts the required preferences + * into Ampache + */ + public function install() { + + /* We need to insert the new preferences */ + $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " . + "VALUES ('mystrands_user',' ','MyStrands Username','25','string','options')"; + $db_results = Dba::query($sql); + + $sql = "INSERT INTO preference (`name`,`value`,`description`,`level`,`type`,`catagory`) " . + "VALUES ('mystrands_pass',' ','MyStrands Password','25','string','options')"; + $db_results = Dba::query($sql); + + } // install + + /** + * uninstall + * This is a required plugin function it removes the required preferences from + * the database returning it to its origional form + */ + function uninstall() { + + /* We need to remove the preivously added preferences */ + $sql = "DELETE FROM `preference` WHERE `name`='mystrands_pass' OR `name`='mystrands_user'"; + $db_results = Dba::query($sql); + + } // uninstall + +} // end AmpacheLastfm +?> |