http://drupal.pastebin.com/m9b9c67e

or heres the code:

<?php
  $params = array(
    'type' => 'playlist',
    'width' => 400,
    'height' => 424,
    'allowfullscreen' => 'true',
  );
 
  $vars = array(
    'enablejs' => 'true',
   'file' => xspf_playlist_url('playlist/30'),
    'shuffle' => 'true',
    'displayheight' => '225',
    'bufferlength' => '5',
    'logo' => '/mysite/files/flash/demo/watermark.png',
    'link' => 'http://www.mysite.com',
    'linktarget' => 'blank',
    'autoscroll' => 'true',
  );
  print theme("swfobject_api", base_path() . 'files/flash/mediaplayer.swf', $params, $vars);
?>

it's the line 'file' => xspf_playlist_url('playlist/30'), which i need help with. '30' is views argument for the UID of the user whose profile i'm displaying the playlist on. this code is inside a panel set to display custom content, php input format. obviously it needs to be dynamic rather than a static number, depending on the UID of the profile we're looking at. Any help is greatly appreciated.

Comments

aterchin’s picture

i know it has to do with <?php print $node->uid; ?> but i'm stuck here.

jdevries’s picture

If it's a profile page, wouldn't <?php print $user->uid; ?> do what you want?

aterchin’s picture

nope. i'm using panels with input filter set for php. doesnt output $user->uid for me. unless i've been beating my head against the wall because of some panels filter setting i'm unaware of. funny because its advanced profile and the arg is naturally set up in the main userprofile (panel) settings to be the same as my view: argument 1 = User ID

seems like this should be a cakewalk. i'd like to do everything with panels which is why i went with michelle's advprofile.

aterchin’s picture

Thanks again, Michelle.

http://drupal.org/node/250013#comment-818588

i needed to define the argument in the pane:

$uid = arg(1);