You are here

function mp3player_players in MP3 Player 6

Same name and namespace in other branches
  1. 6.2 mp3player.module \mp3player_players()
  2. 7.2 mp3player.module \mp3player_players()

Return list of all available players along with settings.

11 calls to mp3player_players()
filefieldmp3player_field_formatter_info in filefieldmp3player/filefieldmp3player.module
Implementation of hook_field_formatter_info().
filefieldmp3player_theme in filefieldmp3player/filefieldmp3player.module
Implementation of hook_theme().
mp3player_player_default_settings in ./mp3player.module
Returns a string of audio player settings.
mp3player_player_delete in ./mp3player.module
Form to delete a player.
mp3player_player_delete_submit in ./mp3player.module
Delete a player.

... See full list

3 string references to 'mp3player_players'
mp3player_player_edit_submit in ./mp3player.module
Edit a player.
mp3player_player_submit in ./mp3player.module
Add a new player.
mp3player_update_1 in ./mp3player.install

File

./mp3player.module, line 130
mp3player main module file.

Code

function mp3player_players($pid = NULL) {
  $players = array();
  $result = db_query('SELECT * FROM {mp3player_players} ORDER BY name');
  while ($player = db_fetch_array($result)) {
    $players[$player['pid']] = $player;
  }
  if ($pid != NULL && isset($players[$pid])) {
    return $players[$pid];
  }
  else {
    return $players;
  }
}