need the php to add to my user profile panel pane.
seems simple enough but the answer's eluding me. i've done some searching and explained it in the forums here:
http://drupal.org/node/250008
i randomly tried the handling code:
if (arg(0) == 'user' && is_numeric(arg(1))) {
return array(arg(1));
}but it was a shot in the dark that didn't work for me.
Comments
Comment #1
aterchin commentedchanged the title because its the same as another i posted on the forums and this is more important to figure out first:
I just made a test block like
print $user->uid;set the filter to php, doesnt output anything. Yet print t('hello'); works fine. Why can't I get it to print the user id? I'm using panels with advanced profile where the argument is set to user id, same as the arg(1) i'm using with my view: videos-of-uid.Comment #2
michelleTry:
$user->uidisn't being defined in your snippit so it's empty.Michelle
Comment #3
aterchin commentedmichelle, i love you. i dont know why i couldn't find this on my own (for the last two days).
i put this at the top:
and to reference the views url with the argument:
done
now my videos_of_uid playlist appears on the userprofile page, containing just those vids authored by that user.
i'll reference this post in the forum as a followup.
thanks again.
Comment #4
michelleLOL! Glad it's working for you.
Michelle
Comment #5
ChristieLuv commentedHi! I'm having the same kind of problem. Can anyone help me out? I just want to make a simple link to display in an Advanced Profile's Pane that includes the users ID.
But I need the "UID" in there to be unique to the current users page. I've tried out so many different things and I'm a PHP novice, so I'd really appreciate some help. If anyone can post the code so I can just add the "mygifts" address to it that would be great!
Thank you!
~Christie
Comment #6
ChristieLuv commentedWhoops I forgot to mark the thread as active, I'll do that with this post and I'll subscribe. Thank you!
Comment #7
michelleUntested, off the top of my head...
Michelle
Comment #8
ChristieLuv commentedYay! It worked! Thank you so very much! Its amazing how long I spent trying to look for how to do this! *lol* This helps a lot!
Comment #9
michelleLearning some basic PHP really goes a long way when working with Drupal. There's a lot of little things like this that are easier if you can do even a little bit of coding.
Glad it's working. Marking this fixed again.
Michelle
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.